Quick Start
Get the project running locally in about 5 minutes.
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- MySQL 8+ (for local backend development)
- A Cloudflare account (for deploying to production)
1. Clone the repo
Section titled “1. Clone the repo”git clone <repo-url>cd shanvitravelsThe project has three top-level folders:
| Folder | Purpose |
|---|---|
backend/ | Express API server |
frontend/ | React + Vite web app |
docs/ | This documentation site |
2. Set up the backend
Section titled “2. Set up the backend”cd backendnpm installcp .env.example .envOpen .env and fill in your local MySQL credentials:
DB_HOST=localhostDB_USER=rootDB_PASS=yourpasswordDB_NAME=shanvi_travelsPORT=5001
# Generate strong random strings for these — never reuse the wrangler.toml valuesJWT_SECRET=your_local_jwt_secret_min_32_charsREFRESH_SECRET_KEY=your_local_refresh_secret_min_32_charsWarning: The
wrangler.tomlfile currently has real secrets committed in plaintext. Those values are compromised and should be rotated. Always use environment variables locally — never copy fromwrangler.toml.
Create the database
Section titled “Create the database”mysql -u root -p < shanvi_travels.sqlStart the backend
Section titled “Start the backend”npm run dev# Starts on http://localhost:5001The first request after startup automatically runs database migrations (adds any missing columns via ALTER TABLE guards).
3. Set up the frontend
Section titled “3. Set up the frontend”cd ../frontendnpm installnpm run dev# Starts on http://localhost:5173The frontend auto-detects localhost and points API calls to http://localhost:5001. No config change needed.
4. Verify it’s working
Section titled “4. Verify it’s working”- Open http://localhost:5173 — you should see the Shanvi Travels homepage
- Open http://localhost:5001/health — should return
{"status":"ok"} - Log in at
/loginwith the admin credentials from your database seed
Running the docs site
Section titled “Running the docs site”cd docsnpm installnpm run dev# Starts on http://localhost:4321