Edutube is a Next.js application that allows users to create and view YouTube playlists as structured courses with progress tracking, user authentication, and category management.
- 🔐 Authentication: Email/password and Google login via Firebase Auth
- 📚 Course Management: Create courses from YouTube playlist URLs
- 📂 Category System: Organize courses by categories (Web Development, Cybersecurity, etc.)
- 📊 Progress Tracking: Track lesson completion and overall course progress
- 🎥 YouTube Integration: Embedded YouTube player with playlist support
- 📱 Responsive Design: Works on desktop and mobile devices
- 🎨 Clean UI: White-themed interface matching the original prototype
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Backend: Firebase Firestore (Database), Firebase Auth (Authentication)
- External APIs: YouTube Data API v3
- Icons: React Icons
- Node.js (v18 or higher)
- npm or yarn
- Firebase project
- YouTube Data API key
npm install- Create a Firebase project at Firebase Console
- Enable Authentication with Email/Password and Google providers
- Create a Firestore database
- Get your Firebase configuration from Project Settings
- Go to Google Cloud Console
- Create a new project or select existing
- Enable YouTube Data API v3
- Create credentials (API Key)
- Restrict the API key to YouTube Data API v3
Update the .env.local file in the root directory with your credentials:
# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your-firebase-api-key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id
NEXT_PUBLIC_FIREBASE_APP_ID=your-app-id
# YouTube Data API Key
NEXT_PUBLIC_YOUTUBE_API_KEY=your-youtube-api-keySet up these Firestore security rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Categories - read by all, write by authenticated users
match /categories/{document} {
allow read: if true;
allow write: if request.auth != null;
}
// Courses - read by all, write by authenticated users
match /courses/{document} {
allow read: if true;
allow write: if request.auth != null;
}
// User Progress - read/write only by the owner
match /userProgress/{document} {
allow read, write: if request.auth != null &&
request.auth.uid == resource.data.userId;
}
}
}npm run devOpen http://localhost:3000 in your browser.
- Sign up/Login: Create an account or login with Google
- Manage Categories: Go to "Manage Categories" to create course categories
- Create Course:
- Click "Create Course"
- Enter a YouTube playlist URL
- Click "Fetch Data" to automatically populate course info
- Select a category
- Submit to create the course
- Browse: View all courses on the homepage
- Filter: Use category buttons to filter courses
- Watch: Click on a course to start watching
- Track Progress: Mark lessons as complete to track your progress
- Sidebar: Shows lesson list with completion checkboxes
- Progress Bar: Visual progress indicator
- Navigation: Previous/Next lesson buttons
- Auto-advance: Automatically goes to next lesson when marked complete
- Toggle Sidebar: Hide/show sidebar for better viewing experience
edutube_v2/
├── app/
│ ├── auth/
│ │ ├── login/page.js # Login page
│ │ └── signup/page.js # Signup page
│ ├── categories/
│ │ └── manage/page.tsx # Category management
│ ├── courses/
│ │ ├── create/page.tsx # Course creation
│ │ └── [courseId]/
│ │ └── viewer/page.tsx # Course viewer
│ ├── components/
│ │ └── Navbar.tsx # Navigation component
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── contexts/
│ └── AuthContext.js # Authentication context
├── lib/
│ ├── firebase.js # Firebase configuration
│ └── firestore.js # Database operations
├── types/
│ └── index.ts # TypeScript interfaces
└── public/ # Static files
-
categories
id: Auto-generatedname: Category namedescription: Optional descriptionimage: Category image URLcreatedAt: Timestamp
-
courses
id: Auto-generatedtitle: Course titledescription: Course descriptionplaylistUrl: YouTube playlist URLcategoryId: Reference to categorythumbnail: Course thumbnailvideoCount: Number of videosvideos: Array of video objectscreatedBy: User ID who createdcreatedAt: Timestamp
-
userProgress
id: Auto-generateduserId: User IDcourseId: Course IDvideoId: YouTube video IDcompleted: BooleancompletedAt: Timestamp
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
This project is open source and available under the MIT License.