- Backend: Node.js, Express, MongoDB, JWT, Cloudinary, Multer
- Frontend: React, Vite, Redux Toolkit, Tailwind CSS, Radix UI
- Node.js (18+)
- MongoDB Atlas account (free): https://mongodb.com/atlas
- Cloudinary account (free): https://cloudinary.com
cd backend
npm install
cp .env.example .env
# Edit .env: Add MongoDB Atlas URI, JWT_SECRET, Cloudinary creds
npm run devExpected: Server running at port 3000 + mongodb connected successfully
cd frontend
npm install
npm run devExpected: App opens at http://localhost:5173 (auto-proxy to backend)
Deploy as two different Vercel projects:
backend/→ API projectfrontend/→ web app project
- In Vercel, click Add New Project and import the same repo.
- Set Root Directory to
backend. - Add backend environment variables:
MONGO_URIJWT_SECRETCLOUD_NAMEAPI_KEYAPI_SECRETCLIENT_URLS(set this after frontend is deployed; you can use localhost first)RATE_LIMIT_MAX(optional)
- Deploy and copy the backend URL (example:
https://jobforge-api.vercel.app).
Backend routing is configured by
backend/vercel.json, and requests are served bybackend/api/index.js.
- Create another Vercel project from the same repo.
- Set Root Directory to
frontend. - Add frontend environment variable:
VITE_API_BASE_URL= your backend URL (example:https://jobforge-api.vercel.app)
- Deploy the frontend project.
SPA routing fallback is configured by
frontend/vercel.json.
After frontend deploys, go back to backend project env vars and set:
CLIENT_URLS=https://your-frontend.vercel.app
Then redeploy backend once.
- Frontend loads from frontend URL.
- Frontend network requests hit backend URL +
/api/v1/*. - Test API directly:
https://your-backend.vercel.app/api/v1/job/get