You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Odoo-hackathon/
Backend/ # Express API
Frontend/ # Vite + React client
Prerequisites
Node.js 18+
MongoDB running locally or hosted
Stripe and Cloudinary accounts (optional for basic dev without uploads/payments)
Quick start
Backend
# Clone the repo
git clone https://github.com/your-username/quickcourt.git
# Install dependencies for backendcd server
npm install
# Install dependencies for frontendcd ../client
npm install
# Create .env files in server & client with required variables# Example for server/.env:
PORT=5000
MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=xxxx
CLOUDINARY_API_KEY=xxxx
CLOUDINARY_API_SECRET=xxxx
# Run backendcd server
npm run dev
# Run frontendcd ../client
npm run dev
Open the app at http://localhost:5173
How backend and frontend connect
In development, the frontend calls the backend at http://localhost:4001/api (see Frontend/src/lib/axios.js).
Vite dev server also proxies /api → http://localhost:4001 (see Frontend/vite.config.js).
Backend CORS is configured to allow http://localhost:5173 with credentials. Axios is set to withCredentials: true.
Features at a glance
Venue discovery and details, search/filter
Court booking flow with date/time selection
Stripe payments and booking confirmation
Facility owner dashboard for managing facilities/courts
Admin dashboard (email/password from .env)
Useful scripts
Backend: npm run dev, npm start, npm run seed, npm run seed:courts
Frontend: npm run dev, npm run build, npm run preview, npm run lint
Troubleshooting (dev)
If user auth checks 401 before login, that’s expected. After login, ensure cookies are set and CORS allows credentials.
For admin login, make sure ADMIN_EMAIL, ADMIN_PASSWORD, and JWT_SECRET are set and the backend is restarted.