IronZone combines a modern gym floor, expert coaching, and online management tools so members can track their fitness journey with confidence.
- Frontend: React 18, Vite 5, Tailwind CSS 3, react-router-dom, axios, lucide-react, react-hot-toast, Headless UI
- Backend: Node.js 20+, Express 4, better-sqlite3, bcryptjs, jsonwebtoken, express-validator
- Database: SQLite demo database with production-friendly schema
- Node.js >= 20
- npm >= 9
cd server
npm install
cd ../client
npm installcopy server\.env.example server\.env
copy client\.env.example client\.envUpdate server/.env and replace JWT_SECRET with a secure string longer than 32 characters.
cd server
npm run seedTerminal 1:
cd server
npm run devTerminal 2:
cd client
npm run dev- Frontend: http://localhost:5173
- Backend: http://localhost:5000/api/health
| Role | Password | |
|---|---|---|
| Admin | admin@ironzone.vn | admin123 |
| User | user1@example.com | password123 |
POST /api/auth/registerPOST /api/auth/loginGET /api/plansGET /api/trainersGET /api/cartPOST /api/ordersGET /api/memberships/myGET /api/admin/statsGET /api/admin/membersGET /api/admin/equipment
client/ React + Vite + Tailwind frontend
server/ Express API + SQLite schema/seed
The frontend and backend must be deployed separately. Vercel only hosts the React client and does not run the Express API located in the server directory.
The repository already includes a render.yaml file.
- Open Render, select New > Blueprint, and connect the repository.
- Render will create the
ironzone-apiservice from theserverdirectory. - Set the
CLIENT_URLenvironment variable to the frontend domain, for example:
https://iron-zone-gym.vercel.app
- After deployment, verify the API health endpoint:
https://<render-service>.onrender.com/api/health
In Vercel Project Settings > Environment Variables, set:
VITE_API_URL=https://<render-service>.onrender.com/api
Do not use the placeholder URL https://your-api.onrender.com/api.
After changing the environment variable, redeploy the frontend so Vite can include the new URL in the production bundle.
The Vercel project should use:
Root Directory: client
Build Command: npm run build
Output Directory: dist
Note: SQLite data stored on Render's free filesystem may be reset when the service is redeployed. The current setup is suitable for demonstrations and academic projects. For long-term production use, choose PostgreSQL or a persistent disk.