AI-powered course generator that turns a free-form topic into a structured course with modules, lessons, objectives, quizzes, video resources, Hinglish explanations, and PDF export.
- Prompt-to-course generation with 3 modules and 9 structured lessons
- Lesson renderer for headings, paragraphs, code, videos, and MCQs
- Saved course list and course detail pages
- PDF export for individual lessons
- Optional Auth0 login
- In-memory backend demo storage plus browser local storage fallback
- Optional YouTube and Gemini integrations with graceful fallbacks
- Frontend: React, Vite, Tailwind CSS, React Router
- Backend: Node.js, Express, Mongoose
- Auth: Auth0
- Integrations: YouTube Data API, Gemini text/audio
Install dependencies if needed:
cd server
npm install
cd ../client
npm installRun the backend:
cd server
npm startRun the frontend:
cd client
npm run devThe frontend runs at http://localhost:5173 and the backend runs at http://localhost:8000.
From the repository root, you can also run:
npm start
npm run clientBackend .env inside server/:
PORT=8000
CLIENT_URL=http://localhost:5173
MONGO_URI=
SKIP_DB=true
AUTH0_DOMAIN=
AUTH0_AUDIENCE=
YOUTUBE_API_KEY=
GEMINI_API_KEY=Frontend .env inside client/:
VITE_API_BASE_URL=http://localhost:8000/api
VITE_AUTH0_DOMAIN=
VITE_AUTH0_CLIENT_ID=
VITE_AUTH0_AUDIENCE=Auth0, MongoDB, YouTube, and Gemini keys are optional for local demo mode.
You can copy the starter files:
cp server/.env.example server/.env
cp client/.env.example client/.envThis repo is configured to deploy both apps on Render with the included render.yaml Blueprint:
text-to-learn-api-dubeyharshit0605: Node/Express backendtext-to-learn-frontend-dubeyharshit0605: React/Vite static frontend
- Push this repository to GitHub.
- In Render, choose New + > Blueprint.
- Connect
dubeyharshit0605/Text-to-learn. - Render reads
render.yamlfrom the repo root and creates both services. - Optional secret variables can be left blank for demo mode:
AUTH0_DOMAIN,AUTH0_AUDIENCE,YOUTUBE_API_KEY,GEMINI_API_KEY.
The expected production URLs are:
Frontend: https://text-to-learn-frontend-dubeyharshit0605.onrender.com
Backend: https://text-to-learn-api-dubeyharshit0605.onrender.com
API: https://text-to-learn-api-dubeyharshit0605.onrender.com/api
Health: https://text-to-learn-api-dubeyharshit0605.onrender.com/api/healthIf Render changes either generated URL, update these environment variables in the Render dashboard:
# Backend service
CLIENT_URL=https://your-frontend-service.onrender.com
# Frontend static site
VITE_API_BASE_URL=https://your-backend-service.onrender.com/apiThen redeploy both services.
Backend Web Service:
Root Directory: server
Runtime: Node
Build Command: npm install
Start Command: npm start
Health Check Path: /api/healthBackend environment variables:
NODE_ENV=production
SKIP_DB=true
CLIENT_URL=https://your-frontend-service.onrender.com
AUTH0_DOMAIN=
AUTH0_AUDIENCE=
YOUTUBE_API_KEY=
GEMINI_API_KEY=Frontend Static Site:
Root Directory: leave blank
Build Command: cd client && npm install && npm run build
Publish Directory: client/distFrontend environment variables:
VITE_API_BASE_URL=https://your-backend-service.onrender.com/api
VITE_AUTH0_DOMAIN=
VITE_AUTH0_CLIENT_ID=
VITE_AUTH0_AUDIENCE=Add a frontend rewrite rule for React Router:
Source: /*
Destination: /index.html
Action: RewritePOST /api/courses/generatecreates and saves a course from{ "prompt": "Intro to React Hooks" }GET /api/courseslists saved coursesGET /api/courses/:idreturns one course with modules and lessonsGET /api/youtube?query=...returns embeddable video results or a YouTube search fallbackPOST /api/explanations/hinglish-textreturns a Hinglish explanationPOST /api/explanations/hinglish-audioreturns WAV audio when Gemini is configured
- Enter a topic on the home page.
- Open the generated course syllabus.
- Navigate into any lesson.
- Try MCQs, video resources, Hinglish explanation, and PDF download.