- Vite framework
- Antd UI
- React-router-dom Routing management
- Typescript language
- Firebase
- Xstate for state management
- go to firebase-admin-ts
- run
npm install - run
npm start - come back to this project
- run
npm install - run
npm run dev
- firebase-admin-ts
- santi-signin (on firebase console)
- Node v.18.19.0
- NPM v.10.2.3
- Src
- public --> static asset here
- routes --> define all routes and page view here
- templates --> define layout here
- utils --> utility functions eg. hooks, helper functions
- views --> for page view content
- components --> shared component such as card, shelf etc.
- core --> define high-level (business logic) code here.
- create new view in
src/views - add
pathandComponentinsrc/routes - Note: add path before '*' path
- go to
src/templates/antd/Default.tsx - in
<Menu />Component, add new item
- If want to connect to firebase on cloud, comment out connectEmulator code in
src/core/data/auth/firebaseApp.ts
- run
npm run build - firebase deploy
Env Loading Priorities An env file for a specific mode (e.g. .env.production) will take higher priority than a generic one (e.g. .env). In addition, environment variables that already exist when Vite is executed have the highest priority and will not be overwritten by .env files. For example, when running VITE_SOME_KEY=123 vite build. .env files are loaded at the start of Vite. Restart the server after making changes.