πΈ Guitar Learning SAAS
Visual System Architecture & Data Flow
System Layers
Frontend Layer
API Layer
Database Layer
External Services
π¨βπ Student Portal
- Browse Teachers
- Book Lessons
- Practice Tracking
- Progress Analytics
- Payment Management
- Messages
π¨βπ« Teacher Portal
- Student Management
- Calendar & Scheduling
- Content Creation
- Earnings Dashboard
- Performance Analytics
- Communication Hub
π RESTful API Gateway
/auth/*
/users/*
/lessons/*
/payments/*
/messages/*
/practice/*
/webhooks/*
/analytics/*
ποΈ Supabase PostgreSQL Database
Row-Level Security β’ Real-time Subscriptions β’ Edge Functions
π€ users
- id, email, role
- stripe_customer_id
- subscription_status
π lessons
- teacher_id, student_id
- scheduled_at, duration
- status, price, notes
π³ payments
- stripe_payment_intent_id
- amount, status
- lesson_id, user_id
π subscriptions
- stripe_subscription_id
- plan_type, status
- lessons_remaining
π¬ messages
- sender_id, recipient_id
- content, is_read
- lesson_id (optional)
π― practice_sessions
- student_id, duration
- focus_areas, notes
- difficulty_rating
π³ Stripe
- Payment Processing
- Subscriptions
- Teacher Payouts
- Webhook Events
- Connect Platform
π§ Resend
- Transactional Emails
- Lesson Reminders
- Payment Receipts
- Welcome Sequences
- Progress Reports
βοΈ Supabase
- Authentication
- File Storage
- Real-time Updates
- Edge Functions
- CDN Delivery
π Example User Flow: Booking a Lesson
Student browses teachers
β
Selects time slot
β
API creates lesson record
β
Stripe processes payment
β
Resend sends confirmation
β
Real-time notification to teacher
π οΈ Technology Stack
Frontend
React β’ Next.js β’ TypeScript
Tailwind CSS β’ Vercel
React β’ Next.js β’ TypeScript
Tailwind CSS β’ Vercel
Backend
Supabase β’ PostgreSQL
Edge Functions β’ RLS
Supabase β’ PostgreSQL
Edge Functions β’ RLS
Payments
Stripe API β’ Connect
Webhooks β’ Subscriptions
Stripe API β’ Connect
Webhooks β’ Subscriptions
Communications
Resend API β’ Templates
Real-time messaging
Resend API β’ Templates
Real-time messaging