git clone https://github.com/ariym/base-vite-react project-name
cd project-name
git remote remove origin
npm iimport from '@/dir_or_filename' makes is easy to import universal components inside nested directories
- Find a component on ui.shadcn.com/docs/components
npx shadcn-ui@latest add component-name
- Inside of project root run:
cp env.template .env.development.localcp env.template .env.production.local
- Prefix every variable with
VITE_(VITE_SOMETHING=xxx) - Import with
import.meta.env.VITE_SOMETHING
Vite Documentation on env files.
Instead of NODE_ENV, use import.meta.env.MODE by passing vite --mode MODE at startup.
Note to AVOID passing NODE_ENV= at startup which can get confusing as documented here.
- data fetching – react query
- state management for updated data
- loading screen
- navigation – react router
- adding a route
- url parameters
- ui components – shadcn
- icons – radix-ui/react-icons
- build sytstem – vite