Teachers and educators face a silent productivity crisis:
- Time Drain: Spending 10+ hours a week formatting Word documents.
- Writer's Block: Staring at blank pages trying to align curricular goals with activities.
- Inconsistency: delivering varied quality in lesson structures across different subjects.
- Rigid Tools: Existing tools are either too simple (notes apps) or too complex (full LMS).
AI Lesson Planner is a full-stack SaaS platform that leverages Google's Gemini 2.0 Flash to instantly generate comprehensive, standards-aligned lesson plans.
We don't just generate text; we engineer documents.
- Input: Subject, Topic, Grade, Duration.
- Process: AI analyzes educational standards + Backend generates a structured
.docxfile. - Output: A beautiful Web UI presentation + Downloadable PDF & Word documents.
✨ Generative AI Core: Powered by gemini-2.0-flash-lite for lightning-fast, highly accurate educational content.
📄 Native DOCX Generation: The backend programmatically builds Microsoft Word documents (not just HTML exports), ensuring perfect formatting for administrative submission.
🎨 Modern UI/UX: Built with React, Tailwind, and Framer Motion for a slick, dark-mode-first aesthetic.
🔐 Secure Auth: robust authentication system using JWT (Access + Refresh Tokens) and HTTP-only cookies.
☁️ Cloud Native: Fully deployable on Vercel (Frontend) and Render (Backend).
- Framework: React (Vite)
- Styling: Tailwind CSS + Framer Motion (Animations)
- State Management: Recoil
- HTTP Client: Axios
- PDF Generation: html2pdf.js
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB (Mongoose)
- AI Engine: Google Generative AI SDK (@google/generative-ai)
- Document Engine:
docxlibrary (Programmatic Word file creation) - Validation: Zod
Follow these steps to get the platform running locally.
git clone https://github.com/YOUR_USERNAME/Lesson-Planning-Platform.git
cd Lesson-Planning-Platformcd server
npm installCreate a .env file in the /server folder:
PORT=3004
MONGO_URI=your_mongodb_connection_string
ACCESS_TOKEN_SECRET=your_random_secret_string
REFRESH_TOKEN_SECRET=your_random_secret_string
ACCESS_TOKEN_EXPIRY=1d
REFRESH_TOKEN_EXPIRY=10d
GEMINI_API_KEY=your_google_gemini_api_key
CLIENT_URL=http://localhost:5173Run the server:
npm run devOpen a new terminal:
cd client
npm installCreate a .env file in the /client folder:
VITE_API_URL=http://localhost:3004/api/v1Run the client:
npm run dev- User Request: The client sends the lesson topic (e.g., "Photosynthesis") to the API.
- AI Processing: The server constructs a prompt for Gemini 2.0, instructing it to return a structured JSON object containing:
- Overview, Curricular Goals, Factual Knowledge, Teaching Points, Activities, Homework.
- File Synthesis:
- The server uses the
docxlibrary to assume this JSON data and "draw" a Word document paragraph by paragraph, applying bolding, bullet points, and headers programmatically.
- The server uses the
- Delivery: The server saves this file temporarily and streams both the raw JSON (for the UI) and the file (as base64) back to the user in a single request.
- Result: The user sees the plan on screen and can click "Download DOCX" to get the physical file.
We welcome contributions!
- Fork the Project
- Create your 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
Made with ❤️ for Educators.