🌐 Live: https://resource-adda.onrender.com
Resource Adda is a full-stack platform built with React and Node.js for:
- Browsing study materials filtered by branch, semester, subject, and unit
- Contributing resources — students submit notes/files for admin review and approval
- Admin operations — managing uploads, reviewing contributions, and controlling access
- Community groups — connecting students around shared academic interests
It replaces scattered, manual note-sharing with a unified system including JWT-based admin auth, cloudinary Cloud Storage for files, real-time upload progress via Socket.io, and a contribution approval workflow.
- Fragmented resource discovery — Hierarchical filter (branch → semester → subject → unit) for fast lookup
- Unverified contributions — Admin-gated approval workflow before resources are published
- Large file handling — Chunked upload over Socket.io with real-time progress feedback
- Access control — JWT-authenticated admin routes; super-admin-only admin provisioning
- Cross-branch content — Query files common across multiple branches in one request
- Students searching for notes and past papers by their branch and semester
- Top performers / contributors submitting their notes for community benefit
- Department admins reviewing, approving, or rejecting submitted resources
- System maintainers extending upload, auth, and contribution workflows
- Filter resources by branch, semester, subject, and unit
- Cross-branch query support (returns files common to multiple branches)
- In-browser PDF viewer
- One-click file download via proxied backend endpoint
- Students upload files with metadata (branch, sem, subject, unit, email)
- Contributions enter a
pendingqueue for admin review - Admin can approve or reject with optional comments
- Lifecycle:
pending→approved/rejected
- JWT-based admin login (1-hour token expiry)
- Admin panel for browsing, deleting, and managing uploaded resources
- Pending contribution queue with approval/rejection actions
- Super-admin-only endpoint to provision new admins (password-protected)
- Chunked file streaming via Socket.io (up to 200 MB per file)
- Per-chunk progress events back to the client
- Authenticated admin uploads vs. public contribution uploads handled on the same socket
- Daily request counter with midnight reset
- Historical request-count lookup by date stored in MongoDB
- Node.js 22+
- npm / yarn
- Cloudinary cloud storage
- MongoDB instance
# Frontend
cd frontend
npm install
# Backend
cd backend
npm installCreate a .env file in the backend/ directory:
# MongoDB
MONGO_URI=mongodb://localhost:27017/resource-adda
# Super-admin password (bcrypt hash stored in DB manually or via /server/addAdmin)
PASSWORD=your-bcrypt-hashed-super-admin-password
# JWT
JWT_SECRET=your-jwt-secret
# cloudinary
CLOUDINARY_URL=your-cloudinary-urlIn frontend/src/constants.jsx, set the backend server URL before running:
export const SERVER_URL = "http://localhost:3333";# Start the backend (from /backend)
npm run dev
# Start the frontend (from /frontend)
npm run devFrontend: http://localhost:5173
Backend: http://localhost:3333
To serve the frontend through the Express backend:
cd frontend
npm run build # outputs to ../backend/distdocker-compose up --buildThis starts the backend on port 3333 and the frontend on port 80.
| Route | Access |
|---|---|
GET /server/files |
Public |
GET /server/subjects |
Public |
GET /server/download |
Public |
GET /server/request-count |
Public |
GET /server/validate-token |
Token holder |
DELETE /server/delete |
Admin (JWT) |
GET /server/pending-requests |
Admin (JWT) |
POST /server/approve |
Admin (JWT) |
POST /server/admin_login |
Credential-based |
POST /server/addAdmin |
Super-admin password |
Socket.io upload events distinguish admin uploads (type: "upload", requires JWT) from public contributions (type: "contribute", requires email).
- Frontend: React 18, Vite, React Router DOM v6, Framer Motion, React PDF, Axios, Socket.io-client
- Backend: Node.js 22, Express, Mongoose (MongoDB), JWT, bcrypt, Multer, Socket.io, Axios
- Storage: Cloudinary cloud storage
- Deployment: Docker, Render
- Analytics: MongoDB-backed daily request counting
- API Layer: Express route handlers in
backend/app.js - Data Layer: Mongoose models in
backend/document.js,backend/admin.js,backend/contrbution.js,backend/requestCount.js - Auth Layer: JWT middleware (
authenticateJWT) protecting admin-only routes - Upload Layer: Socket.io chunked streaming to Cloudinary Cloud Storage with per-socket upload state
- Resource Module — Fetch, filter (branch/sem/subject/unit), download, and delete documents
- Contribution Module — Student submission flow, pending queue, admin approval/rejection
- Admin Module — JWT login, token validation, super-admin-controlled admin provisioning
- Upload Module — Chunked Socket.io streaming, GCS write streams, upload progress events
backend/
app.js # Express server, Socket.io, all route handlers
document.js # Mongoose model: uploaded resource documents
admin.js # Mongoose model: admin accounts
contrbution.js # Mongoose model: student contribution requests
requestCount.js # Mongoose model: daily request analytics
Dockerfile
frontend/
src/
pages/
Home.jsx # Landing page
Resources.jsx # Branch/semester selector
Contribute.jsx # Student contribution upload form
AdminPannel.jsx # Admin dashboard
SuperAdmin.jsx # Add-admin page (super admin only)
About.jsx
View.jsx # In-browser PDF viewer
Requests.jsx # Pending contribution requests (admin)
Upload.jsx # Admin file upload page
components/
Navbar.jsx
LoginDialog.jsx
ProgressMenu.jsx
AdminNavbar.jsx
...
fileexplorer.jsx # Subject/unit/file hierarchy browser
groups.jsx # Community groups
constants.jsx # SERVER_URL and other config
Dockerfile
docker-compose.yml
Run from each sub-directory:
# Frontend lint
cd frontend && npm run lint
# Frontend build
cd frontend && npm run build
# Backend start (no dedicated test suite yet)
cd backend && npm start- MongoDB Setup Guide
- MongoDB Migration Guide
- Implementation Summary
- API Reference
- Testing Suite Documentation
- Testing Status Report
- ✅ Resource discovery with multi-filter and cross-branch queries
- ✅ Student contribution flow with admin approval queue
- ✅ JWT-authenticated admin panel and super-admin provisioning
- ✅ Chunked Socket.io uploads to Cloudinary Cloud Storag
- ✅ Docker and Render deployment
- 🟡 Automated unit/integration test suite
- 📋 Rate limiting, input sanitisation hardening, and email notifications on contribution status changes
Contributions are welcome. Please keep changes aligned with:
- Existing module boundaries (
resources,contributions,admin,upload) - Mongoose schema conventions in the backend model files
- Root validation checks (
npm run lint,npm run buildinfrontend/) - Documentation updates for any behaviour changes