Architecture Audit

Living documentation of system design & feature connections

Total Entities
104
AthleteAthleteProfileSportProfileAthleteSeasonStatsAthleteAssessmentAthleteBadgeAthleteMediaAthleteNetworkAthleteSkillEntryAthleteStatEntryAthleteTeamRosterAthleteWeeklyProgressAthleteWorkoutPlanBadgeDefinitionBookingRequestCampCampRegistrationCampSessionCardTemplateCardTradeCollegeContentModerationQueueDevChangelogDrillExerciseExerciseCategoryExerciseLogEntryExerciseMetricDefExercisePRFacilityFacilityStaffFeatureLogGameGameDayRosterGameDayRosterEntryGameDriveGameScoreGameSettingsGameStateIssueReportLeagueMetricDefinitionMetricResultOrganizationPartnerProductPitchingProfilePlayPlayMappingConfigPositionPresetTeamLineupProductProductVariantRecruitingContactRegistrationPaymentRosterDraftRosterDraftPickSalesPartnerScheduleEventSchoolBlockoutShowcaseHittingStatsShowcasePitchingStatsSocialCommentSocialFollowSocialPostSportSportPositionSportRulesSportsCardStaffCheckInStoreItemStoreOrderStoreOrderItemTeamTeamApplicationTeamBillingInvoiceTeamMessageTeamSeasonRecordTeamStaffTournamentApplicationTournamentCostTournamentMatchupTournamentRefereeRatingTournamentStaffAssignmentTournamentStaffPaymentTrainerAvailabilityTrainerInviteTrainerProfileTrainerStoreItemTrainingSessionTrainingSessionRequestTryoutApplicationTryoutEventUsedGearListingWorkoutPlanWorkoutSessionOpponentGameRosterOpponentGameRosterEntryAccountingLedgerAccountsPayableAccountsReceivableCoachEventEventRegistrationTenant
User Roles
8
Super Admin
Facility Admin
Coach
Trainer
Athlete
Parent/Guardian
Partner
Staff
Core Modules
15
Athletes
Teams
Coaches
Trainers
Facilities
Tournaments
Store
Sports Cards
Recruiting
Scheduling
Game Day
Play Mapping
Training
AI Tools
Admin
Recent Changes
2026-10-26Auto-Changelog Scan
2026-10-26QA Test Center
2026-10-26Automated Athlete Career Stats
2026-10-26Enhanced Game Day Scoring Rules
2026-10-26Dashboard UI Redesign

Total Records

0

Entities

103

Backend Functions

50

7 types

Integrations

5

Features Logged

82

+12 new since launch

Entity Breakdown

Core

User—
Athlete—
Team—
Organization—
Facility—
FacilitySurface—
FacilityManager—
FacilityStaff—

Rosters & Staffing

AthleteTeamRoster—
TeamStaff—
TeamApplication—
GameDayRoster—
GameDayRosterEntry—
OpponentGameRoster—
OpponentGameRosterEntry—
StaffCheckIn—

Game Day & Scoring

Game—
Play—
GameSettings—
AthleteSeasonStats—
PlayMappingConfig—
SportRule—
SportRules—
SportPosition—
PositionStat—

Training & Workouts

TrainingSession—
Drill—
WorkoutPlan—
WorkoutSession—
Exercise—
AthleteWeeklyProgress—
ExerciseCategory—
ExerciseLogEntry—
ExercisePR—
ExerciseMetricDef—
AthleteWorkoutPlan—

Schedule & Events

ScheduleEvent—
Camp—
Event—
EventRegistration—
TryoutEvent—
SchoolBlockout—

Tournaments

TournamentMatchup—
TournamentGameRoster—
TournamentStaffAssignment—
TournamentCost—
TournamentStaffPayment—
TournamentRefereeRating—
TournamentApplication—

Commerce & Finance

StoreItem—
StoreOrder—
StoreOrderItem—
TeamStoreOrder—
TrainerStoreItem—
UsedGearListing—
PartnerProduct—
Invoice—
AccountsReceivable—
AccountsPayable—
AccountingLedger—
RegistrationPayment—

Cards & Media

CardTemplate—
SportsCard—
CardTrade—
AthleteMedia—

Injuries & Health

AthleteInjury—
RehabLog—
InjuryApproval—

Badges & Recognition

BadgeDefinition—
AthleteBadge—

Recruiting

RecruitingContact—
College—
League—
Sport—
Position—
AthletePosition—

Metrics & Analysis

AthleteAssessment—
MetricDefinition—
MetricResult—
AthleteStatEntry—
AthleteSkillEntry—
AthleteProfile—

