A full-stack web application designed to streamline the academic peer review process in colleges.
The platform enables teachers to create classrooms , students to submit projects , and teachers to evaluate projects with structured feedback and marks.
- π Frontend: https://student-peer-review-nu.vercel.app/
- π Backend: https://peer-review-backend-r75l.onrender.com
Add your screenshots to a
/screenshotsfolder and update this section with the final images.
- Login and registration
- Teacher dashboard and classroom
- Student dashboard and classroom
- Project evaluation and export
- Secure authentication
- Create and manage classrooms
- Generate unique room codes
- View participants and submitted projects
- Evaluate student projects (marks + feedback)
- Close classrooms to stop submissions
- Export evaluation data as CSV
- Export evaluation data as Excel (XLSX)
- Secure authentication
- Join classrooms using room code
- Submit project details
- View feedback and marks
- Automatic redirection when classroom is closed
- Role-based access control (Teacher / Student)
- JWT authentication with cookies
- Real-time UI updates using polling
- Clean glassmorphism UI
- Responsive design
Frontend (React + Tailwind)
β
Backend (Node.js + Express)
β
Database (MongoDB)
- Frontend handles UI and user interaction
- Backend handles authentication, business logic, and CSV export
- MongoDB stores users, rooms, projects, and reviews
flowchart LR
UI[React + Tailwind] -->|HTTPS| API[Node.js + Express]
API -->|Mongoose| DB[(MongoDB)]
API -->|SMTP| Mail[(Email Provider)]
- React.js
- Tailwind CSS
- React Router
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT Authentication
- bcrypt
- JWT token generated on login
- Token stored in HTTP cookies
- Middleware validates user on every protected route
- Role-based authorization ensures correct access
The system uses polling to synchronize data across users.
- Client fetches updated room/project data every few seconds
- Ensures all users see latest submissions and reviews
- Stable and suitable for academic environments
- Avoids complexity of WebSockets
- Teachers can download evaluation data in CSV format
- CSV is generated dynamically on backend
- Includes student details, project title, marks, and feedback
- File opens directly in Excel / Google Sheets
Cookies are shared across browser tabs.
To test Teacher and Student simultaneously , use:
- Different browsers (Chrome & Brave), or
- Incognito window
This ensures correct session isolation.
git clone https://github.com/your-username/peer-review-system.git
cd backend
npm install
npm start
Create a .env file:
MONGO_URI=mongodb://localhost:27017/peer-review
JWT_KEY=your_secret_key
FRONTEND_URL=http://localhost:5173
CORS_ORIGINS=http://localhost:5173
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_password
JWT_EXPIRES_IN=15m
REFRESH_TOKEN_EXPIRES_IN=7d
LOG_LEVEL=info
cd frontend
npm install
npm run dev
- Local:
http://localhost:5173(frontend) +http://localhost:3000(backend) - Dev/Staging: Use dedicated URLs and isolated MongoDB instances
- Production: Render backend + Vercel frontend (or your hosting setup)
GET /healthzreturns process status and uptimeGET /readyzreturns readiness based on MongoDB connection
- JSON structured logs with
timestamp,level,message,requestId,userId,latencyMs - Set log level via
LOG_LEVEL(e.g.,info,warn,error)
- Monitor
GET /healthzfor uptime - Optionally monitor
GET /readyzfor database readiness - Use the public backend URL (Render) for checks and alerts
- A sample Prometheus configuration is provided in
prometheus.yml - Default scrape target:
host.docker.internal:3000 - If you expose a metrics endpoint (for example,
/metrics), update the scrape config accordingly
This repository includes a GitHub Actions workflow at .github/workflows/main.yml.
- Security - Audit & Scan: installs dependencies, runs
npm audit, builds backend image, and scans with Trivy - Backend - Test: installs backend dependencies and runs
npm test - Frontend - Lint, Test & Build: runs
npm run lint,npm test, andnpm run build
- Backend - Build & Push Docker Image: pushes to GitHub Container Registry (GHCR)
- Backend - Trigger Render Deployment: calls the Render deploy hook and verifies
/healthz
RENDER_DEPLOY_HOOK- triggers backend deploy on RenderBACKEND_HEALTH_URL- base URL for health checks (example:https://peer-review-backend.onrender.com)RENDER_ROLLBACK_HOOK- optional rollback hook for auto-revert on failed health checks
Prerequisites: MongoDB Database Tools (mongodump, mongorestore) installed on the machine.
export MONGO_URI=mongodb://localhost:27017/peer-review
export BACKUP_DIR=./backups
./backend/scripts/backup.sh
$env:MONGO_URI="mongodb://localhost:27017/peer-review"
$env:BACKUP_DIR=".\backups"
./backend/scripts/backup.ps1
export MONGO_URI=mongodb://localhost:27017/peer-review
export BACKUP_PATH=./backups/20260101-120000
./backend/scripts/restore.sh
$env:MONGO_URI="mongodb://localhost:27017/peer-review"
$env:BACKUP_PATH=".\backups\20260101-120000"
./backend/scripts/restore.ps1
- Take a fresh backup from production
- Restore into staging or a local environment
- Run smoke tests (login, create room, add project)
- Record duration and any issues in the release notes
- Triage: confirm impact and capture request IDs from logs
- Mitigate: rollback via
RENDER_ROLLBACK_HOOKor redeploy last known good image - Communicate: post status update to stakeholders
- Resolve: fix root cause and deploy patch
- Postmortem: document timeline, fix action items, add tests
- Ensure CI green: tests, lint, security audit, Trivy scan
- Verify environment variables and secrets
- Run database backup before production deploy
- Deploy and verify
GET /healthzandGET /readyz - Monitor logs for errors and latency spikes
- Update release notes
Branch protection recommendation (GitHub):
- Require pull request reviews
- Require status checks:
Backend - TestFrontend - Lint, Test & BuildSecurity - Audit & Scan
- Require branches to be up to date before merging
- Restrict who can push to
main
This project demonstrates:
- Full-stack development
- Secure authentication
- Role-based access control
- Database design
- REST API design
- UI/UX principles
- Real-world problem solving
Developed as an academic project to improve transparency and efficiency in project evaluation systems.