Skip to content

ClassBuddy is a full-stack web application designed to enhance classroom collaboration, note sharing, and communication between students and teachers.

Notifications You must be signed in to change notification settings

Sandeep-singh-99/ClassBuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ClassBuddy πŸŽ“

License React TypeScript Vite FastAPI Docker

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.

ClassBuddy Screenshot ClassBuddy Screenshot


✨ Key Features

πŸ€– AI-Powered Teacher Notes

  • 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.

🏫 Classroom Collaboration

  • 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.

πŸ’¬ Real-Time Chat System

  • 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.

οΏ½ Enterprise-Grade Security

  • 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.

πŸ’° Teacher Monetization & Subscriptions

  • 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.

☁️ Modern Cloud Infrastructure

  • 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.

πŸ› οΈ Tech Stack

Frontend

Backend

DevOps

  • Containerization: Docker & Docker Compose

πŸ“‚ Project Structure

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

πŸš€ Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • Python (v3.10+)
  • Docker & Docker Compose (Optional but recommended)

1. Clone the Repository

git clone https://github.com/Sandeep-singh-99/ClassBuddy.git
cd ClassBuddy

2. Environment Setup

Create 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_origins

3. Run with Docker (Recommended)

The easiest way to start the application is using Docker Compose.

docker-compose up --build

4. Manual Setup

Backend (FastAPI)

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 --reload

Frontend (React)

cd client
npm install
npm run dev

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.