Learnix is a lightweight learning-content sharing and collaboration platform built with Next.js, React and MongoDB. It focuses on easy uploads, searchable study materials, and a small activity feed called "Updates" so contributors and students can stay informed.
Demo: (run locally) — see Quick Start below.
Key Concepts & Highlights
- Upload & Works: Students and contributors can upload works (notes, PDFs, question papers) and manage subjects/topics.
- Study Materials: Curated materials and question papers organized by subject.
- TextShare Tool: Small in-browser editor for creating and saving short text snippets (My Codes/localStorage support).
- Chunked Upload (frontend): A client-side chunked uploader (100KB chunks) to handle large files more reliably.
- Updates Activity Feed: Create/read/edit/delete short updates to announce new materials or changes.
- Notifications & Reviews: In-app notifications and review flows for works and submissions.
Tech Stack
- Next.js (App Router)
- MongoDB (via Mongoose)
- Cloudinary (media hosting integration)
- Plain CSS modules under
src/app/.../styles
Repository Overview
src/app/— All Next.js pages and client componentssrc/app/api/— Next.js API routes (Mongoose + business logic)src/models/— Mongoose models (User, Work, Update, etc.)src/lib/— Helpers (Cloudinary, DB connection, utils)public/— Static assets
Sidebar Navigation (Available Routes)
These are the primary navigation routes shown in the left sidebar of the app. Use them to explore the app when running locally:
/dashboard— Dashboard (home for authenticated users)/login— Login / Register/search— Search (users, works, topics)/learn— Learn (structured study content)/works— Uploaded Works (browse uploaded student works)/upload— Upload (add new subjects/topics/works; includes Updates banner)/upload/updates— Manage Updates (create / edit / delete updates)
/materials— Study Materials/qp— Question Papers/tools— Tools (TextShare, WordToPdf, converters)/feedback— User Feedback form/help— Help & Guides/about— About the project/profile— User Profile (change name/password, profile image)
Tip: the sidebar shows or hides items based on authentication state (localStorage USN).
Important Features (Detailed)
- Updates: A small activity feed to announce new topics, created subjects, or admin messages. Backed by a Mongoose
Updatemodel and API endpoints:GET /api/updates,POST /api/updates,POST /api/updates/edit,POST /api/updates/delete. - Chunked Upload (frontend):
src/app/test/ChunkUploader.jsdemonstrates splitting large files into 100KB chunks; backend endpoints for chunk merge/upload are TODO. - TextShare: lightweight editor with localStorage support, 'My Codes' saving, and full-screen editing with keyboard shortcuts.
Quick Start (development)
- Install dependencies
npm install- Configure environment
- Copy
.env.example(if present) to.envand set MongoDB URI, Cloudinary keys and other secrets.
- Run the dev server
npm run dev- Open in browser
Visit http://localhost:3000
Useful NPM Scripts
npm run dev— Start Next.js in developmentnpm run build— Build for productionnpm run start— Start production server (after build)
Developer Notes
- Auth model currently relies on a localStorage
usnvalue to resolve a server-sideuserIdthroughGET /api/user/id?usn=. Consider adding JWT/session-based auth for production. - Chunked upload backend endpoints are planned but not yet implemented. Frontend chunk splitting exists.
- Form styling and components use standard CSS files under
src/app/.../styles. A recent addition:AddUpdateForm.css(for the Updates manager) — ensureAddUpdateForm.jsimports it.
Tags
Contributing
- Fork the project, create a feature branch, and send a PR. Include clear descriptions for feature additions or bug fixes.
- Run the dev server and ensure style and linting are consistent with the existing code.
License
This repository does not include a license file by default. Add one (for example, MIT) if you want to make the project explicitly open-source.
If you'd like, I can also:
- Generate a fully styled HTML README in
docs/so you can open it in a browser. - Add badges for build status or dependencies.
Happy hacking — ask me to run tests, format code, or generate the browsable HTML README.