Generate your .env files for both backend and frontend. Nothing is sent anywhere — everything runs in your browser.
cPanel MySQL connection details
localhost on cPanel
cpanelusername_storedir
Domain, server port, environment
Used to sign access and refresh tokens — must be long and random
Optional — defaults are fine for most setups
Created automatically when you run npm run db:seed
For OTP verification and password reset
Environment variables required in the React app
| Variable | Required | Description | Example |
|---|---|---|---|
VITE_API_URL |
Required | Full URL to the backend API including the prefix. All axios requests are made relative to this. |
https://yourdomain.com/api/v1 |
| ⚠️ That's it for production. Variables below are truly optional — they existed in earlier drafts but are now managed in the Admin Panel. | |||
VITE_APP_NAME |
Optional | Overrides browser tab title before the app loads settings from the API. | Store Directory |
VITE_API_URL in the frontend .env
src/lib/api.ts creates an Axios instance with baseURL: import.meta.env.VITE_API_URL.
Every API call in every page component goes through this instance — so this single variable controls where all requests go.
Complete map of backend routes consumed by the React app
| Module | Endpoints Used |
|---|---|
| Auth | POST /auth/register, /auth/login, /auth/verify-otp, /auth/refresh, /auth/logout, /auth/forgot-password, /auth/reset-password, /auth/resend-otp |
| Profile | GET /users/me, PUT /users/me, PUT /users/me/password |
| Stores (Public) | GET /stores, GET /stores/:slug |
| Stores (Owner) | GET /owner/store, PUT /owner/store, GET/POST/PUT/DELETE /owner/menu, GET/POST/DELETE /owner/gallery, GET/POST/PUT/DELETE /owner/offers |
| Ratings | POST /stores/:slug/ratings, GET /users/me/ratings |
| Claims | POST /stores/:slug/claim, GET /users/me/claims |
| Store Suggestions | POST /store-suggestions |
| Notifications | GET /notifications, PUT /notifications/read-all, PUT /notifications/:id/read |
| Admin — Stores | GET/PUT /admin/stores, PUT /admin/stores/:id/approve, PUT /admin/stores/:id/reject, DELETE /admin/stores/:id |
| Admin — Users | GET /admin/users, PUT /admin/users/:id/suspend, DELETE /admin/users/:id |
| Admin — Categories | GET/POST /admin/categories, PUT/DELETE /admin/categories/:id |
| Admin — Cat Requests | GET /admin/category-requests, PUT /admin/category-requests/:id |
| Admin — Suggestions | GET /admin/store-suggestions, PUT /admin/store-suggestions/:id, POST /admin/store-suggestions/:id/convert |
| Admin — Claims | GET /admin/claims, PUT /admin/claims/:id |
| Admin — Ratings | GET /admin/ratings, DELETE /admin/ratings/:id |
| Admin — FAQs | GET/POST /admin/faqs, PUT/DELETE /admin/faqs/:id |
| Admin — Pages | GET /admin/pages, PUT /admin/pages/:id |
| Admin — Settings | GET/PUT /admin/settings |
| Admin — SMS | GET/PUT /admin/sms, POST /admin/sms/test |
| Admin — Admins | GET/POST /admin/admins, PUT/DELETE /admin/admins/:id |
| Admin — Analytics | GET /admin/analytics |
| Admin — Audit Logs | GET /admin/audit-logs |
.envSave this as .env in your backend root directory
.envSave this as .env in your frontend root directory
.env inside it.npm ci --omit=dev then npm run db:migrate then npm run db:seednpm ci then npm run builddist/ folder or configure Passenger./login with your admin credentials.