AI-Powered Learning Platform - Learn smarter with personalized courses and capsules
Getting Started β’ Features β’ Tech Stack β’ Documentation
ECAST Academy is a modern, AI-powered learning platform that transforms YouTube videos and custom content into interactive courses with quizzes, notes, and certifications. Built with Next.js 15, Convex, and advanced AI capabilities, it provides a seamless learning experience with features like:
- π¬ YouTube Integration - Import and transform YouTube videos into structured courses
- π§ AI-Powered Content - Auto-generate quizzes, notes, and learning capsules using Gemini on Google Vertex AI
- π Certifications - Earn certificates upon course completion
- π Progress Tracking - Detailed analytics and progress visualization
- Admin Portal: Create and organize courses with chapters and content items
- Support for multiple content types: videos, text, quizzes, assignments, and resources
- Drag-and-drop course builder for admins
- Course publishing and draft management
- User Experience: Browse, enroll, and complete courses to earn certifications
- Admin-curated courses from YouTube videos
- Automatic transcript extraction and processing
- AI-generated notes and summaries
- Interactive video player with chapter markers
- Users can browse and enroll in available courses
- Bite-sized learning modules
- AI-generated content from various sources
- Multiple quiz types: MCQ, Fill-in-the-Blanks, Drag-and-Drop
- Spaced repetition for better retention
- Multiple question types with detailed feedback
- Timed assessments
- Retry capabilities with score tracking
- Graded and ungraded quiz options
- Course completion certificates
- Grading and passing criteria
- Unique certificate IDs for verification
- Downloadable certificate generation
- Clerk authentication integration
- Role-based access control (User/Admin)
- Secure API routes with rate limiting
- CSRF protection
- Dark/Light theme toggle
- Smooth animations with Framer Motion
- Accessible UI components (Radix UI)
- Sound effects for interactions
- Framework: Next.js 15 with App Router
- Language: TypeScript 5
- Styling: Tailwind CSS 4
- UI Components: Radix UI + shadcn/ui
- Animations: Framer Motion
- Forms: React Hook Form + Zod
- Rich Text Editor: TipTap
- Charts: Recharts
- Database & Backend: Convex
- Authentication: Clerk
- AI Integration:
- Google Vertex AI (Gemini)
- Vercel AI SDK
- Rate Limiting: Upstash Redis
- Node.js (v18 or higher)
- npm or pnpm
- Convex Account
- Clerk Account
-
Clone the repository
git clone https://github.com/Avinash1286/ecastacademy.git cd ecastacademy -
Install dependencies
npm install
-
Set up environment variables
Copy the example environment file:
cp .env.local.example .env.local
Fill in your environment variables (see Environment Variables section)
-
Set up Convex
npx convex dev
This will prompt you to log in and create a new project if needed.
-
Run the development server
npm run dev
This runs both Next.js and Convex in development mode.
-
Open your browser
Navigate to http://localhost:3000
Create a .env.local file with the following variables:
# Clerk Authentication (Required)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard
# Convex (Required)
CONVEX_DEPLOYMENT=dev:your-deployment
NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
# NOTE: AI env vars are NOT set here. All AI work runs on Convex β
# configure GOOGLE_SERVICE_ACCOUNT_KEY / AI_MODEL_ID on the Convex
# deployment (see "Convex Environment Variables" below).
# YouTube API (Required for video import)
YOUTUBE_API_KEY=your_youtube_api_key
# Rate Limiting - Upstash Redis (Required in production)
UPSTASH_REDIS_REST_URL=https://your-instance.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_upstash_token
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000All AI runs on Convex, so the AI configuration lives here. Set these directly in Convex:
# Certificate signing
npx convex env set CERTIFICATE_SIGNING_SECRET "your-secure-secret"
# Vertex AI service account (full JSON key, raw or base64-encoded)
npx convex env set GOOGLE_SERVICE_ACCOUNT_KEY '{"type":"service_account","project_id":"...","client_email":"...","private_key":"..."}'
# GCP project/location (project falls back to project_id in the key; location defaults to us-central1)
npx convex env set GOOGLE_VERTEX_PROJECT "my-gcp-project"
npx convex env set GOOGLE_VERTEX_LOCATION "us-central1"
# The single Gemini model used for ALL AI features (defaults to gemini-2.5-flash)
npx convex env set AI_MODEL_ID "gemini-2.5-flash"ecastacademy/
βββ convex/ # Convex backend
β βββ schema.ts # Database schema
β βββ courses.ts # Course operations
β βββ chapters.ts # Chapter operations
β βββ videos.ts # Video processing
β βββ certificates.ts # Certificate generation
β βββ progress.ts # Progress tracking
β βββ ai.ts # AI operations
β βββ utils/ # Backend utilities
βββ shared/ # Shared code (frontend & backend)
β βββ ai/ # AI utilities and prompts
β βββ quiz/ # Quiz types and utilities
β βββ visualization/ # Chart templates
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ admin/ # Admin dashboard
β β βββ dashboard/ # User dashboard
β β βββ learnspace/ # Learning interface
β β βββ capsule/ # Capsule learning
β β βββ api/ # API routes
β βββ components/ # React components
β β βββ ui/ # Base UI components
β β βββ course/ # Course components
β β βββ quiz/ # Quiz components
β β βββ landing/ # Landing page components
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities and services
β βββ context/ # React context providers
βββ public/ # Static assets
βββ images/ # Static images
# Development (runs Next.js + Convex)
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linting
npm run lint
# Convex development server only
npm run convex:dev- Create a Clerk application at dashboard.clerk.com
- Enable the authentication methods you want (Email, Google, etc.)
- Copy your API keys to
.env.local
- Run
npx convex devto initialize your Convex project - The schema will be automatically deployed
- Set any required environment variables using
npx convex env set
All AI features run as Convex actions/background jobs on Google Vertex AI (Gemini), authenticated with a service account. One model β AI_MODEL_ID β is used for every AI feature.
- Create (or pick) a project in Google Cloud Console and enable the Vertex AI API
- Create a service account with the Vertex AI User role (
roles/aiplatform.user) - Create a JSON key for the service account
- Set the Convex environment variables shown above (
GOOGLE_SERVICE_ACCOUNT_KEY,GOOGLE_VERTEX_PROJECT,GOOGLE_VERTEX_LOCATION,AI_MODEL_ID)
No AI environment variables are needed in .env.local β the Next.js app never calls the AI provider directly.
- Create a project in Google Cloud Console
- Enable the YouTube Data API v3
- Create an API key and add it as
YOUTUBE_API_KEY
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This is open source project.
- Next.js - The React Framework
- Convex - Backend platform
- Clerk - Authentication
- Tailwind CSS - Styling
- Radix UI - Accessible components
- shadcn/ui - UI component library