# suryas2007/odivilaiyaadu architecture

> Architecture diagram of the GitHub repository suryas2007/odivilaiyaadu, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suryas2007/odivilaiyaadu
- Repository: https://github.com/suryas2007/odivilaiyaadu

## Overview

Odi Vilaiyaadu is a mobile event-management app for AmChaTS traditional-games events. Its user-facing workflow spans authentication, parent-managed child profiles, event and game administration, and recording scores and results; volunteer coordination and organizational information are additional capabilities. The sampled sources show root-level loading and notification registration, Supabase-backed profile and scoring operations, and division score-table rendering. Many route screens and stores were not sampled, so their internal calls and data flow are not inferred.

Main entry points: [`mobile/app/_layout.tsx`](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/_layout.tsx) (Root layout), [`mobile/components/DivisionAccordion.tsx`](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/components/DivisionAccordion.tsx) (Division scoring), [`mobile/store/auth-store.ts`](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/store/auth-store.ts) (Authentication), [`mobile/config/supabase.ts`](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/config/supabase.ts) (Supabase backend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and access"]
  node_entry["Expo entry<br/>[App.tsx]"]
  node_root["Root layout<br/>[_layout.tsx]"]
  node_auth["Authentication<br/>[auth-store.ts]"]
  node_authroutes["Login and signup<br/>[login.tsx]"]
  node_home["Home screen<br/>[index.tsx]"]
  node_language["Translations<br/>[index.ts]"]
end

subgraph group_events["Event operations"]
  node_eventroutes["Event management<br/>[index.tsx]"]
  node_eventdetail["Event and games<br/>[index.tsx]"]
  node_eventedit["Event editing<br/>[&#91;eventId&#93;.tsx]"]
  node_gameedit["Game editing<br/>[&#91;gameId&#93;.tsx]"]
  node_eventsstore["Event state<br/>[events-store.ts]"]
end

subgraph group_community["Participants and community"]
  node_children["Child profiles<br/>[children-store.ts]"]
  node_parentroutes["Parent management<br/>[index.tsx]"]
  node_volunteer["Volunteer coordination<br/>[volunteer.tsx]"]
  node_info["Organization information<br/>[index.tsx]"]
end

subgraph group_platform["Services and results"]
  node_division["Division scoring"]
  node_scoretable["Score table<br/>[ScoreCardTable.tsx]"]
  node_divisions["Age divisions<br/>[divisions.ts]"]
  node_scores["Score calculations<br/>[score.ts]"]
  node_supabase[("Supabase backend<br/>[supabase.ts]")]
  node_notifications["Push notifications<br/>[notification.ts]"]
  node_publish["Division notifications<br/>[index.ts]"]
  node_deleteaccount["Account deletion<br/>[index.ts]"]
end

node_user(("App user"))

node_user -->|"opens app"| node_entry
node_entry -.->|"starts routing"| node_root
node_root -->|"loads user"| node_auth
node_root -->|"fetches events"| node_eventsstore
node_root -->|"registers token"| node_notifications
node_root -->|"saves push token"| node_auth
node_user -.->|"authenticates"| node_authroutes
node_authroutes -.->|"uses auth state"| node_auth
node_home -->|"reads session"| node_auth
node_home -->|"reads events"| node_eventsstore
node_user -.->|"manages events"| node_eventroutes
node_eventroutes -.->|"opens event"| node_eventdetail
node_user -.->|"manages children"| node_parentroutes
node_parentroutes -.->|"uses child state"| node_children
node_user -.->|"coordinates volunteering"| node_volunteer
node_user -.->|"reads information"| node_info
node_eventdetail -.->|"renders divisions"| node_division
node_division -->|"renders scores"| node_scoretable
node_division -->|"assigns medals"| node_scores
node_division -->|"updates results"| node_supabase
node_division -.->|"uses division data"| node_divisions
node_root -.->|"provides translations"| node_language
node_publish -.->|"uses backend"| node_supabase
node_deleteaccount -.->|"uses backend"| node_supabase

click node_entry "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/App.tsx"
click node_root "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/_layout.tsx"
click node_auth "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/store/auth-store.ts"
click node_authroutes "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(modal)/auth/login.tsx"
click node_home "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/index.tsx"
click node_eventroutes "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/index.tsx"
click node_eventdetail "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/%5BeventId%5D/index.tsx"
click node_eventedit "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/edit/%5BeventId%5D.tsx"
click node_gameedit "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/%5BeventId%5D/games/edit/%5BgameId%5D.tsx"
click node_children "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/store/children-store.ts"
click node_parentroutes "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/parent/index.tsx"
click node_volunteer "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/volunteer.tsx"
click node_info "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/info/index.tsx"
click node_division "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/components/DivisionAccordion.tsx"
click node_scoretable "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/components/ScoreCardTable.tsx"
click node_divisions "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/constants/divisions.ts"
click node_scores "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/utils/score.ts"
click node_eventsstore "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/store/events-store.ts"
click node_supabase "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/config/supabase.ts"
click node_notifications "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/utils/notification.ts"
click node_publish "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/supabase/functions/publish_division_notifications/index.ts"
click node_deleteaccount "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/supabase/functions/delete_account/index.ts"
click node_language "https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/i18n/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_root,node_auth,node_authroutes,node_home,node_language,node_user toneBlue
class node_eventroutes,node_eventdetail,node_eventedit,node_gameedit,node_eventsstore toneAmber
class node_children,node_parentroutes,node_volunteer,node_info toneMint
class node_division,node_scoretable,node_divisions,node_scores,node_supabase,node_notifications,node_publish,node_deleteaccount toneRose
```

## Components

### App and access

- [Expo entry](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/App.tsx): `mobile/App.tsx`
- [Root layout](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/_layout.tsx): `mobile/app/_layout.tsx`
- [Authentication](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/store/auth-store.ts): `mobile/store/auth-store.ts`
- [Login and signup](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(modal)/auth/login.tsx): `mobile/app/(modal)/auth/login.tsx`
- [Home screen](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/index.tsx): `mobile/app/(tabs)/index.tsx`
- [Translations](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/i18n/index.ts): `mobile/i18n/index.ts`

### Event operations

- [Event management](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/index.tsx): `mobile/app/(tabs)/events/index.tsx`
- [Event and games](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/%5BeventId%5D/index.tsx): `mobile/app/(tabs)/events/[eventId]/index.tsx`
- [Event editing](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/edit/%5BeventId%5D.tsx): `mobile/app/(tabs)/events/edit/[eventId].tsx`
- [Game editing](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/events/%5BeventId%5D/games/edit/%5BgameId%5D.tsx): `mobile/app/(tabs)/events/[eventId]/games/edit/[gameId].tsx`
- [Event state](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/store/events-store.ts): `mobile/store/events-store.ts`

### Participants and community

- [Child profiles](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/store/children-store.ts): `mobile/store/children-store.ts`
- [Parent management](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/parent/index.tsx): `mobile/app/(tabs)/parent/index.tsx`
- [Volunteer coordination](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/volunteer.tsx): `mobile/app/(tabs)/volunteer.tsx`
- [Organization information](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/app/(tabs)/info/index.tsx): `mobile/app/(tabs)/info/index.tsx`

### Services and results

- [Division scoring](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/components/DivisionAccordion.tsx): `mobile/components/DivisionAccordion.tsx`
- [Score table](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/components/ScoreCardTable.tsx): `mobile/components/ScoreCardTable.tsx`
- [Age divisions](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/constants/divisions.ts): `mobile/constants/divisions.ts`
- [Score calculations](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/utils/score.ts): `mobile/utils/score.ts`
- [Supabase backend](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/config/supabase.ts): `mobile/config/supabase.ts`
- [Push notifications](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/utils/notification.ts): `mobile/utils/notification.ts`
- [Division notifications](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/supabase/functions/publish_division_notifications/index.ts): `mobile/supabase/functions/publish_division_notifications/index.ts`
- [Account deletion](https://github.com/suryas2007/odivilaiyaadu/blob/main/mobile/supabase/functions/delete_account/index.ts): `mobile/supabase/functions/delete_account/index.ts`

### Other components

- **App user**

## Connections

- App user → Expo entry: opens app (evidence: `mobile/App.tsx`)
- Expo entry → Root layout: starts routing
- Root layout → Authentication: loads user (evidence: `mobile/app/_layout.tsx`)
- Root layout → Event state: fetches events (evidence: `mobile/app/_layout.tsx`)
- Root layout → Push notifications: registers token (evidence: `mobile/app/_layout.tsx`)
- Root layout → Authentication: saves push token (evidence: `mobile/app/_layout.tsx`)
- App user → Login and signup: authenticates
- Login and signup → Authentication: uses auth state
- Home screen → Authentication: reads session (evidence: `mobile/app/(tabs)/index.tsx`)
- Home screen → Event state: reads events (evidence: `mobile/app/(tabs)/index.tsx`)
- App user → Event management: manages events
- Event management → Event and games: opens event
- App user → Parent management: manages children
- Parent management → Child profiles: uses child state
- App user → Volunteer coordination: coordinates volunteering
- App user → Organization information: reads information
- Event and games → Division scoring: renders divisions
- Division scoring → Score table: renders scores (evidence: `mobile/components/DivisionAccordion.tsx`)
- Division scoring → Score calculations: assigns medals (evidence: `mobile/components/DivisionAccordion.tsx`)
- Division scoring → Supabase backend: updates results (evidence: `mobile/components/DivisionAccordion.tsx`)
- Division scoring → Age divisions: uses division data
- Root layout → Translations: provides translations
- Division notifications → Supabase backend: uses backend
- Account deletion → Supabase backend: uses backend
