Skip to content

truongnat/turbo-spa-react

Repository files navigation

Turbo React App

A project that provides libraries and structures available for react.

Features

  • Auto generate component by hygen.
  • Auto generate env file by config turbo.json.
  • Auto generate assets (icons,images, fonts).
  • Auto generate page includes (container, component, service, loader, route, model, services).
  • Extend generate page and auto create CRUD api and view sample.
  • Config eslint + prettier.
  • Theme UI mantine.
  • Config scss module.
  • Commitlint for commit git.
  • Alova for api.
  • Config i18n multiple language.
  • Storybook generate by component.
  • And more, we will update...

Run Locally

Clone the project

  git clone https://github.com/truongnat/turbo-spa-react.git

Go to the project directory

  cd turbo-spa-react

Install dependencies

  yarn

Modify .env.template file and run

  yarn config-env

Modify assets (if any) file and run

  yarn generate-assets

Generate new component

  yarn new-component <name>

Generate new page

  yarn new-page <name>

Generate new page with crud

  yarn crud <name>

Start dev

  yarn dev

Start storybook

  yarn storybook

Build

Build dist

  yarn build

You can config multiple build for each env.

Build storybook

  yarn build-storybook

Structure project

.
├── README.md
├── _templates
│   ├── crud
│   │   └── new
│   ├── component
│   │   └── new
│   ├── init
│   │   └── repo
│   └── page
│       └── new
├── commitlint.config.cjs
├── dev-dist
├── dist
├── index.html
├── package.json
├── public
│   ├── android-chrome-192x192.png
│   ├── android-chrome-512x512.png
│   └── vite.svg
├── scripts
│   ├── configEnv.js
│   ├── generateAssets.js
│   └── utils.js
├── src
│   ├── @types
│   │   ├── env.d.ts
│   │   ├── i18next.d.ts
│   │   ├── style.d.ts
│   │   ├── swaggerSchema.d.ts
│   │   └── vite-env.d.ts
│   ├── app
│   │   ├── App.tsx
│   │   ├── AppProviders.tsx
│   │   ├── index.ts
│   │   └── router
│   ├── assets
│   │   ├── fonts
│   │   ├── icons
│   │   ├── images
│   │   ├── index.ts
│   │   ├── lottie
│   │   └── styles
│   ├── features
│   │   ├── discussions
│   │   ├── employee-manager
│   │   ├── employees
│   │   ├── home-page
│   │   ├── network
│   │   ├── profile
│   │   ├── profile-page
│   │   ├── shop-manager
│   │   ├── sign-in
│   │   ├── tasks-page
│   │   └── templates
│   ├── main.tsx
│   ├── shared
│   │   ├── components
│   │   ├── config
│   │   ├── error-boundary
│   │   ├── hooks
│   │   ├── layouts
│   │   ├── mock
│   │   ├── providers
│   │   ├── services
│   │   ├── store
│   │   ├── theme
│   │   ├── translations
│   │   └── utils
│   └── stories
│       ├── Introduction.mdx
│       └── assets
├── storybook-static
├── tsconfig.json
├── tsconfig.node.json
├── turbo.json
├── vite.config.ts
└── yarn.lock

Support

For support, email truongdq.dev@gmail.com or message Telegram.

Authors

License

MIT