{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b0f6bef1-a613-4f01-800f-f5b03230ac5b","name":"Learnify-AI backend","description":"🚀 Learnify AI — Backend API\n\n💡 Problem Statement\n\nTraditional learning platforms are passive — students watch lectures but struggle to:\n\n- Retain concepts\n    \n- Practice effectively\n    \n- Resolve doubts instantly\n    \n\nThis creates a gap between content consumption and actual understanding.\n\n---\n\n🧠 Solution\n\nLearnify AI transforms passive learning into an interactive experience by integrating AI directly into the learning flow.\n\nIt provides:\n\n- AI-generated structured notes\n    \n- Auto-generated quizzes for practice\n    \n- Context-aware doubt solving chatbot\n    \n\nAll powered by lecture content.\n\n---\n\n⚡ What Makes It Unique\n\nUnlike traditional LMS platforms:\n\n- AI responses are context-aware (based on lecture content)\n    \n- Doubt solving supports conversation continuity\n    \n- Structured outputs (JSON) ensure frontend-ready responses\n    \n- Optimized for performance and cost efficiency\n    \n\n---\n\n🌐 Base URL\n\n[https://learnify-ai-backend-zqws.onrender.com/api/v1](https://learnify-ai-backend-zqws.onrender.com/api/v1)\n\n---\n\n🔐 Authentication\n\nJWT-based authentication is used.\n\nUsage:\n\n1. Login/Register\n    \n2. Get token\n    \n3. Pass in headers:\n    \n\nAuthorization: Bearer {{token}}\n\n---\n\n👥 User Roles & Access Control\n\nRole| Capabilities  \nStudent| Enroll, access lectures, use AI features  \nTeacher| Create/manage courses, chapters, lectures  \nAdmin| Full system control\n\n---\n\n📦 API Modules\n\nLearnify AI Backend  \n│  \n├── Authentication  \n├── Courses  \n├── Chapters  \n├── Lectures  \n├── Enrollment  \n└── AI Features\n\n---\n\n🤖 AI Features\n\nGenerate Notes\n\nTransforms lecture description into:\n\n- Key points\n    \n- Summary\n    \n- Explanation\n    \n- Important terms\n    \n\n---\n\nGenerate Quiz\n\n- Generates 5 MCQs\n    \n- Each with 4 options\n    \n- Based strictly on lecture content\n    \n\n---\n\nSolve Doubt\n\n- Context-aware chatbot\n    \n- Uses lecture content + recent chat history\n    \n- Returns structured JSON response\n    \n\n---\n\n⚙️ Engineering Decisions\n\n- Strict JSON AI output  \n    Ensures predictable parsing and frontend compatibility\n    \n- Context-limited chat history  \n    Prevents excessive token usage and reduces API cost\n    \n- Caching (last doubt/answer)  \n    Improves performance and reduces redundant AI calls\n    \n- Middleware-based authorization  \n    Clean separation of access control logic\n    \n- Modular architecture  \n    Scalable and maintainable codebase\n    \n\n---\n\n⚙️ Rate Limiting\n\nType| Limit  \nGeneral API| 100 requests/hour  \nAI Routes| 20 requests/hour\n\nImplemented to prevent abuse and control infrastructure cost.\n\n---\n\n🚀 Scalability Considerations\n\n- Separation of concerns (routes, controllers, models)\n    \n- AI module can be extracted into a microservice\n    \n- Token usage optimized via prompt trimming and chat history limiting\n    \n- Easily extendable for:\n    \n    - Streaming responses\n        \n    - Multi-model support\n        \n\n---\n\n⚠️ Error Handling\n\nStandardized error format:\n\n{  \n\"status\": \"fail\",  \n\"message\": \"Error message\"  \n}\n\n---\n\n🧪 Testing Flow\n\n1. Register/Login → get token\n    \n2. Add token to environment\n    \n3. Test based on roles:\n    \n    - Student → AI features, enrollment\n        \n    - Teacher → create courses/lectures\n        \n    - Admin → delete/manage resources\n        \n\n---\n\n🏁 Final Note\n\nLearnify AI is a production-ready backend system designed to:\n\n- Enhance student learning with AI\n    \n- Maintain scalability and performance\n    \n- Deliver structured, reliable API responses","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"52541629","team":13693062,"collectionId":"b0f6bef1-a613-4f01-800f-f5b03230ac5b","publishedId":"2sBXiqFUzp","public":true,"publicUrl":"https://documenter-api.postman.tech/view/52541629/2sBXiqFUzp","privateUrl":"https://go.postman.co/documentation/52541629-b0f6bef1-a613-4f01-800f-f5b03230ac5b","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"A production-ready EdTech backend system featuring AI-powered note generation, quiz creation, and contextual doubt solving using Gemini API. Built with secure role-based access, enrollment validation, and intelligent caching for scalable learning experiences."},{"name":"title","value":"Learnify AI — AI-Powered EdTech Backend (Notes, Quiz &amp; Doubt Solver APIs)"}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2026-04-06T14:01:51.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Learnify AI — AI-Powered EdTech Backend (Notes, Quiz &amp; Doubt Solver APIs)","description":"A production-ready EdTech backend system featuring AI-powered note generation, quiz creation, and contextual doubt solving using Gemini API. Built with secure role-based access, enrollment validation, and intelligent caching for scalable learning experiences."},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"Prod ED-tech","id":"ec2e38af-6164-4706-8b9c-b2c0da00d54c","owner":"52541629","values":[{"key":"URL","value":"","enabled":true,"type":"default"},{"key":"token","value":"","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/d9a6fa040dbdcd9f7a6edeaa0dfbe0093b2c105fa919cfd3b426a45a580fa97c","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Prod ED-tech","value":"52541629-ec2e38af-6164-4706-8b9c-b2c0da00d54c"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sBXiqFUzp"}