Bookings & Trainers

TrainerProfile—
TrainingSessionRequest—
BookingRequest—
TrainerAvailability—
TrainerInvite—

Partners & Sales

SalesPartner—
Tenant—

Admin & Logs

DevChangelog—
ConversationHistory—
FeatureLog—
IssueReport—
ContentModerationQueue—

Other

TeamMessage—
CampSession—
CampRegistration—
TryoutApplication—
TeamBillingInvoice—
RosterDraft—
RosterDraftPick—
RosterDraftPick—
TeamSeasonRecord—

Backend Functions (50)

scheduled

5 functions

entity

6 functions

payment

9 functions

webhook

2 functions

email

14 functions

ai

3 functions

utility

11 functions

sendPendingRosterReminders

scheduled
daily @ 9am ET

sendTrainingReminders

scheduled
recurring

coachWeeklySummary

scheduled
weekly

checkAndSendPaymentReminders

scheduled
recurring

autoUpdateInjuryStatus

scheduled
recurring

autoCreateAthleteCard

entity
SportsCard.create

syncCardOnRosterChange

entity
AthleteTeamRoster.update

syncCardOnStatChange

entity
AthleteStatEntry.create/update

onAthletePositionAssigned

entity
AthletePosition.create

syncEventSchedule

entity
ScheduleEvent.create/update

syncCoachCalendar

entity
ScheduleEvent.create/update

stripeCheckout

payment
Store/registration checkout

stripeVerifyPayment

webhook
Stripe webhook

facilityCheckout

payment
Facility store checkout

facilityCheckoutComplete

webhook
Stripe webhook (facility)

createPaymentSchedule

payment
Registration payment plan

processRegistrationPayment

payment
Registration payment

generateRegistrationInvoice

payment
Registration created

generateInvoice

payment
Manual / admin action

processRefund

payment
Admin refund action

processGearSale

payment
Gear purchase

requestPartnerPayoutApproval

payment
Partner payout request

sendEventConfirmation

email
Event registration

sendAthleteWelcomeEmail

email
Athlete created

sendPaymentReminder

email
Overdue payment

sendInvoiceNotifications

email
Invoice event

sendModerationNotification

email
Content flagged

sendOrderStatusNotification

email
Order status change

sendPurchaseNotification

email
Purchase completed

sendLowStockAlert

email
Low inventory

sendRefereeRatingNotification

email
Referee rated

sendTournamentAcceptanceEmail

email
Tournament team accepted

sendPayoutScheduledNotification

email
Payout scheduled

sendPayoutTransferredNotification

email
Payout transferred

notifyBadgeAwarded

email
Badge awarded

notifyRosterAdd

email
Player added to roster

aiRosterBuilder

ai
Coach action

aiTeamBuilder

ai
Admin action

moderateCardContent

ai
Card create/update

bulkImportAthletes

utility
Admin upload

importOpponentRoster

utility
Game day roster import

importForgeGame

utility
Game import

generateDemoSportsData

utility
Admin demo seeding

generateEventQRCode

utility
Event registration

validateEventCheckIn

utility
Staff QR scan

verifyTicket

utility
Ticket scan

setUserInitialRole

utility
User registration

syncCampSchedule

utility
Camp schedule update

handleTrainingRequest

utility
Training session request

trainingPlanSubscription

utility
Plan subscription action

External Integrations

Stripe

Payment

active

SendGrid/Email

Email

active

Google Calendar

OAuth

available

LLM (Claude/GPT)

AI

active

Supabase

App User Connector

registered

🔄 Key Data Flows

Teams: Athlete → AthleteTeamRoster → Team → ScheduleEvent → Game
Game Day: Game → GameDayRoster → GameDayRosterEntry → Play → AthleteSeasonStats
Facilities: Facility → FacilitySurface (camera_urls) → VideoRecorderPanel → Play
Injuries: AthleteInjury → InjuryApproval → RehabLog → AthleteProfile
Training: Drill → ScheduleEvent → TrainingSession → AthleteWeeklyProgress
Commerce: StoreItem → StoreOrder → Stripe → Invoice → Notification
Tournaments: Event → TournamentMatchup → Results → Payments & Ratings
Sport Config: SportPosition + PlayMappingConfig + SportRule → GameDayScoring UI

💡 Living Document

This document is AI-generated from the app's entity, page, and function catalog. It auto-updates when major entities change (debounced to once per hour) and can be manually regenerated anytime with the "Re-generate with AI" button. All versions are saved to the Dev Changelog.