How jeeya8127/hactober_dev_challenge1 works
StudyBuddy is a React study workspace backed by an Express API. The main workflow accepts pasted notes or PDF text, then supports AI summaries, quizzes, and note-based Q&A; users can save sessions and quiz attempts for later review. The graph preserves these distinct capabilities and the session-storage layer. Source excerpts show the PDF, quiz, chat, session, and server wiring; README statements document the broader frontend/API, AI-provider, and database architecture. Some route/controller and summary/AI links are supported by the source index rather than full excerpts.
Main entry points: server.js Express Server · App.jsx Study Workspace · aiService.js AI Study Service · api.js Frontend API Client
Components 23
Study Workspace
- Study Workspace
frontend/src/App.jsx - Notes and PDF Input
frontend/src/components/NotesInput.jsx - Summary View
frontend/src/components/Summary.jsx - Frontend API Client
frontend/src/services/api.js
API and Processing
- Express Server
backend/server.js - Session Routes
backend/routes/notesRoutes.js - PDF Route
backend/routes/pdfRoutes.js - Chat Route
backend/routes/chatRoutes.js - Summary Route
backend/routes/summaryRoutes.js - Quiz Route
backend/routes/quizRoutes.js - PDF Controller
backend/controllers/pdfController.js - PDF Text Extraction
backend/services/pdfService.js - Error Middleware
backend/middleware/errorMiddleware.js
AI Study Features
- Chat Controller
backend/controllers/chatController.js - Summary Controller
backend/controllers/summaryController.js - Quiz Controller
backend/controllers/quizController.js - AI Study Service
backend/services/aiService.js
Study History
- Session Controller
backend/controllers/notesController.js - Study Session Model
backend/models/StudySession.js - Database Connection
backend/config/db.js
Other components
- Student
- Hugging Face Router
- MongoDB Atlas
Connections 25
- Student → Study Workspace: uses
README.md - Study Workspace → Notes and PDF Input: renders
frontend/src/App.jsx - Study Workspace → Summary View: renders
frontend/src/App.jsx - Study Workspace → Frontend API Client: calls
frontend/src/App.jsx - Frontend API Client → Express Server: REST requests
README.md - Express Server → Session Routes: mounts
backend/server.js - Express Server → PDF Route: mounts
backend/server.js - Express Server → Chat Route: mounts
backend/server.js - Express Server → Summary Route: mounts
backend/server.js - Express Server → Quiz Route: mounts
backend/server.js - Express Server → Error Middleware: uses
backend/server.js - Session Routes → Session Controller: routes to
backend/routes/notesRoutes.js - PDF Route → PDF Controller: routes to
backend/routes/pdfRoutes.js - Chat Route → Chat Controller: routes to
backend/routes/chatRoutes.js - Summary Route → Summary Controller: routes to
backend/routes/summaryRoutes.js - Quiz Route → Quiz Controller: routes to
backend/routes/quizRoutes.js - PDF Controller → PDF Text Extraction: extracts text
backend/controllers/pdfController.js - Chat Controller → AI Study Service: requests answers
backend/controllers/chatController.js - Summary Controller → AI Study Service: requests summaries
backend/controllers/summaryController.js - Quiz Controller → AI Study Service: requests quizzes
backend/controllers/quizController.js - AI Study Service → Hugging Face Router: generates with
backend/services/aiService.js - Session Controller → Study Session Model: reads and writes
backend/controllers/notesController.js - Study Session Model → MongoDB Atlas: persists sessions
README.md - Express Server → Database Connection: connects
backend/server.js - Database Connection → MongoDB Atlas: connects to
README.md