An AI-powered learning assistant with contextual side chats, intelligent summaries, and PDF export for seamless study sessions.
- Smart Chat: AI-driven Q&A using Google Gemini API with markdown support
- Side Chat Panel: Highlight any text and ask follow-ups in the side chat without disrupting the flow of main chat or losing context
- Session Summaries: Generate and review AI-crafted summaries of your chats
- PDF Export: Download professional study reports (main + side chats)
- User Profiles: Persistent accounts, chat history, and personalized settings
- Admin Dashboard: Manage users, monitor analytics, and oversee chat activity
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS |
| Realtime | Socket.io Client |
| Backend | Node.js, Express.js |
| Database | MongoDB, Mongoose |
| AI Engine | Google Gemini API |
| Auth | JWT, bcrypt |
-
Clone Repo
git clone https://github.com/ashokkumar.272/StudyGenie.git cd StudyGenie -
Backend Setup
cd backend npm install cp .env.example .env npm run dev -
Frontend Setup
cd ../frontend npm install npm run dev -
Open
http://localhost:5173to use the app
Copy .env.example to .env in backend folder and fill in:
MONGODB_URI=<your_mongo_uri>
JWT_SECRET=<your_jwt_secret>
GEMINI_API_KEY=<your_gemini_api_key>
PORT=5000
FRONTEND_URL=http://localhost:5173
Main AI chat interface with markdown responses
- Integrated Google Gemini API for advanced AI responses
- Managed Socket.io for real-time, context-aware messaging
- Built dynamic PDF generation combining main and side chats
StudyGenie/
├── backend/
│ ├── controllers/ # Business logic modules
│ ├── middleware/ # JWT auth and error handlers
│ ├── models/ # Mongoose schemas
│ ├── routes/ # Express route definitions
│ └── index.js # Server entry with Socket.io setup
├── frontend/
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # UI elements
│ │ ├── context/ # React Context providers
│ │ ├── hooks/ # Custom hooks (useAuth, useChat)
│ │ └── App.jsx # Main application component
│ └── vite.config.js # Vite config
├── .env.example # Sample environment variables
├── package.json
└── README.md
POST /api/auth/register— Register a new userPOST /api/auth/login— Login and receive JWTGET /api/auth/me— Get current user profile
POST /api/chat/message— Send main chat messagePOST /api/chat/side-message— Send side chat messageGET /api/chat/history/:sessionId— Fetch entire session
POST /api/chat/generate-summary— Create session summaryPOST /api/chat/export-pdf— Generate and download PDFGET /api/chat/summaries/:userId— List all summaries
GET /api/admin/users— List all users (admin only)GET /api/admin/stats— Platform analytics (admin only)
Socket.io Events: connection, join, message, sideMessage, disconnect
- Fork the repo
- Create a branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add feature') - Push (
git push origin feature/your-feature) - Open a Pull Request
ISC License — see package.json for details.