Skip to content

SARVESHYOGI/AI-Learning-Planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Learning Planner πŸš€

An AI-powered personalized learning platform that creates adaptive learning roadmaps using LLMs (Gemini / Ollama) based on user goals, experience, and available time.


✨ Features

  • πŸ” Authentication (Register / Login / Logout)
  • πŸ€– AI-generated questionnaires (Gemini API / Local Ollama)
  • πŸ“š Personalized weekly learning plans
  • 🧭 Track progress (week completion)
  • πŸ‘€ User profile management
  • 🌍 Full-stack deployment on Vercel
  • βš™οΈ CI/CD with GitHub Actions
  • πŸ§ͺ Automated backend testing (Jest)
  • πŸͺ Secure cookie-based auth (JWT)
  • πŸ—ƒοΈ MongoDB persistence
  • 🐳 Docker support for local setup
  • πŸ’» Local AI support with Ollama (offline mode)

🧱 Tech Stack

Frontend

  • React (Vite)
  • Tailwind CSS
  • Axios
  • React Router
  • Vercel

Backend

  • Node.js
  • Express
  • MongoDB (Mongoose)
  • JWT Authentication
  • Google Gemini AI (cloud)
  • Ollama (local AI)
  • Serverless (Vercel)

DevOps

  • GitHub Actions (CI/CD)
  • Vercel Deployments
  • MongoDB Atlas
  • Docker (local development)

πŸ“ Project Structure


AI-Learning-Planner/
β”œβ”€β”€ client/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/            # Axios instance
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/          # Route pages
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/       # Login/Register pages
β”‚   β”‚   β”‚   ....            # Other Pages
β”‚   β”‚   β”‚   .... 
β”‚   β”‚   β”œβ”€β”€ store/          # Redux tool kit
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ .env.development
β”‚   β”œβ”€β”€ .env.production
β”‚   └── vite.config.js
β”‚
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ controllers/        # Business logic
β”‚   β”œβ”€β”€ routes/             # API routes
β”‚   β”œβ”€β”€ models/             # Mongoose models
β”‚   β”œβ”€β”€ middleware/         # Auth, error handling
β”‚   β”œβ”€β”€ config/             # CORS, env configs
β”‚   β”œβ”€β”€ db/                 # MongoDB connection
β”‚   β”œβ”€β”€ tests/              # Jest tests
β”‚   β”œβ”€β”€ app.js              # Express app
β”‚   └── server.local.js            # Server entry
β”‚
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci-cd.yml
β”‚
└── README.md


βš™οΈ Environment Variables

Backend (server)

.env.local

NODE_ENV=development
PORT=5000
MONGO_URI=mongodb://localhost:27017/ai_learning_local
JWT_SECRET=dev_secret
CLIENT_URL=http://localhost:5173
GOOGLE_API_KEY=your_key
REDIS_URL=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
UPSTASH_REDIS_REST_URL=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
UPSTASH_REDIS_REST_TOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

.env.production (Vercel)

NODE_ENV=production
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/ai_learning
JWT_SECRET=prod_secret
CLIENT_URL=https://ailearningplan.vercel.app
GOOGLE_API_KEY=your_key
REDIS_URL=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
UPSTASH_REDIS_REST_URL=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
UPSTASH_REDIS_REST_TOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Frontend (client)

.env.development

VITE_BACKEND_URL=http://localhost:5000

.env.production

VITE_BACKEND_URL=https://ai-learning-planner.vercel.app

πŸš€ Running Locally

1️⃣ Clone repository

git clone https://github.com/SARVESHYOGI/AI-Learning-Planner.git
cd ai-learning-planner

2️⃣ Start Backend

cd server
npm install
npm run dev

Runs on:

http://localhost:5000

3️⃣ Start Frontend

cd client
npm install
npm run dev

Runs on:

http://localhost:5173

🐳 Run with Docker (Optional)

docker compose up --build

πŸ€– Local AI Setup (Ollama)

If you want to use AI locally (offline, no cloud API, no cost), you can run the project with Ollama.

πŸ‘‰ Follow the full step-by-step guide here:
πŸ“„ Local AI Setup Guide

This mode is useful if:

  • You want offline AI
  • You don’t want to use Gemini API
  • You want full local control
  • You are developing without internet

⚠️ No environment variable change is required.
You only need to switch code in generator() function.


πŸ§ͺ Running Tests

cd server
npm test

πŸ” CI/CD Pipeline

Runs automatically on push to main.

Pipeline Steps:

  1. Install dependencies
  2. Run backend tests
  3. Build frontend
  4. Deploy to Vercel

🌍 Deployment URLs

Frontend

https://ailearningplan.vercel.app

Backend

https://ai-learning-planner.vercel.app

⏱️ Timeout Configuration

AI responses may take time (LLM generation).

Axios timeout:

timeout: 180000

(3 minutes)


πŸ” Authentication Flow

  • JWT stored in httpOnly cookies
  • Secure cookies in production
  • SameSite=None for cross-domain
  • Axios uses withCredentials: true

🧠 AI Flow

  1. User selects topic
  2. AI generates questionnaire
  3. User submits answers
  4. AI generates learning plan
  5. Plan stored in MongoDB
  6. User tracks weekly progress

πŸ“Œ Future Scope

  • πŸ’³ Payment integration (Stripe / Razorpay)
  • πŸ“± Mobile app
  • πŸ“Š Analytics dashboard
  • πŸ”” Notifications
  • 🧠 AI model switching UI
  • πŸ—‚οΈ Plan sharing
  • 🏷️ Tags & goals

πŸ“œ License (IMPORTANT)

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Sarvesh Yogi BE Computer Engineering, TSEC Full Stack Developer | AI & Backend Enthusiast


⭐ Support

If you find this project useful, please ⭐ the repository. PRs are welcome!

About

AI-powered full-stack learning planner that generates personalized study roadmaps using LLMs (Gemini / Ollama). Built with React, Express, MongoDB, and deployed on Vercel with CI/CD, testing, Docker, and local AI support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages