ClassBuddy is a comprehensive full-stack web application designed to revolutionize classroom collaboration. It bridges the gap between students and teachers by facilitating seamless note sharing, real-time communication, and AI-powered learning assistance.
- Intelligent Generation: Teachers can leverage Gemini 2.5 Flash and Tavily Search to auto-generate comprehensive study notes.
- Agentic Workflow: Built on LangChain and LangGraph, the system performs autonomous multi-step reasoning to search, summarize, and structure content.
- Smart Management: Full CRUD capabilities for managing generated notes.
- Group Dynamics: Teachers can create dedicated class groups; students join to access exclusive content.
- Resource Sharing: Instantly share notes, assignments, and resources within the group.
- Real-time Chat: Integrated chat system for instant doubts resolution and announcements.
- High-Performance Architecture: Built on Redis Pub/Sub to handle real-time message broadcasting across multiple instances.
- WebSocket Integration: Uses FastAPI WebSockets for low-latency, bi-directional communication.
- Reliability: Messages are persisted in PostgreSQL ensuring no data loss, while Redis handles ephemeral real-time delivery.
- Smart Caching: Implements a caching strategy to optimize message retrieval and reduce database load.
- Cross-Platform: Fully synchronized experience between Web and Mobile interfaces.
- Role-Based Access: Distinct portals for Teachers and Students with tailored permissions.
- Secure Auth: Robust JWT-based authentication ensures data privacy and secure API access.
- Rate Limiting: Implemented SlowAPI based rate limiting to prevent abuse and ensure fair usage.
- Custom Plans: Teachers can create and manage subscription plans (up to 3) for their groups.
- Secure Payments: Integrated Razorpay payment gateway for seamless and secure transaction processing.
- Earnings Dashboard: Detailed analytics on earnings and subscription trends for teachers.
- Subscription Management: Students can view, subscribe, and manage their active subscriptions.
- Scalable Database: Powered by PostgreSQL (NeonDB) for high availability.
- Media Management: Seamless image and file handling via Cloudinary.
- Containerized: Fully Dockerized for consistent development and deployment environments.
- Framework: React 18
- Build Tool: Vite 7
- Language: TypeScript
- Styling: Tailwind CSS 4
- State Management: Redux Toolkit
- UI Components: Radix UI, Lucide React
- Charts: Recharts
- Framework: FastAPI
- Database: PostgreSQL (via NeonDB)
- ORM: SQLAlchemy
- Migrations: Alembic
- AI/LLM: LangChain, LangGraph
- Authentication: JWT (JSON Web Tokens)
- Payment Gateway: Razorpay
- Containerization: Docker & Docker Compose
ClassBuddy/
βββ client/ # React 19 Frontend
β βββ src/
β βββ vite.config.ts
β βββ package.json
βββ server/ # FastAPI Backend
β βββ app/
β βββ alembic/
β βββ requirements.txt
βββ docker-compose.yml # Container orchestration
βββ README.md- Node.js (v18+ recommended)
- Python (v3.10+)
- Docker & Docker Compose (Optional but recommended)
git clone https://github.com/Sandeep-singh-99/ClassBuddy.git
cd ClassBuddyCreate a .env file in the server/ directory:
DATABASE_URL=postgresql://user:password@host/dbname
JWT_SECRET_KEY=your_super_secret_key
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
GOOGLE_API_KEY=your_gemini_api_key
TAVILY_API_KEY=your_tavily_api_key
REDIS_HOST=your_redis_host
REDIS_PORT=your_redis_port
REDIS_USER=your_redis_user
REDIS_PASSWORD=your_redis_password
CORS_ORIGINS=your_cors_originsThe easiest way to start the application is using Docker Compose.
docker-compose up --build- Frontend: http://localhost:5173
- Backend: http://localhost:8000
cd server
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadcd client
npm install
npm run devContributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a Pull Request.

