π Modern online vocal training platform
Professional vocal training website by instructor Dinh Trung Kien - with 30+ years of teaching experience
- π Structured Courses: Basic course (14 lessons) and intermediate level with detailed content
- π₯ High-Quality Videos: Seamless learning with integrated Vimeo player
- π Progress Tracking: System to mark completed lessons
- π¬ Interactive Comments: Students can discuss and ask questions on each lesson
- π Chatbot Consultation: 24/7 student support using Google Gemini AI
- π― Personalized Support: Answers questions about vocal techniques and courses
- π Contact Information: Provides instructor information and schedules
- πΈ Online Payment: PayOS integration supporting multiple payment methods
- π€ Account Management: Registration, login, and personal information management
- π High Security: Secure user authentication with Supabase Auth
- π° Vocal Blog: In-depth articles on singing techniques and methods
- π‘ Practical Knowledge: Experience sharing from professional instructors
- π± Responsive Design: User-friendly interface across all devices
- β‘ Next.js 15.0.3 - Modern React framework with App Router
- π¨ Tailwind CSS - Utility-first CSS framework
- π± Responsive Design - Multi-device compatible design
- π Lucide React - Beautiful icon library
- π₯ React Hot Toast - User notifications
- ποΈ Supabase - Cloud backend platform
- π Supabase Auth - Secure authentication system
- π PostgreSQL - Powerful relational database
- π Prisma ORM - Type-safe database management tool
- π€ Google Gemini AI - Artificial intelligence for chatbot
- π₯ Vimeo Player - High-quality video streaming
- π³ PayOS - Vietnamese payment gateway
- π§ Email Templates - Automated email sending
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Users β ββ β Next.js Web β ββ β Supabase β
β (Web/Mobile) β β Application β β Backend β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β
β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Google Gemini β β PayOS β β PostgreSQL β
β AI Chatbot β β Payment β β Database β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
β
βββββββββββββββββββ
β Vimeo Player β
β Video Learning β
βββββββββββββββββββ
| Table | Description | Features |
|---|---|---|
| Course | Course management | Dynamic pricing, multiple course types |
| Instructor | Instructor information | Achievements, detailed biography |
| Testimonial | Student reviews | User feedback system |
| Purchases | Orders | Payment status tracking |
| Table | Description | Features |
|---|---|---|
| profiles | User information | Personal account management |
| lesson_comments | Lesson comments | Hierarchical discussions with likes |
| videos | Video management | Vimeo ID integration |
Node.js >= 18.0.0
npm >= 8.0.0
Supabase account (free)# 1. Clone the repository
git clone https://github.com/zaikaman/webthanhnhac.git
cd webthanhnhac
# 2. Install dependencies
npm install
# 3. Setup environment variables
cp .env.example .env.local
# Configure Supabase, PayOS, and Google AI API
# 4. Run development server
npm run dev# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_KEY=your_service_key
# Google AI for Chatbot
NEXT_PUBLIC_GOOGLE_API_KEY=your_google_gemini_api_key
# PayOS for Payment
PAYOS_CLIENT_ID=your_payos_client_id
PAYOS_API_KEY=your_payos_api_key
PAYOS_CHECKSUM_KEY=your_payos_checksum_key
# Vimeo for Videos
VIMEO_ACCESS_TOKEN=your_vimeo_access_tokenwebthanhnhac/
βββ π src/
β βββ π app/ # Main application (Next.js App Router)
β β βββ π api/ # API endpoints
β β βββ π auth/ # Authentication pages (login/register)
β β βββ π courses/ # Course pages
β β βββ π learn/ # Learning pages (videos)
β β βββ π blog/ # Vocal blog
β β βββ π payment/ # Payment pages
β βββ π components/ # Reusable React components
β β βββ π home/ # Homepage components
β β βββ π learn/ # Learning section
β β βββ π shared/ # Shared UI components
β β βββ π layout/ # Header, Footer
β βββ π lib/ # Utility libraries
β βββ π hooks/ # Custom React hooks
β βββ π contexts/ # React contexts
β βββ π content/ # Blog content (Markdown)
βββ π public/ # Static assets (images, icons)
βββ π README.md # Project documentation
// Google Gemini AI integration for 24/7 consultation
const genAI = new GoogleGenerativeAI(apiKey)
const response = await genAI.generateContent(userQuery)
// Smart response formatting
const formatResponse = (text: string) => {
const sections = text.split('***').map(section => section.trim())
return sections.map(section => formatSection(section))
}// PayOS integration for Vietnamese payments
const createPaymentLink = async (courseData) => {
const paymentLink = await payOS.createPaymentLink({
orderCode: Number(String(Date.now()).slice(-6)),
amount: courseData.price,
description: courseData.title,
returnUrl: `/payment/success`,
cancelUrl: `/payment/cancel`
})
}// Vimeo player with progress tracking
const VideoPlayer = ({ videoId, courseType, lessonId }) => {
const handleTimeUpdate = (currentTime: number) => {
// Update learning progress in real-time
updateUserProgress(courseType, lessonId, currentTime)
}
const handleVideoComplete = () => {
// Mark lesson as completed
markLessonCompleted(courseType, lessonId)
}
}- β‘ LCP: < 2.5s (Largest Contentful Paint)
- π― FID: < 100ms (First Input Delay)
- π CLS: < 0.1 (Cumulative Layout Shift)
- π Dynamic meta tags for each page
- π± Mobile-first responsive design
- πΊοΈ Automatic XML sitemap generation
- π€ Structured data markup
- π Vercel Analytics integration
- β‘ Speed Insights performance tracking
- π₯ User behavior monitoring
- π‘οΈ Row Level Security (RLS) on Supabase
- π JWT Authentication for API protection
- π Input validation and data sanitization
- π³ Secure payments with PCI compliance
# Deploy to Vercel
npm i -g vercel
vercel --prod# Production environment variables
NEXT_PUBLIC_SUPABASE_URL=production_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=production_key
# ... other production configs- Fork this repository
- Create a 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
π¨βπ» Developer Information
π§ Email: zaikaman123@gmail.com
π LinkedIn: https://www.linkedin.com/in/%C4%91inh-ph%C3%BAc-th%E1%BB%8Bnh-2561b5274/
π GitHub: https://github.com/zaikaman
πΌ Portfolio: https://dinhphucthinh.vercel.app/
π΅ KienVocal - Vocal Instructor
π¨βπ€ Instructor: Dinh Trung Kien
π Phone: 0903100887
π§ Email: kienalai@gmail.com
π Experience: 30+ years in vocal training
π― Achievement: 1000+ successful students
- π― Feature Completion: 95%+
- π¦ Bundle Size: Optimized < 500KB
- β‘ Load Time: < 3 seconds
- π Uptime: 99.9%
- π₯ Users: Growing daily
This project is licensed under the MIT License - see the LICENSE file for details.
β Star this repository if you find it helpful!
π Watch for updates and new features
Made with β€οΈ in Vietnam π»π³