How trustinggoose-cpu/evergrace-app works
EverGrace is a senior-friendly martial-arts training platform with member and staff experiences. Members can complete a health check-in, receive a recommended track, sign in, browse access-gated lessons, and track practice; the admin console manages members, videos, and other content. Shared server modules provide authentication, business rules, queries, validation, and persistence. The README documents the product capabilities; source excerpts and the index support only some implementation links, so other capability links are shown at the documented level.
Main entry points: member.ts Member actions · auth.ts Authentication · db.ts Application database · page.tsx Admin console
Components 27
Member experience
- Health check-in
src/app/onboarding/page.tsx - Magic-link login
src/app/login/page.tsx - Member dashboard
src/app/dashboard/page.tsx - Video library
src/app/library/page.tsx - Lesson player
src/components/player/player-stage.tsx
Staff console
- Admin console
src/app/admin/page.tsx - Content managers
src/components/admin/blog-manager.tsx - Video management
src/actions/admin-video.ts - Integration diagnostics
src/app/admin/settings/page.tsx
Application services
- Track scoring
src/actions/onboarding.ts - Authentication
src/lib/auth.ts - Member actions
src/actions/member.ts - Access and track rules
src/lib/domain.ts - Application queries
src/lib/queries.ts - Input validation
src/lib/validation.ts - Application database
src/lib/db.ts - Content actions
src/actions/admin-content.ts - Notifications
src/lib/notifications.ts - Video hosting
src/lib/media.ts - Plan changes
src/lib/billing.ts - Integration configuration
src/lib/env.ts
External integrations
- Email delivery
src/lib/mail.ts - Media-ready webhook
src/app/api/mux/webhook/route.ts - Billing webhook
src/app/api/stripe/webhook/route.ts
Other components
- Member
- Stripe
- Mux
Connections 34
- Member → Health check-in: completes check-in
- Health check-in → Track scoring: submits answers
- Track scoring → Access and track rules: scores track
src/actions/onboarding.ts - Member → Magic-link login: requests sign-in
- Magic-link login → Authentication: requests magic link
- Authentication → Email delivery: sends link
src/lib/auth.ts - Authentication → Application database: reads and writes sessions
src/lib/auth.ts - Member → Member dashboard: views progress
- Member dashboard → Application queries: loads member data
- Member dashboard → Member actions: records activity
- Member actions → Authentication: requires member
src/actions/member.ts - Member actions → Access and track rules: checks plan rules
src/actions/member.ts - Member actions → Input validation: validates input
src/actions/member.ts - Member actions → Application database: persists activity
src/actions/member.ts - Member → Video library: browses lessons
- Video library → Lesson player: opens lesson
- Lesson player → Access and track rules: enforces access
- Member → Admin console: opens staff console
- Admin console → Content managers: manages content
- Content managers → Content actions: saves or deletes posts
src/components/admin/blog-manager.tsx - Content actions → Authentication: requires admin
src/actions/admin-content.ts - Content actions → Application database: reads and writes content
src/actions/admin-content.ts - Content actions → Input validation: validates input
src/actions/admin-content.ts - Admin console → Video management: manages videos
- Video management → Notifications: notifies on publish
- Mux → Media-ready webhook: sends asset event
- Media-ready webhook → Application database: updates video
src/app/api/mux/webhook/route.ts - Media-ready webhook → Video hosting: creates thumbnail URL
src/app/api/mux/webhook/route.ts - Media-ready webhook → Notifications: fans out notifications
src/app/api/mux/webhook/route.ts - Stripe → Billing webhook: sends plan events
- Billing webhook → Plan changes: applies plan change
src/app/api/stripe/webhook/route.ts - Plan changes → Application database: updates membership
src/lib/billing.ts - Admin console → Integration diagnostics: checks integrations
- Integration diagnostics → Integration configuration: reports configuration