npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-typebase-structure

v0.0.1

Published

## api

Downloads

5

Readme

Proaject Folder Structure

api

    in this folder there is two other folder called types and routes.

types

    we define all the types for request and response of any apis.

routes

    we define all the actual request using Axios or Ky.

app || view

in this folder we put out UI components of each page. (you can name this folder view if you like)

assets

all the assets as you know.

components

this folder act like a shared place. any re-useable component (small components that will be used in other places) for example you may like to use a button from MUI. you should create a folder @mui-extends/button and place the button in sub folder named button. or you use a link and button togheter you will create linkbutton folder for that matter. in the end we have something like this.

/components/@mui-extends/button /components/linkbutton

configs

all constants and config goes in here

hooks

only hooks that will be used more than once. and we have api folder in here again. the api folder contains only the hooks that will use api routes to commiunicate with server a nice place to put tanstack-query hooks.

layout

auth layout - page layout - dashbaord layout will be placed in here.

/partials in this folder we keep header, footer, aside and layout parts of application.

modules

they are not big as page and not small as components. in fact they are something like widgets. imagine you have a component that you may use in diffrent pages or creating a modal system that handles different modals. or aa player component that comes to page by clicking on any button on the page. I'm hoping you get the idea. best example would be youtube player which can be minimized to lower corner of the page

pages

just return the page component. nothing more. we should have a clean component and do the dirty stuff in app folder. maybe we just use this component to wrapping int around a HOC or using Helmet js inside it.

routes

route navigation system only. using react-router-dom in here.

services

in this file we make Axios interceptors. or any other services we might have.

store

using redux, zustand stores we should not put contexts in here because we should not have global context at all. contexts are better to capsulate api inside of any other UI components.

utils

helper functions and etc.

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ["./tsconfig.node.json", "./tsconfig.app.json"],
      tsconfigRootDir: import.meta.dirname,
    },
  },
});
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from "eslint-plugin-react";

export default tseslint.config({
  // Set the react version
  settings: { react: { version: "18.3" } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs["jsx-runtime"].rules,
  },
});