React Boilerplate with Vite, Redux, Axios and others.
- React + TypeScript
- Sass
- Redux
- React Query
- Axios
- React Router
- PWA
- Husky
- Lint-Staged
- Prettier
- Eslint
- Commitlint
npm install # or yarn installCopy the .env.example file to .env.local and configure the environment variables.
cp .env.example .env.local| Variable | Description |
|---|---|
VITE_API_URL |
API URL |
./src
βββ assets
β βββ logo.svg # App logo
βββ components # Reusable components
β βββ first-loader
β β βββ first-loader.module.scss
β β βββ index.tsx
β βββ logo
β βββ index.tsx
β βββ logo.module.scss
βββ hooks # Custom hooks
β βββ useAppDispatch.ts
β βββ useAppSelector.ts
βββ http
β βββ http.ts # Axios instance
βββ index.css
βββ layouts # Layouts
β βββ admin # Admin layout (access by /admin)
β β βββ index.tsx
β βββ default # Default layout (wraps all pages)
β β βββ index.tsx
β βββ user # User layout (access by /user)
β βββ index.tsx
βββ main.tsx
βββ models # API models
β βββ Base.ts # Base model
β βββ User.ts # Example user model (extends from Base)
βββ pages # Pages
β βββ admin # Admin pages
β β βββ index.tsx
β βββ user # User pages
β βββ index.tsx
βββ router
β βββ admin.ts
β βββ index.ts
β βββ user.ts
βββ services
β βββ base.service.ts
β βββ crud.service.ts
β βββ token.service.ts
βββ store
β βββ index.ts
β βββ queryClient.ts
β βββ user.ts
βββ utils
β βββ add.spec.ts
β βββ add.ts
βββ vite-env.d.tsnpm run devnpm run build