⚙️ Store Directory — Setup Wizard

Generate your .env files for both backend and frontend. Nothing is sent anywhere — everything runs in your browser.

🗄️

MySQL Database

cPanel MySQL connection details

ℹ️
In cPanel → MySQL Databases, create a database, a user, and assign full privileges. Then fill in the details below.
Usually localhost on cPanel
MySQL default is 3306
e.g. cpanelusername_storedir
The MySQL user you created
The password for that user
🌐

Application Settings

Domain, server port, environment

Your public domain (no trailing slash)
Port Node.js listens on (Passenger ignores this)
🔑

JWT Secrets

Used to sign access and refresh tokens — must be long and random

⚠️
Never share these secrets. If they leak, all tokens are compromised. Generate new ones with the button below.
📁

File Upload & Rate Limiting

Optional — defaults are fine for most setups

Relative to backend root
10485760 = 10 MB
900000 = 15 minutes
👑

Super Admin Account

Created automatically when you run npm run db:seed

🔒
These credentials are only used once during seeding to create the initial super admin. Change the password in the admin panel after first login.
International format: +9611234567
Min 8 chars, include numbers & symbols
📱

SMS Gateway

For OTP verification and password reset

💡
SMS can also be configured later in the Admin Panel → SMS Settings. Leave blank to use Dev Mode (OTPs logged to console, not sent).
Send real OTPs via Twilio or Vonage
⚛️

Frontend API Configuration

Environment variables required in the React app

The React frontend only needs one required variable. All other configuration (site name, colors, SMS, etc.) is managed through the Admin Panel UI and stored in the database.
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
This will be VITE_API_URL in the frontend .env
📌
How the frontend uses this:
The file 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.
🔌

API Endpoints the Frontend Calls

Complete map of backend routes consumed by the React app

ModuleEndpoints Used
AuthPOST /auth/register, /auth/login, /auth/verify-otp, /auth/refresh, /auth/logout, /auth/forgot-password, /auth/reset-password, /auth/resend-otp
ProfileGET /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
RatingsPOST /stores/:slug/ratings, GET /users/me/ratings
ClaimsPOST /stores/:slug/claim, GET /users/me/claims
Store SuggestionsPOST /store-suggestions
NotificationsGET /notifications, PUT /notifications/read-all, PUT /notifications/:id/read
Admin — StoresGET/PUT /admin/stores, PUT /admin/stores/:id/approve, PUT /admin/stores/:id/reject, DELETE /admin/stores/:id
Admin — UsersGET /admin/users, PUT /admin/users/:id/suspend, DELETE /admin/users/:id
Admin — CategoriesGET/POST /admin/categories, PUT/DELETE /admin/categories/:id
Admin — Cat RequestsGET /admin/category-requests, PUT /admin/category-requests/:id
Admin — SuggestionsGET /admin/store-suggestions, PUT /admin/store-suggestions/:id, POST /admin/store-suggestions/:id/convert
Admin — ClaimsGET /admin/claims, PUT /admin/claims/:id
Admin — RatingsGET /admin/ratings, DELETE /admin/ratings/:id
Admin — FAQsGET/POST /admin/faqs, PUT/DELETE /admin/faqs/:id
Admin — PagesGET /admin/pages, PUT /admin/pages/:id
Admin — SettingsGET/PUT /admin/settings
Admin — SMSGET/PUT /admin/sms, POST /admin/sms/test
Admin — AdminsGET/POST /admin/admins, PUT/DELETE /admin/admins/:id
Admin — AnalyticsGET /admin/analytics
Admin — Audit LogsGET /admin/audit-logs

🗄️ Database

Host
Database
User
Status✓ Configured

🔑 JWT Secrets

Access Secret
Refresh Secret
Token Expiry

👑 Admin Account

Username
Phone
Email

📱 SMS + Frontend

SMSDev Mode
API URL
Site URL
📄

Backend .env

Save this as .env in your backend root directory

backend/.env
Generating...
📄

Frontend .env

Save this as .env in your frontend root directory

frontend/.env
Generating...
🚀
Next steps after saving .env files:
1. Upload the backend folder to your server and place .env inside it.
2. Run npm ci --omit=dev then npm run db:migrate then npm run db:seed
3. Upload the frontend folder, run npm ci then npm run build
4. Point your web server to the dist/ folder or configure Passenger.
5. Log in at /login with your admin credentials.