Skip to content

Quick Start

Get the project running locally in about 5 minutes.

  • Node.js 18+
  • MySQL 8+ (for local backend development)
  • A Cloudflare account (for deploying to production)
Terminal window
git clone <repo-url>
cd shanvitravels

The project has three top-level folders:

FolderPurpose
backend/Express API server
frontend/React + Vite web app
docs/This documentation site
Terminal window
cd backend
npm install
cp .env.example .env

Open .env and fill in your local MySQL credentials:

DB_HOST=localhost
DB_USER=root
DB_PASS=yourpassword
DB_NAME=shanvi_travels
PORT=5001
# Generate strong random strings for these — never reuse the wrangler.toml values
JWT_SECRET=your_local_jwt_secret_min_32_chars
REFRESH_SECRET_KEY=your_local_refresh_secret_min_32_chars

Warning: The wrangler.toml file currently has real secrets committed in plaintext. Those values are compromised and should be rotated. Always use environment variables locally — never copy from wrangler.toml.

Terminal window
mysql -u root -p < shanvi_travels.sql
Terminal window
npm run dev
# Starts on http://localhost:5001

The first request after startup automatically runs database migrations (adds any missing columns via ALTER TABLE guards).

Terminal window
cd ../frontend
npm install
npm run dev
# Starts on http://localhost:5173

The frontend auto-detects localhost and points API calls to http://localhost:5001. No config change needed.

Terminal window
cd docs
npm install
npm run dev
# Starts on http://localhost:4321