Skip to content

Latest commit

Β 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ECAST Academy

ECAST Academy Next.js TypeScript Convex Tailwind CSS

AI-Powered Learning Platform - Learn smarter with personalized courses and capsules

Getting Started β€’ Features β€’ Tech Stack β€’ Documentation


πŸ“– Overview

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

✨ Features

πŸŽ“ Course Management

  • 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

πŸ“Ί YouTube Learning

  • 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

πŸ’Š Learning Capsules

  • 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

πŸ“ Interactive Quizzes

  • Multiple question types with detailed feedback
  • Timed assessments
  • Retry capabilities with score tracking
  • Graded and ungraded quiz options

πŸ… Certification System

  • Course completion certificates
  • Grading and passing criteria
  • Unique certificate IDs for verification
  • Downloadable certificate generation

πŸ” Authentication & Security

  • Clerk authentication integration
  • Role-based access control (User/Admin)
  • Secure API routes with rate limiting
  • CSRF protection

🎨 User Experience

  • Dark/Light theme toggle
  • Smooth animations with Framer Motion
  • Accessible UI components (Radix UI)
  • Sound effects for interactions

πŸ›  Tech Stack

Frontend

Backend

Infrastructure

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/Avinash1286/ecastacademy.git
    cd ecastacademy
  2. Install dependencies

    npm install
  3. Set up environment variables

    Copy the example environment file:

    cp .env.local.example .env.local

    Fill in your environment variables (see Environment Variables section)

  4. Set up Convex

    npx convex dev

    This will prompt you to log in and create a new project if needed.

  5. Run the development server

    npm run dev

    This runs both Next.js and Convex in development mode.

  6. Open your browser

    Navigate to http://localhost:3000

Environment Variables

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:3000

Convex Environment Variables

All 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"

πŸ“ Project Structure

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

πŸ“œ Available Scripts

# 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

πŸ”§ Configuration

Clerk Setup

  1. Create a Clerk application at dashboard.clerk.com
  2. Enable the authentication methods you want (Email, Google, etc.)
  3. Copy your API keys to .env.local

Convex Setup

  1. Run npx convex dev to initialize your Convex project
  2. The schema will be automatically deployed
  3. Set any required environment variables using npx convex env set

AI Provider Setup (Google Vertex AI on Convex)

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.

  1. Create (or pick) a project in Google Cloud Console and enable the Vertex AI API
  2. Create a service account with the Vertex AI User role (roles/aiplatform.user)
  3. Create a JSON key for the service account
  4. 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.

YouTube API Setup

  1. Create a project in Google Cloud Console
  2. Enable the YouTube Data API v3
  3. Create an API key and add it as YOUTUBE_API_KEY

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This is open source project.

πŸ™ Acknowledgments


Made with ❀️ by ECAST Team at Thapathali Campus

About

Ecast Academy is a modern, AI-powered e-learning platform built with Next.js 15, Drizzle, and Google Gemini. It transforms any YouTube video or playlist into a fully interactive course, complete with detailed notes and quizzes, all generated automatically by AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages