IMPORTANT — Gemini API Key Migration
Google AI Studio has deprecated legacy
AIza...Traffic Keys in favor of newAQ...Authentication Keys. Older models (gemini-2.0-flash,gemini-2.5-flash) return a 404 "model no longer available" error when called with a newAQkey.Fix: Use
gemini-3.5-flash(or anygemini-3.xmodel) and set your newAQ...key asGEMINI_API_KEYinserver/.env.
A full-stack web application built for engineering students to access question papers, placement records, a peer community, and AI-powered learning path recommendations — all in one place.
- Features
- Tech Stack
- Project Structure
- Getting Started
- Environment Variables
- API Reference
- Deployment
- Dashboard — Stats overview, recent activity, and quick access to all features
- Question Papers — Browse, filter, and download past exam papers (by year, semester, branch, exam type)
- Placement Records — View company-wise placement data, CTCs, required skills, interview questions, and student selections
- Community — Create posts (discussions, questions, achievements, resources, projects), like, comment, and get notified
- AI Recommendations — Personalized learning path suggestions powered by Google Gemini / Groq with rule-based fallback
- Profile — Avatar, cover photo, skills with proficiency levels, career goals, interests, and social links
- Dashboard — Platform-wide statistics
- Upload Papers — Upload question papers directly to Cloudinary
- Manage Placements — Full CRUD on placement records with interview Q&A
- Manage Users — View and manage all registered student accounts
- JWT authentication with role-based access (student / admin)
- Password reset via email token
- Real-time notifications via Socket.io
- Dark / light mode support
- Fully responsive — mobile-first design
| Technology | Purpose |
|---|---|
| React 19 + Vite | UI framework and build tool |
| React Router DOM 7 | Client-side routing |
| Tailwind CSS 4 | Styling |
| Axios | HTTP client |
| TanStack React Query | Server state management |
| Socket.io Client | Real-time communication |
| Lucide React | Icons |
| React Hot Toast | Toast notifications |
| Technology | Purpose |
|---|---|
| Node.js + Express | Server framework |
| MongoDB + Mongoose | Database and ODM |
| JWT | Authentication |
| bcryptjs | Password hashing |
| Cloudinary + Multer | File upload and cloud storage |
| Socket.io | Real-time events |
| Google Generative AI (Gemini) | AI recommendations |
| Groq SDK | Fallback LLM provider |
| Service | Purpose |
|---|---|
| MongoDB Atlas | Managed cloud database |
| Cloudinary | PDF and image storage |
| Vercel | Frontend hosting |
| Render | Backend hosting |
college-resource-platform/
├── client/ # React frontend
│ ├── public/
│ │ └── favicon.svg
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ └── community/ # Community-specific components
│ │ ├── context/ # React Context (Auth, Theme, Admin Auth)
│ │ ├── layout/ # DashboardLayout, AdminLayout
│ │ ├── pages/ # Full page components
│ │ ├── routes/ # Route definitions and guards
│ │ ├── services/ # Axios API service layer
│ │ └── utils/ # Helper utilities
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
│
└── server/ # Node.js backend
├── config/ # DB and Cloudinary config
├── controllers/ # Route handlers / business logic
├── middleware/ # Auth, admin middleware
├── models/ # Mongoose schemas
├── routes/ # Express route definitions
├── services/ # AI recommendation engine
├── data/ # Static data files
├── server.js # Entry point
└── package.json
- Node.js v18+
- MongoDB Atlas account (or local MongoDB)
- Cloudinary account
- Google Gemini API key (for AI recommendations)
git clone https://github.com/your-username/college-resource-platform.git
cd college-resource-platformcd server
npm installCreate a .env file in the /server directory (see Environment Variables).
npm run dev # Development with nodemon
# or
npm start # ProductionServer runs on http://localhost:5000
cd client
npm installCreate a .env file in the /client directory (see Environment Variables).
npm run dev # Development server
npm run build # Production buildFrontend runs on http://localhost:5173
PORT=5000
MONGODB_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/college-platform
JWT_SECRET=your_jwt_secret_key
CLIENT_URL=http://localhost:5173
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
GEMINI_API_KEY=your_google_gemini_api_key
GROQ_API_KEY=your_groq_api_keyVITE_API_URL=http://localhost:5000/api
VITE_SERVER_URL=http://localhost:5000Note for deployment: Set
VITE_API_URLto your Render backend URL with/apisuffix, e.g.https://your-app.onrender.com/api
| Method | Endpoint | Description |
|---|---|---|
| POST | /register |
Student registration |
| POST | /login |
Student login |
| POST | /logout |
Student logout |
| POST | /admin-login |
Admin login |
| POST | /admin-logout |
Admin logout |
| POST | /forgot-password |
Request password reset |
| POST | /reset-password |
Complete password reset |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get current user profile |
| PUT | / |
Update profile details |
| POST | /avatar |
Upload avatar image |
| POST | /cover |
Upload cover photo |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | / |
Student | Get all papers |
| GET | /filter |
Student | Filter papers by criteria |
| POST | /add |
Admin | Upload new paper |
| PUT | /update/:id |
Admin | Update paper metadata |
| DELETE | /delete/:id |
Admin | Delete paper |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | / |
Student | Get all placements |
| GET | /:id |
Student | Get placement detail |
| POST | / |
Admin | Create placement record |
| PUT | /:id |
Admin | Update placement |
| DELETE | /:id |
Admin | Delete placement |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all posts |
| POST | / |
Create a post |
| POST | /upload |
Upload post images |
| GET | /:id |
Get single post |
| PUT | /:id |
Update post |
| DELETE | /:id |
Delete post |
| POST | /:id/like |
Toggle like |
| Method | Endpoint | Description |
|---|---|---|
| POST | /:postId/comments |
Add comment to post |
| PUT | /:id |
Update comment |
| DELETE | /:id |
Delete comment |
| POST | /:id/like |
Toggle like on comment |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get user notifications |
| GET | /count |
Get unread count |
| DELETE | / |
Clear all notifications |
| DELETE | /:id |
Delete single notification |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get AI recommendations (cached or fresh) |
| POST | /refresh |
Force refresh recommendations |
| Method | Endpoint | Description |
|---|---|---|
| GET | /dashboard/stats |
Platform-wide statistics |
| GET | /users |
All users with pagination |
| GET | /users/:userId |
Single user detail |
- Connect your GitHub repo to Vercel
- Set root directory to
client/ - Build command:
npm run build - Output directory:
dist/ - Add environment variables:
VITE_API_URL=https://your-backend.onrender.com/api VITE_SERVER_URL=https://your-backend.onrender.com
A vercel.json is already present in /client configured for SPA routing rewrites.
- Connect your GitHub repo to Render
- Root directory:
server/ - Build command:
npm install - Start command:
npm start - Add all server environment variables listed above
Cold start: Render free tier spins down after 15 minutes of inactivity. The first request may take 1-2 minutes to respond. Use cron-job.org to ping your API URL every 10 minutes to keep the server warm.
MIT