KnowMo is a community-driven academic resource platform for university students. It helps students discover department-wise subjects, open subject pages, browse shared study materials, and take practice tests generated from stored question banks and Gemini-powered MCQ generation flows.
The project is split into:
- a
Next.jsfrontend in the repo root - an
Express + MongoDBbackend insideserver/
KnowMo is designed to make study content easier to find and share.
Core user-facing features:
- browse all departments
- open a department to view its subjects
- open a subject to access notes, PYQs, assignments, labs, and other files
- filter subject resources by type and search keyword
- take practice tests for a subject using saved MCQs
- request a missing department or subject
- send messages through the contact form
- explore recent updates and featured content
Core backend/admin-facing capabilities:
- create departments
- create subjects under departments
- add resources to subjects
- store and retrieve contact submissions
- store and review department/subject requests
- generate and store MCQs for subjects
The main workflow in KnowMo is:
- A student lands on the home page and navigates to
Departments. - The app fetches department data from the backend.
- The student opens a department page to view all subjects for that branch and year.
- The app fetches subjects using the department code.
- The student opens a subject page to view all uploaded resources.
- The subject page groups learning materials by resource type such as notes, PYQs, assignments, labs, and others.
- The student can open the practice test page for that subject.
- The backend returns saved MCQs, or can generate MCQs through the Gemini workflow for supported flows.
- If a department or subject is missing, the student can submit a request form.
KnowMo/
|-- src/app/ # Next.js app router pages
|-- components/ # Reusable frontend UI and feature components
|-- assets/ # Static images and visual assets
|-- lib/ # Shared frontend helpers
|-- public/ # Public static files
|-- server/
| |-- src/
| | |-- controllers/ # Route handlers and business logic
| | |-- models/ # Mongoose models
| | |-- routes/ # Express route definitions
| | |-- services/ # Gemini and MCQ generation services
| | |-- config/ # Backend config helpers
| | |-- app.ts # Express app setup
| | |-- server.ts # Backend entry point
| |-- uploads/ # Temporary uploaded files for image-based generation
|-- package.json # Frontend scripts and dependencies
|-- README.md
Frontend:
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS 4
- Framer Motion
- Lucide React
Backend:
- Express 5
- MongoDB with Mongoose
- TypeScript
- Multer
- JWT
- Google Gemini via
@google/genai
Frontend pages:
/- home page/about- project story and contact form/departments- all departments/departments/[department]- subjects for one department/subject?subjectCode=...- subject resource page/subject/test/[subjectCode]- practice test page/explore- updates and discovery page
Backend API routes:
GET /api/department- list departmentsPOST /api/department- create a departmentGET /api/subject/:departmentCode- list subjects for a departmentPOST /api/subject- create a subjectGET /api/resource/:subjectCode- get subject details and resourcesPOST /api/resource- add a resourceGET /api/resource/mcqs/:subjectCode- get saved MCQsPOST /api/resource/mcqs- add MCQs to a subjectPOST /api/resource/test/mcqs/:subjectCode- generate MCQs with prompt or image inputGET /api/search?q=...- search departments and subjectsGET /api/updates/latest- latest updatesPOST /api/contact- submit contact formGET /api/contact- list contact messagesPOST /api/requests/department- request a new departmentPOST /api/requests/subject- request a new subjectGET /api/requests- list submitted requestsPOST /api/user/signup- create user account
The frontend uses:
NEXT_PUBLIC_CLIENT_BASE_URL=http://localhost:5000This value is used by the Next.js app when it fetches backend data.
The backend expects these values:
PORT=5000
MONGODB_URL=your_mongodb_connection_string
CLIENT_URL=http://localhost:3000
JWT_SECRET=your_jwt_secret
GEMINI_API_KEY=your_gemini_api_keyNotes:
PORTshould usually be5000so it matches the frontend base URL.CLIENT_URLis used by the backend CORS config.GEMINI_API_KEYis required for Gemini-based MCQ generation.
From the repo root:
npm installFrom the backend folder:
cd server
npm installCreate or update:
.envin the repo root.envinsideserver/
Recommended local setup:
- frontend on
http://localhost:3000 - backend on
http://localhost:5000
From server/:
npm run devOr from the repo root:
npm run serverFrom the repo root:
npm run devVisit:
http://localhost:3000
Frontend:
npm run build
npm run start
npm run lintBackend:
cd server
npm run build
npm run startUse two terminals:
Terminal 1:
cd server
npm run devTerminal 2:
npm run devThis gives you:
- backend API on
http://localhost:5000 - frontend app on
http://localhost:3000
Department flow:
- frontend calls
GET /api/department - backend returns department records from MongoDB
Subject flow:
- frontend calls
GET /api/subject/:departmentCode - backend returns subjects linked to that department
Resource flow:
- frontend calls
GET /api/resource/:subjectCode - backend returns subject details, department info, and all linked resources
Request flow:
- frontend submits a department or subject request
- backend validates and stores the request in MongoDB
Contact flow:
- frontend submits the contact form
- backend stores the message in MongoDB
Test flow:
- frontend opens
/subject/test/[subjectCode] - backend returns saved MCQs for that subject
- Gemini-backed services can generate new MCQs for supported endpoints
- The frontend and backend are separate apps and must both be running for full functionality.
- The frontend expects the backend URL from
NEXT_PUBLIC_CLIENT_BASE_URL. - The backend default code falls back to port
3000, but this project should use5000locally to avoid conflicting with Next.js. - Image uploads for test generation are stored temporarily in
server/uploads/. - MongoDB must be available before most pages can load real data.
The project already has a solid structure for a student resource platform. Some useful next steps would be:
- add a root script that starts frontend and backend together with
concurrently - add seed scripts for departments, subjects, and demo resources
- add API documentation or Swagger
- add tests for controllers and key UI flows
- add role-based admin flows for managing resources and requests
- add deployment instructions for frontend and backend environments
KnowMo is a full-stack student knowledge-sharing platform focused on discoverability, collaboration, and exam preparation. The frontend delivers the browsing and learning experience, while the backend manages academic entities, resources, student requests, contact messages, and MCQ generation workflows.