AI-Powered Collaborative Lesson Plan & Content Generator
PrepSmart is an innovative educational platform that empowers teachers to create engaging lesson plans and educational content effortlessly. With real-time collaboration features and AI-powered content generation, PrepSmart streamlines the workflow for educators and educational institutions.
- π€ AI Lesson Plan Generator - Generate comprehensive lesson plans tailored to your curriculum and student needs
- π Real-time Collaboration - Collaborate with colleagues on lesson plans and content in real-time using Liveblocks
- π Template Library - Access pre-designed templates for different subjects and grade levels
- β Approval Workflow - Streamline your approval process with built-in workflow tools
- π― Content Generation - AI-powered content creation using Google's Gemini AI
- π PDF Integration - Upload and process PDF textbooks for enhanced content generation
- π Vector Search - Intelligent search and retrieval using embeddings and vector database
- π₯ Multi-role Support - Support for Teachers, HODs, and collaborative workflows
- π± Responsive Design - Works seamlessly on desktop and mobile devices
- π Dark Mode Support - Toggle between light and dark themes
- π Secure Authentication - Built with Supabase Auth
- π Real-time Updates - Live collaboration and instant synchronization
- π Modern Tech Stack - Built with Next.js, FastAPI, and PostgreSQL
- Framework: Next.js 15 with TypeScript
- Styling: Tailwind CSS
- Real-time Collaboration: Liveblocks + Yjs
- Rich Text Editor: Tiptap
- UI Components: Custom components with Lucide React icons
- Authentication: Supabase Auth
- State Management: React Context + Hooks
- Framework: FastAPI (Python)
- Database: PostgreSQL with Supabase
- Vector Database: pgvector for embeddings
- AI/ML: Google Gemini AI for content generation
- File Processing: PDFPlumber for PDF text extraction
- Authentication: Supabase (server-side)
- Users: User profiles and authentication
- Templates: Lesson plan templates
- User Templates: Custom user-created templates
- Drafts: Work-in-progress content with versioning
- Vector Tables: Embeddings for smart content retrieval
- Node.js 18+ and npm/yarn
- Python 3.12+
- PostgreSQL database (Supabase recommended)
- Google AI API key (for Gemini)
- Liveblocks account (for real-time collaboration)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=your_liveblocks_public_key
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
GOOGLE_API_KEY=your_google_gemini_api_key
LIVEBLOCKS_SECRET_KEY=your_liveblocks_secret_keygit clone https://github.com/Hacker-Ring/PrepSmart.git
cd PrepSmart# Install root dependencies
npm install
# Install frontend dependencies
cd frontend
npm install
# Install backend dependencies
cd ../backend
pip install -r requirements.txtRun the SQL files in the backend/ directory to set up your database tables:
-- Run these in your PostgreSQL/Supabase SQL editor
-- 1. create_draft_submissions_table.sql
-- 2. create_draft_versions_table.sql
-- 3. create_profile.sql
-- 4. create_profiles_table.sql
-- 5. profile_picture_storage.sqlcd backend
python scripts/ingest_textbooks.py # Process and embed PDF textbooks
python scripts/ingest_templates.py # Process template dataBackend:
cd backend
uvicorn src.main:app --reload --port 8000Frontend:
cd frontend
npm run devVisit http://localhost:3000 to see the application.
PrepSmart/
βββ frontend/ # Next.js Frontend
β βββ src/
β β βββ app/ # App Router pages
β β β βββ auth/ # Authentication pages
β β β βββ dashboard/ # Main dashboard
β β β β βββ teacher/ # Teacher-specific pages
β β β β βββ hod/ # HOD-specific pages
β β β β βββ profile/ # User profile pages
β β β βββ api/ # API routes
β β βββ components/ # Reusable React components
β β β βββ CollaborativeEditor.tsx
β β β βββ CollaboratorList.tsx
β β β βββ HistorySidebar.tsx
β β β βββ ...
β β βββ context/ # React Context providers
β β βββ types/ # TypeScript type definitions
β β βββ utils/ # Utility functions
β βββ public/ # Static assets
β βββ package.json
βββ backend/ # FastAPI Backend
β βββ src/
β β βββ routes/ # API route handlers
β β β βββ collaborators.py
β β β βββ drafts.py
β β β βββ templates.py
β β βββ main.py # FastAPI app entry point
β β βββ llm.py # AI/ML integration
β β βββ supabase_vector.py # Vector database operations
β β βββ embed_user_template.py
β βββ scripts/ # Utility scripts
β β βββ ingest_textbooks.py
β β βββ ingest_templates.py
β β βββ test_pg_connection.py
β βββ pdfs/ # Sample PDF textbooks
β βββ requirements.txt # Python dependencies
β βββ *.sql # Database schema files
βββ render.yaml # Render deployment config
βββ package.json # Root package.json
Real-time collaborative rich text editor built with Tiptap and Liveblocks:
- Multi-user editing with live cursors
- Rich formatting options
- Markdown support
- Version history tracking
Flexible template management:
- Pre-built curriculum templates
- Custom user templates
- AI-powered content suggestions
- Template sharing and collaboration
Intelligent content creation using:
- RAG (Retrieval Augmented Generation)
- Vector similarity search
- Contextual content suggestions
- Curriculum-aligned outputs
Streamlined review process:
- Draft submissions
- Multi-level approvals
- Comment and feedback system
- Version tracking
- Language & Version: Python 3.11
- Branch:
main - Region: Asia (for better Supabase latency)
pip install -r requirements.txtuvicorn src.main:app --host 0.0.0.0 --port 10000Deploy the frontend to Vercel:
cd frontend
npm run build
# Deploy to Vercel- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow TypeScript best practices
- Use proper error handling
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation as needed
- Create a new Supabase project
- Run the provided SQL schema files
- Enable pgvector extension
- Configure Row Level Security (RLS) policies
- Set up authentication providers
- Create a Liveblocks account
- Create a new project
- Get your API keys
- Configure authentication
- Get a Google AI API key
- Enable the Gemini API
- Configure rate limits and usage
- Real-time collaborative editing
- AI content generation
- Template management
- User authentication
- PDF processing
- Vector search
This project is licensed under the MIT License - see the LICENSE file for details.
Hacker-Ring Organization
- Repository: PrepSmart (Cogniverse)
- Supabase for database and authentication
- Liveblocks for real-time collaboration
- Tiptap for the rich text editor
- Google AI for Gemini API
- Vercel and Render for deployment platforms
Happy Teaching! πβ¨
For support or questions, please open an issue on GitHub or contact the development team.