Features • Demo • Installation • Tech Stack • Documentation
UniPrep Copilot is an intelligent academic companion that leverages AI to help university students excel in their studies. Upload your syllabus, past papers, and notes—then let AI generate personalized study materials, exam prep resources, and revision plans tailored to your university, branch, and answer style preferences.
- University-Aware Context: Specify university, college, branch, semester, and subjects
- Smart Content Upload: Upload syllabus PDFs, past year papers, notes, and reference materials
- Context-Driven Generation: AI analyzes your uploaded materials for accurate, relevant content
- Study Notes: Auto-generate comprehensive notes from topics
- Academic Reports: Create well-structured reports with proper formatting
- PPT Content: Generate presentation-ready slide content
- Exam Blueprints: Strategic exam preparation roadmaps
- Revision Planners: Time-based revision schedules aligned with exam dates
- Rapid Revision Sheets: Quick-reference study materials
- Mock Papers: AI-generated practice papers based on PYQs
- Answer Style Profiles: Create custom writing styles (concise, detailed, academic, etc.)
- Style Templates: Choose from preset styles or build your own
- Adaptive Formatting: Tone, structure, and word count customization
- Content Sharing: Share and discover study materials from peers
- Discussion Forums: Engage with fellow students
- Upvote/Downvote System: Community-curated content quality
- Study Analytics: Track study time, topics covered, and progress
- Quiz System: Test your knowledge with auto-generated quizzes
- Focus Mode: Distraction-free study sessions with timer
- Study Streaks: Maintain daily study momentum
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- MongoDB Atlas account - Sign up
- OpenRouter API Key - Get API Key
-
Clone the repository
git clone https://github.com/yourusername/uniprep-copilot.git cd uniprep-copilot -
Install dependencies
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install cd ..
-
Configure Environment Variables
Backend - Create
backend/.env:PORT=5000 NODE_ENV=development # MongoDB MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/uniprep?retryWrites=true&w=majority # JWT Configuration JWT_SECRET=your-super-secret-jwt-key-min-32-chars JWT_REFRESH_SECRET=your-refresh-secret-key-min-32-chars JWT_ACCESS_EXPIRES_IN=15m JWT_REFRESH_EXPIRES_IN=7d # OpenRouter AI OPENROUTER_API_KEY=sk-or-v1-your-api-key-here OPENROUTER_BASE_URL=https://openrouter.ai/api/v1 OPENROUTER_MODEL=openai/gpt-4o-mini # URLs BACKEND_URL=http://localhost:5000 CLIENT_URL=http://localhost:5173 # Cloudinary (optional - for image uploads) CLOUDINARY_CLOUD_NAME=your-cloud-name CLOUDINARY_API_KEY=your-api-key CLOUDINARY_API_SECRET=your-api-secret
Frontend - Create
frontend/.env:VITE_API_URL=http://localhost:5000/api
-
Start Development Servers
Option 1: Run both servers separately
# Terminal 1 - Backend cd backend npm run dev # Terminal 2 - Frontend cd frontend npm run dev
-
Access the Application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000/api
| Technology | Version | Purpose |
|---|---|---|
| React | 19.2 | UI Framework |
| Vite | 7.0 | Build Tool |
| Tailwind CSS | 3.4 | Styling |
| React Router | 7.10 | Routing |
| Zustand | 5.0 | State Management |
| Axios | 1.13 | HTTP Client |
| Lucide React | 0.561 | Icons |
| Recharts | 3.5 | Charts & Analytics |
| Technology | Version | Purpose |
|---|---|---|
| Node.js | 18+ | Runtime |
| Express.js | 4.18 | Web Framework |
| MongoDB | 8.0 | Database |
| Mongoose | 8.0 | ODM |
| OpenRouter | SDK 0.2 | AI Integration |
| JWT | 9.0 | Authentication |
| Bcrypt | 2.4 | Password Hashing |
| Multer | 1.4 | File Uploads |
| PDF Parse | 1.1 | PDF Extraction |
- OpenRouter: Multi-model AI gateway (GPT-4, Claude, Gemini, etc.)
- Cloudinary: Media management (optional)
uniprep-copilot/
├── backend/
│ ├── config/
│ │ ├── db.js # MongoDB connection
│ │ └── cloudinaryConfig.js # Cloudinary setup
│ ├── controllers/
│ │ ├── authController.js # Authentication logic
│ │ ├── userController.js # User management
│ │ ├── subjectController.js # Subject CRUD
│ │ ├── contextController.js # Context upload/management
│ │ ├── styleController.js # Answer style profiles
│ │ ├── contentController.js # Content generation
│ │ ├── examController.js # Exam prep features
│ │ ├── quizController.js # Quiz system
│ │ ├── sessionController.js # Study sessions
│ │ └── communityController.js # Community features
│ ├── middleware/
│ │ └── auth.js # JWT verification
│ ├── models/
│ │ ├── User.js # User schema
│ │ ├── Subject.js # Subject schema
│ │ ├── Context.js # Uploaded context schema
│ │ ├── AnswerStyle.js # Style profile schema
│ │ ├── GeneratedContent.js # AI content schema
│ │ ├── ExamPlan.js # Exam blueprint schema
│ │ ├── Quiz.js # Quiz schema
│ │ ├── Session.js # Study session schema
│ │ └── Community*.js # Community schemas
│ ├── routes/
│ │ ├── auth.js # Auth endpoints
│ │ ├── users.js # User endpoints
│ │ ├── subjects.js # Subject endpoints
│ │ ├── context.js # Context endpoints
│ │ ├── styles.js # Style endpoints
│ │ ├── content.js # Content generation endpoints
│ │ ├── exam.js # Exam endpoints
│ │ ├── quiz.js # Quiz endpoints
│ │ ├── sessions.js # Session endpoints
│ │ └── community.js # Community endpoints
│ ├── services/
│ │ └── aiOrchestrator.js # AI prompt engineering & API calls
│ ├── utils/
│ │ └── generateToken.js # JWT utilities
│ ├── .env.sample # Environment template
│ ├── package.json
│ └── server.js # Express app entry point
│
├── frontend/
│ ├── public/
│ │ ├── logo.png # App logo
│ │ ├── Home.png # Landing page screenshot
│ │ ├── SignUp.png # Auth screenshot
│ │ └── Dashboard.png # Dashboard screenshot
│ ├── src/
│ │ ├── components/
│ │ │ ├── common/
│ │ │ │ └── PrivateRoute.jsx # Route protection
│ │ │ ├── layout/
│ │ │ │ ├── Header.jsx # Top navigation
│ │ │ │ ├── Sidebar.jsx # Side navigation
│ │ │ │ ├── Footer.jsx # Footer component
│ │ │ │ └── Layout.jsx # Layout wrapper
│ │ │ ├── content/
│ │ │ │ ├── ContextManager.jsx # Upload/manage contexts
│ │ │ │ ├── NotesGenerator.jsx # Notes generation UI
│ │ │ │ ├── ReportGenerator.jsx # Report generation UI
│ │ │ │ ├── PPTGenerator.jsx # PPT generation UI
│ │ │ │ └── ContentList.jsx # List generated content
│ │ │ └── exam/
│ │ │ ├── ExamMode.jsx # Exam prep hub
│ │ │ ├── BlueprintView.jsx # Blueprint display
│ │ │ ├── PlannerView.jsx # Planner display
│ │ │ ├── RapidSheetsGenerator.jsx # Rapid sheets
│ │ │ └── MockPaperGenerator.jsx # Mock paper gen
│ │ ├── pages/
│ │ │ ├── Landing.jsx # Landing page
│ │ │ ├── Login.jsx # Auth page
│ │ │ ├── Dashboard.jsx # Main dashboard
│ │ │ ├── Subjects.jsx # Subject management
│ │ │ ├── SubjectWorkspace.jsx # Subject detail view
│ │ │ ├── Styles.jsx # Style profiles
│ │ │ ├── Community.jsx # Community feed
│ │ │ ├── PostDetail.jsx # Post detail view
│ │ │ ├── FocusMode.jsx # Focus study mode
│ │ │ ├── ContentView.jsx # Content viewer
│ │ │ └── Profile.jsx # User profile
│ │ ├── services/
│ │ │ └── api.js # Axios instance & interceptors
│ │ ├── store/
│ │ │ └── authStore.js # Zustand auth store
│ │ ├── App.jsx # App router
│ │ ├── main.jsx # React entry point
│ │ └── index.css # Global styles
│ ├── .env.sample
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── tailwind.config.js
│ └── vite.config.js
│
├── LICENSE.md
└── README.md
POST /api/auth/register- Register new userPOST /api/auth/login- User loginPOST /api/auth/refresh- Refresh access tokenGET /api/auth/me- Get current user
GET /api/subjects- List all subjectsPOST /api/subjects- Create subjectGET /api/subjects/:id- Get subject detailsPUT /api/subjects/:id- Update subjectDELETE /api/subjects/:id- Delete subject
POST /api/context/upload- Upload context files (PDF, text)GET /api/context- List all contextsGET /api/context/search- Search contextsDELETE /api/context/:id- Delete context
POST /api/content/notes- Generate study notesPOST /api/content/report- Generate academic reportPOST /api/content/ppt- Generate PPT contentGET /api/content- List generated contentDELETE /api/content/:id- Delete content
POST /api/exam/blueprint- Generate exam blueprintPOST /api/exam/planner- Create revision plannerPOST /api/exam/rapid-sheets- Generate rapid revision sheetsPOST /api/exam/mock-paper- Generate mock paper
GET /api/styles- List all stylesPOST /api/styles- Create new stylePUT /api/styles/:id- Update styleDELETE /api/styles/:id- Delete stylePUT /api/styles/:id/default- Set default style
GET /api/community/posts- Get all postsPOST /api/community/posts- Create postPOST /api/community/posts/:id/vote- Vote on postPOST /api/community/posts/:id/comment- Comment on post
{
name: String,
email: String (unique),
password: String (hashed),
university: String,
college: String,
branch: String,
semester: Number,
subjects: [ObjectId],
activeStyle: ObjectId,
examDates: [{ subject, date }],
studyStreak: Number,
createdAt: Date
}{
user: ObjectId,
name: String,
code: String,
semester: Number,
credits: Number,
examDate: Date,
contexts: [ObjectId]
}{
user: ObjectId,
subject: ObjectId,
type: String, // 'syllabus', 'pyq', 'notes', 'reference'
title: String,
content: String,
fileUrl: String,
metadata: Object
}{
user: ObjectId,
subject: ObjectId,
type: String, // 'notes', 'report', 'ppt', etc.
title: String,
content: String,
style: ObjectId,
contexts: [ObjectId],
createdAt: Date
}- Sign up and complete your profile
- Add subjects for your current semester
- Upload contexts (syllabus, PYQs, notes)
- Create or select an answer style profile
- Navigate to a subject workspace
- Select content type (Notes/Report/PPT)
- Choose relevant contexts
- Specify topics or let AI auto-extract
- Generate and review content
- Save or export for later use
- Set exam dates in subject settings
- Generate exam blueprint for strategic overview
- Create revision planner with time allocation
- Generate rapid revision sheets for quick review
- Practice with AI-generated mock papers
- Select content to study
- Set timer duration
- Enter distraction-free full-screen mode
- Track study time automatically
| Variable | Description | Example |
|---|---|---|
MONGO_URI |
MongoDB connection string | mongodb+srv://... |
JWT_SECRET |
JWT signing secret (min 32 chars) | your-secret-key |
OPENROUTER_API_KEY |
OpenRouter API key | sk-or-v1-... |
| Variable | Description | Default |
|---|---|---|
PORT |
Backend server port | 5000 |
NODE_ENV |
Environment mode | development |
OPENROUTER_MODEL |
AI model to use | openai/gpt-4o-mini |
CLOUDINARY_* |
Cloudinary credentials | N/A |
1. MongoDB Connection Failed
Error: Could not connect to MongoDB- Verify
MONGO_URIis correct - Check MongoDB Atlas IP whitelist
- Ensure network connectivity
2. OpenRouter API Errors
Error: Invalid API key- Verify API key is correct and active
- Check account credits on OpenRouter
- Ensure
OPENROUTER_API_KEYis set in.env
3. Frontend Can't Connect to Backend
Error: Network Error- Verify backend is running (
npm run devin backend folder) - Check
VITE_API_URLin frontend.env - Ensure CORS is configured correctly
4. File Upload Issues
Error: File too large- Backend has 50MB upload limit
- Check file size and format (PDF recommended)
- Ensure
multermiddleware is properly configured
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow ESLint configuration
- Write meaningful commit messages
- Add comments for complex logic
- Update documentation for new features
- Test thoroughly before submitting PR
This project is licensed under the MIT License - see the LICENSE.md file for details.
Thanks to these wonderful people who have contributed to this project:
Your Name Project Lead |
- Fork the repository
- Add your details in the Contributors table above:
<td align="center"> <a href="https://github.com/your-username"> <img src="https://github.com/your-username.png" width="100px;" alt="Your Name"/> <br /> <sub><b>Your Name</b></sub> </a> <br /> <sub>Your Role/Contribution</sub> </td>
- Create a Pull Request
- OpenRouter for AI infrastructure
- MongoDB for database solutions
- React and Vite teams for excellent tooling
- Tailwind CSS for styling framework
- All contributors and testers
<<<<<<< HEAD
=======
4db8516 (resolve the loading issue)
Made with ❤️ for students, by students


