Skip to content

ACM-JUIT/Team-12-CourseFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CourseFlow OSO 2026

AI-powered course generator — build structured learning paths from outline to lessons in one click.

Team 11–12 OSO


Features

  • Auth — email/password sign up & sign in with JWT
  • Create Course wizard — category → topic/description → options
  • One-click generation — full course (outline + chapter content + optional YouTube videos)
  • Dashboard — course cards with category-based blue icons
  • Study player — chapter sidebar, progress, video embed, lesson content
  • Landing & legal — marketing home, About, Terms, Privacy

Tech stack

Layer Tech
Frontend React 19, Vite 8, React Router 7, Lucide React
Backend Express 5, Mongoose, JWT, bcrypt
Database MongoDB
AI OpenRouter (e.g. openai/gpt-4o-mini)
Extras Serper (web search), YouTube Data API (videos)

Project structure

CourseFlow OSO/
├── client/                 # React + Vite app
│   └── src/
│       ├── pages/          # Dashboard, CreateCourse, CourseStudy, legal
│       ├── components/     # Sidebar, Stepper, BrandLogo, Footer, steps
│       ├── api/            # API helpers
│       └── utils/          # auth helpers
├── backend/                # Express API
│   ├── controllers/
│   ├── models/             # User, courseLayout, courseContent
│   ├── services/           # AI, video, search
│   ├── routes/
│   ├── middleware/
│   └── .env.example
└── package.json            # root scripts

Prerequisites

  • Node.js 18+ (20/22 recommended)
  • MongoDB (Atlas or local)
  • OpenRouter API key (required for generation)
  • Optional: Serper API key, YouTube Data API key

Setup

1. Install dependencies

npm run install:all

Or separately:

npm install --prefix backend
npm install --prefix client

2. Configure environment

Copy the example env file and fill in values:

cp backend/.env.example backend/.env
Variable Description
PORT Backend port (default 5000)
MONGODB_URI MongoDB connection string
JWT_SECRET Secret for signing JWTs
CLIENT_URL Frontend origin (http://localhost:5173)
OPENROUTER_API_KEY OpenRouter API key
OPENROUTER_MODEL Model id (e.g. openai/gpt-4o-mini)
YOUTUBE_API_KEY Chapter videos

Prefer a cost-efficient OpenRouter model. HTTP 402 usually means insufficient credits.

3. Run locally

Terminal 1 — API

npm run dev:backend

Terminal 2 — UI

npm run dev:client
Service URL
Client http://localhost:5173
Backend http://localhost:5000

Vite proxies /apihttp://localhost:5000.

Usage flow

  1. Open the landing page → Get Started
  2. Register or sign in
  3. + Create AI Course
  4. Choose category, topic, and options → Generate Course
  5. Wait for generation (ETA shown in the status box)
  6. Go to Course and study chapter by chapter

API overview

Auth

Method Endpoint Description
POST /api/auth/register Create account
POST /api/auth/login Sign in
GET /api/auth/me Current user (auth)

Courses

Method Endpoint Description
POST /api/courses/generate Generate full course (auth)
GET /api/courses/user User’s courses
GET /api/courses/:id Course by id
DELETE /api/courses/:id Delete course
GET /api/dashboard/courses Dashboard course list

Generation pipeline

  1. Validate category, topic, level, duration, chapters
  2. Optional web search (Serper) for topic context
  3. AI builds outline + detailed chapter content (OpenRouter)
  4. Optional YouTube video per chapter (embeddable)
  5. Save courseLayout + courseContent → return courseId

Frontend routes

Route Description
/ Landing
/auth Sign in / Sign up
/dashboard App (auth required)
/course/:courseId Study player
/about About
/terms Terms
/privacy-policy Privacy

Troubleshooting

Issue What to check
Generation fails / 402 OpenRouter credits & OPENROUTER_MODEL
No videos YOUTUBE_API_KEY or Serper; embeddable results
Empty dashboard User email matches createdBy; MongoDB URI
API / CORS errors Backend on port 5000; Vite proxy for /api

Security notes

  • Never commit backend/.env or real API keys
  • Change JWT_SECRET for production
  • Tokens are stored in localStorage (token, courseflow_user)

License

Private / academic project — Team 11–12 OSO.


CourseFlow — custom learning paths, powered by AI.

Releases

Packages

Contributors

Languages