You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Star0 (0)You must be signed in to star a repository
About
AI StudyBuddy is an AI-powered backend for smarter learning. Built with Node.js, Express.js & MongoDB, integrated with Google Gemini AI to summarize notes, generate flashcards & quizzes, and create personalized study plans.secured with JWT,RBAC and bcryptjs.
Tokens are stored in HTTP-only cookies (accessToken expires in 15m, refreshToken in 7d)
Material Routes — /api/materials(requires login)
Method
Endpoint
Body / Notes
Description
POST
/upload
Form-data: file + optional title
Upload study material
GET
/
—
List your materials
GET
/:id
—
Get one material
DELETE
/:id
—
Delete material
POST
/:id/summarize
—
AI summarize
POST
/:id/flashcards
{ count: 5 }
Generate flashcards
POST
/:id/quiz
{ count: 5 }
Generate MCQ quiz
POST
/:id/study-plan
{ goal, hoursPerDay, days }
Personalized study plan
Admin Routes — /api/admin(admin role only)
Method
Endpoint
Description
GET
/users
List all users
DELETE
/users/:id
Delete user + their materials
GET
/stats
Total users & materials count
Cookie Details
Cookie
Expiry
Flags
accessToken
15 min
httpOnly, sameSite=strict
refreshToken
7 days
httpOnly, sameSite=strict
In production, both cookies have secure: true.
About
AI StudyBuddy is an AI-powered backend for smarter learning. Built with Node.js, Express.js & MongoDB, integrated with Google Gemini AI to summarize notes, generate flashcards & quizzes, and create personalized study plans.secured with JWT,RBAC and bcryptjs.