# Install all dependencies (frontend + backend)
npm run install:all
# Run setup script to configure environment
npm run setup# Option 1: Simple start (recommended)
npm start
# Option 2: Using concurrently directly
npm run dev:all| Command | Description |
|---|---|
npm start |
Smart start script that installs backend deps if needed, then starts both servers |
npm run dev:all |
Starts both frontend and backend using concurrently |
npm run dev:frontend |
Starts only the React frontend (port 5173) |
npm run dev:backend |
Starts only the Node.js backend (port 5000) |
npm run setup |
Initial setup: creates .env, uploads folder, checks dependencies |
npm run install:all |
Installs dependencies for both frontend and backend |
- Frontend (React): http://localhost:5173
- Backend API: http://localhost:5000
- API Health Check: http://localhost:5000/health
After running npm run setup, edit backend/.env with your settings:
# Required
MONGODB_URI=mongodb://localhost:27017/citbif
JWT_SECRET=your-super-secret-jwt-key-here
# Optional
CORS_ORIGIN=http://localhost:5173
SMTP_HOST=smtp.gmail.com
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password-
Start development:
npm start
-
Make changes to your code (both frontend and backend will auto-reload)
-
Stop servers: Press
Ctrl+C -
Restart: Run
npm startagain
citbif/
βββ src/ # Frontend (React + Vite)
βββ backend/ # Backend (Node.js + Express)
βββ package.json # Root package.json with unified scripts
βββ start-dev.js # Smart development starter
βββ setup.js # Initial setup script
βββ README.md # Full documentation
- Check if MongoDB is running
- Verify
backend/.envconfiguration - Run
cd backend && npm installmanually
- Check if port 5173 is available
- Run
npm installin root directory
- Frontend: Change port in
vite.config.ts - Backend: Change
PORTinbackend/.env
Your CITBIF platform is now running with:
- β React frontend with TypeScript
- β Node.js backend with Express
- β MongoDB database integration
- β JWT authentication
- β File upload support
- β Email notifications
- β Complete API for all features
Happy coding! π