How jsiekham/evergrace-app works
EverGrace is a senior-friendly martial-arts training platform with member learning and progress tracking, an administrative console, and optional email, billing, and video-hosting integrations. Members complete a health check-in, receive a recommended track, sign in, then discover and play tier-gated lessons while recording progress and preferences. Staff manage the catalog and content; publishing and video-ready events can notify followers. The graph includes core service and persistence layers. Unsampled page internals are represented from README capabilities; those relationships cite the README rather than implying source inspection.
Main entry points: db.ts Application database · auth.ts Authentication · member.ts Member actions · page.tsx Admin console
Components 26
Member experience
- Health check-in
src/app/onboarding/page.tsx - Member login
src/app/login/page.tsx - Member dashboard
src/app/dashboard/page.tsx - Video library
src/app/library/page.tsx - Lesson player
src/app/library/[videoId]/page.tsx
Staff console
- Admin console
src/app/admin/page.tsx - Content management
src/actions/admin-content.ts - Video management
src/actions/admin-video.ts - Reports and roster
src/app/admin/reports/page.tsx
Application services
- Track and signup
src/actions/onboarding.ts - Authentication
src/lib/auth.ts - Magic-link callback
src/app/api/auth/callback/route.ts - Member actions
src/actions/member.ts - Read queries
src/lib/queries.ts - Access and track rules
src/lib/domain.ts - Follower notifications
src/lib/notifications.ts - Video hosting
src/lib/media.ts - Plan changes
src/lib/billing.ts
Integrations and state
- Application database
src/lib/db.ts - Mux asset webhook
src/app/api/mux/webhook/route.ts - Stripe webhook
src/app/api/stripe/webhook/route.ts - Email delivery
src/lib/mail.ts
Other components
- Member
- Staff
- Stripe
- Mux
Connections 38
- Member → Health check-in: starts check-in
README.md - Health check-in → Track and signup: submits answers
README.md - Track and signup → Access and track rules: scores track
src/actions/onboarding.ts - Track and signup → Application database: creates account
src/actions/onboarding.ts - Member → Member login: signs in
README.md - Member login → Authentication: requests magic link
README.md - Authentication → Email delivery: sends link
src/lib/auth.ts - Email delivery → Member: delivers link
- Magic-link callback → Authentication: validates token
src/app/api/auth/callback/route.ts - Authentication → Application database: stores sessions
src/lib/auth.ts - Member → Member dashboard: views activity
README.md - Member dashboard → Read queries: loads aggregates
README.md - Member dashboard → Member actions: records check-ins
README.md - Member → Video library: browses lessons
README.md - Video library → Read queries: loads catalog
README.md - Member → Lesson player: opens lesson
README.md - Lesson player → Member actions: records progress
README.md - Member actions → Authentication: requires member
src/actions/member.ts - Member actions → Access and track rules: checks eligibility
src/actions/member.ts - Member actions → Application database: writes activity
src/actions/member.ts - Read queries → Application database: reads records
src/lib/queries.ts - Read queries → Access and track rules: applies rules
src/lib/queries.ts - Staff → Admin console: manages platform
README.md - Admin console → Content management: edits content
- Admin console → Video management: manages videos
README.md - Admin console → Reports and roster: reviews impact
README.md - Content management → Application database: updates content
src/actions/admin-content.ts - Content management → Authentication: requires staff
src/actions/admin-content.ts - Video management → Application database: updates catalog
- Video management → Follower notifications: notifies on publish
README.md - Mux → Mux asset webhook: sends asset event
README.md - Mux asset webhook → Video hosting: builds thumbnail URL
src/app/api/mux/webhook/route.ts - Mux asset webhook → Application database: updates ready asset
src/app/api/mux/webhook/route.ts - Mux asset webhook → Follower notifications: fans out notices
src/app/api/mux/webhook/route.ts - Follower notifications → Application database: stores notices
src/lib/notifications.ts - Stripe → Stripe webhook: sends billing event
README.md - Stripe webhook → Plan changes: applies plan
src/app/api/stripe/webhook/route.ts - Plan changes → Application database: updates subscription
src/lib/billing.ts