Skip to content

A tool that uses the Gemini API to automatically generate complete lesson plans from just a few inputs. The generated content is then converted into a .docx file using the Officegen npm package, ensuring the final document follows the academic format and structure required in my assignments., i am still working on project...

Notifications You must be signed in to change notification settings

samay-hash/Lesson-Planning-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📚 AI Lesson Planner

The Future of Automated Curriculum Design

React Vite Tailwind CSS Node.js MongoDB Gemini AI



🛑 The Problem

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

🚀 The Solution

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 .docx file.
  • Output: A beautiful Web UI presentation + Downloadable PDF & Word documents.

⚡ Key Features

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


🛠 Tech Stack

Frontend

  • Framework: React (Vite)
  • Styling: Tailwind CSS + Framer Motion (Animations)
  • State Management: Recoil
  • HTTP Client: Axios
  • PDF Generation: html2pdf.js

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB (Mongoose)
  • AI Engine: Google Generative AI SDK (@google/generative-ai)
  • Document Engine: docx library (Programmatic Word file creation)
  • Validation: Zod

🔌 Installation & Setup

Follow these steps to get the platform running locally.

1. Clone the Repository

git clone https://github.com/YOUR_USERNAME/Lesson-Planning-Platform.git
cd Lesson-Planning-Platform

2. Backend Setup

cd server
npm install

Create 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:5173

Run the server:

npm run dev

3. Frontend Setup

Open a new terminal:

cd client
npm install

Create a .env file in the /client folder:

VITE_API_URL=http://localhost:3004/api/v1

Run the client:

npm run dev

🤖 How It Works (Under the Hood)

  1. User Request: The client sends the lesson topic (e.g., "Photosynthesis") to the API.
  2. 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.
  3. File Synthesis:
    • The server uses the docx library to assume this JSON data and "draw" a Word document paragraph by paragraph, applying bolding, bullet points, and headers programmatically.
  4. 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.
  5. Result: The user sees the plan on screen and can click "Download DOCX" to get the physical file.

🤝 Contribution

We welcome contributions!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Made with ❤️ for Educators.

About

A tool that uses the Gemini API to automatically generate complete lesson plans from just a few inputs. The generated content is then converted into a .docx file using the Officegen npm package, ensuring the final document follows the academic format and structure required in my assignments., i am still working on project...

Resources

Stars

Watchers

Forks

Packages

No packages published