How 23-75125-pixel/ecolearn works
ECoLearn is a web platform for tutor vetting and student appointments. Students browse approved tutors and book available appointment slots; tutors submit applications, manage their profiles and availability; administrators review applications. Dashboards and notifications support these workflows. Supabase provides authentication and data access, with booking and cancellation enforced through database functions and row-level security. The map uses the README and source-index references; unsampled action and query implementations are represented only where their callers or documented behavior establish the relationship.
Main entry points: server.ts Supabase server client · page.tsx Tutor dashboard · notification-list.tsx Notifications · actions.ts Tutor actions
Components 21
Identity
- Sign-in and signup
app/(auth)/login/page.tsx - Auth actions
app/(auth)/actions.ts - Auth callback
app/(auth)/callback/route.ts - Session and role guard
lib/auth/session.ts
Tutor lifecycle
- Tutor application
components/tutor/application-form.tsx - Application review
app/admin/applications/[id]/page.tsx - Review decisions
components/admin/review-actions.tsx - Tutor profile editing
components/tutor/profile-editor.tsx - Availability management
components/tutor/availability-manager.tsx - Tutor actions
app/tutor/actions.ts
Appointments
- Tutor directory
components/tutors/tutor-directory.tsx - Tutor details
app/(public)/tutors/[tutorId]/page.tsx - Slot booking
components/student/booking-form.tsx
Role dashboards
- Student dashboard
app/student/dashboard/page.tsx - Tutor dashboard
app/tutor/dashboard/page.tsx - Admin dashboard
app/admin/dashboard/page.tsx - Notifications
components/notifications/notification-list.tsx
Shared services
- Supabase server client
lib/supabase/server.ts - Supabase database and auth
- Database types
types/database.types.ts
Other components
- Visitor / user
Connections 23
- Visitor / user → Sign-in and signup: signs in
README.md - Sign-in and signup → Auth actions: submits credentials
app/(auth)/login/page.tsx - Auth actions → Supabase server client: uses client
- Auth callback → Supabase server client: uses client
app/(auth)/callback/route.ts - Session and role guard → Supabase server client: creates client
lib/auth/session.ts - Supabase server client → Supabase database and auth: reads and writes
lib/supabase/server.ts - Tutor application → Tutor actions: submits application
- Review decisions → Application review: renders in review
app/admin/applications/[id]/page.tsx - Review decisions → Supabase database and auth: requests decisions
- Availability management → Tutor actions: manages slots
components/tutor/availability-manager.tsx - Tutor profile editing → Tutor actions: updates profile
- Tutor dashboard → Tutor application: renders form
app/tutor/dashboard/page.tsx - Tutor dashboard → Availability management: renders manager
app/tutor/dashboard/page.tsx - Tutor dashboard → Tutor profile editing: renders editor
app/tutor/dashboard/page.tsx - Tutor directory → Tutor details: links tutor
- Tutor details → Slot booking: renders booking
app/(public)/tutors/[tutorId]/page.tsx - Slot booking → Supabase database and auth: books slot
README.md - Student dashboard → Supabase database and auth: reads appointments
- Student dashboard → Notifications: renders list
app/student/dashboard/page.tsx - Tutor dashboard → Notifications: renders list
app/tutor/dashboard/page.tsx - Admin dashboard → Supabase database and auth: reads review data
- Notifications → Supabase database and auth: marks read
- Supabase server client → Database types: types client
lib/supabase/server.ts