AI-powered course generator — build structured learning paths from outline to lessons in one click.
Team 11–12 OSO
- 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
| 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) |
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
- Node.js 18+ (20/22 recommended)
- MongoDB (Atlas or local)
- OpenRouter API key (required for generation)
- Optional: Serper API key, YouTube Data API key
npm run install:allOr separately:
npm install --prefix backend
npm install --prefix clientCopy 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.
Terminal 1 — API
npm run dev:backendTerminal 2 — UI
npm run dev:client| Service | URL |
|---|---|
| Client | http://localhost:5173 |
| Backend | http://localhost:5000 |
Vite proxies /api → http://localhost:5000.
- Open the landing page → Get Started
- Register or sign in
- + Create AI Course
- Choose category, topic, and options → Generate Course
- Wait for generation (ETA shown in the status box)
- Go to Course and study chapter by chapter
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/register |
Create account |
POST |
/api/auth/login |
Sign in |
GET |
/api/auth/me |
Current user (auth) |
| 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 |
- Validate category, topic, level, duration, chapters
- Optional web search (Serper) for topic context
- AI builds outline + detailed chapter content (OpenRouter)
- Optional YouTube video per chapter (embeddable)
- Save
courseLayout+courseContent→ returncourseId
| Route | Description |
|---|---|
/ |
Landing |
/auth |
Sign in / Sign up |
/dashboard |
App (auth required) |
/course/:courseId |
Study player |
/about |
About |
/terms |
Terms |
/privacy-policy |
Privacy |
| 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 |
- Never commit
backend/.envor real API keys - Change
JWT_SECRETfor production - Tokens are stored in
localStorage(token,courseflow_user)
Private / academic project — Team 11–12 OSO.
CourseFlow — custom learning paths, powered by AI.