mrlinnth / reactailsy

React Typescript Skeleton Project with Tailwind, Daisyui, React Router, React Query, Jotai and Axios packages to assist with development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intro

Created to use as a starter/skeleton project for reactjs projects. Aim is to be simple and scalable.

Project Structure

  • Feature/Modular based approach (recommended for scalability)
  • Dictionary index files in sub-folders
  • First level components, hooks, types and services are for common functions
  • Module level components, hooks, types and services are for module specific
  • Module and Component folders/files use PascalCase names
  • Other folders/files use camelCase names
  • Both human and editor/IDE should be able to find files easily
  • Avoid too much nesting
  • Feel free to reorganize or change structure totally if you want
/src
    /atoms (for Jotai atoms)
    /components (for shared components)
        /common
        /header (use semantic names)
        /template
    /config (for any config eg: axios instance)
    /hooks (for shared hooks)
    /modules
        /ModuleA
            /pages
            index.ts
        /ModuleB
            /components (sub-components for the module)
            services.ts (services for the module)
            hooks.ts (hooks for the module)
            index.ts
            types.ts (types for the module)
    /services (for shared services)
        /api (for shared APIs)
    /types (for shared types)
    /utils (helper functions, shared functions etc)
App.tsx (routes inside)
index.tsx

Installed Packages

Services

To Do

  • Add requirements to README

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.

yarn build

Builds the app for production to the build folder.

About

React Typescript Skeleton Project with Tailwind, Daisyui, React Router, React Query, Jotai and Axios packages to assist with development


Languages

Language:HTML 39.6%Language:TypeScript 39.6%Language:CSS 14.3%Language:JavaScript 4.9%Language:Shell 1.5%