# daniel-escamilla/hackathon_serverpod architecture

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

- Interactive diagram: https://gitdiagram.com/daniel-escamilla/hackathon_serverpod
- Repository: https://github.com/daniel-escamilla/hackathon_serverpod

## Overview

Hackathon Serverpod is a household-chores app: members organize into a group, agree on task prices and proposals, complete and confirm tasks, earn coins, then use a group-managed reward shop. The Flutter app presents the workflow, repositories connect it to the generated Serverpod client, and the backend provides domain services and persistent data. The README documents the product stages and runtime services; sampled source did not include the Dart application or endpoint implementations, so detailed endpoint wiring is intentionally omitted.

Main entry points: [`hackathon_serverpod/hackathon_serverpod_server/lib/src`](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src) (Serverpod backend), [`hackathon_serverpod/hackathon_serverpod_flutter/lib/common/navigation.dart`](https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/common/navigation.dart) (Navigation and gates), [`hackathon_serverpod/hackathon_serverpod_flutter/lib/data`](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/data) (Data repositories), [`hackathon_serverpod/hackathon_serverpod_flutter/lib/main.dart`](https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/main.dart) (Flutter app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Flutter app"]
  node_app["Flutter app<br/>[main.dart]"]
  node_navigation["Navigation and gates<br/>[navigation.dart]"]
  node_auth_ui["Account flows"]
  node_group_ui["Group setup"]
  node_tasks_ui["Task workflow"]
  node_wallet_ui["Wallet view"]
  node_shop_ui["Reward shop"]
  node_repositories["Data repositories"]
end

subgraph group_client["API client"]
  node_client_lib["Generated client<br/>[client.dart]"]
  node_protocol["Domain protocol<br/>[protocol.dart]"]
end

subgraph group_backend["Server backend"]
  node_server["Serverpod backend"]
end

subgraph group_domains["Chores and rewards"]
  node_auth["Authentication"]
  node_groups["Groups and members"]
  node_tasks["Task voting and review"]
  node_wallet["Coin wallet"]
  node_shop["Rewards and purchases"]
  node_events["Group events"]
end

node_member(("Household member"))
node_database[("PostgreSQL")]
node_email["Serverpod Cloud"]

node_member -->|"uses"| node_app
node_app -->|"starts"| node_navigation
node_navigation -->|"routes"| node_auth_ui
node_navigation -->|"routes"| node_group_ui
node_navigation -->|"routes"| node_tasks_ui
node_navigation -->|"routes"| node_wallet_ui
node_navigation -->|"routes"| node_shop_ui
node_auth_ui -->|"requests auth"| node_repositories
node_group_ui -->|"requests groups"| node_repositories
node_tasks_ui -->|"requests tasks"| node_repositories
node_wallet_ui -->|"requests wallet"| node_repositories
node_shop_ui -->|"requests shop"| node_repositories
node_repositories -->|"calls API"| node_client_lib
node_client_lib -->|"sends requests"| node_server
node_server -->|"dispatches"| node_auth
node_server -->|"dispatches"| node_groups
node_server -->|"dispatches"| node_tasks
node_server -->|"dispatches"| node_wallet
node_server -->|"dispatches"| node_shop
node_server -->|"reads and writes"| node_database
node_auth -.->|"sends codes"| node_email

click node_app "https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/main.dart"
click node_navigation "https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/common/navigation.dart"
click node_auth_ui "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/auth"
click node_group_ui "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/group"
click node_tasks_ui "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/tasks"
click node_wallet_ui "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/wallet"
click node_shop_ui "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/shop"
click node_repositories "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/data"
click node_client_lib "https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_client/lib/src/protocol/client.dart"
click node_protocol "https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_client/lib/src/protocol/protocol.dart"
click node_server "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src"
click node_auth "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/auth"
click node_groups "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/groups"
click node_tasks "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/tasks"
click node_wallet "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/wallet"
click node_shop "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/shop"
click node_events "https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/events"

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_app,node_navigation,node_auth_ui,node_group_ui,node_tasks_ui,node_wallet_ui,node_shop_ui,node_repositories toneBlue
class node_client_lib,node_protocol,node_database toneAmber
class node_server,node_email toneMint
class node_auth,node_groups,node_tasks,node_wallet,node_shop,node_events toneRose
class node_member toneIndigo
```

## Components

### Flutter app

- [Flutter app](https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/main.dart): `hackathon_serverpod/hackathon_serverpod_flutter/lib/main.dart`
- [Navigation and gates](https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/common/navigation.dart): `hackathon_serverpod/hackathon_serverpod_flutter/lib/common/navigation.dart`
- [Account flows](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/auth): `hackathon_serverpod/hackathon_serverpod_flutter/lib/features/auth`
- [Group setup](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/group): `hackathon_serverpod/hackathon_serverpod_flutter/lib/features/group`
- [Task workflow](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/tasks): `hackathon_serverpod/hackathon_serverpod_flutter/lib/features/tasks`
- [Wallet view](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/wallet): `hackathon_serverpod/hackathon_serverpod_flutter/lib/features/wallet`
- [Reward shop](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/features/shop): `hackathon_serverpod/hackathon_serverpod_flutter/lib/features/shop`
- [Data repositories](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_flutter/lib/data): `hackathon_serverpod/hackathon_serverpod_flutter/lib/data`

### API client

- [Generated client](https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_client/lib/src/protocol/client.dart): `hackathon_serverpod/hackathon_serverpod_client/lib/src/protocol/client.dart`
- [Domain protocol](https://github.com/daniel-escamilla/hackathon_serverpod/blob/develop/hackathon_serverpod/hackathon_serverpod_client/lib/src/protocol/protocol.dart): `hackathon_serverpod/hackathon_serverpod_client/lib/src/protocol/protocol.dart`

### Server backend

- [Serverpod backend](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src): `hackathon_serverpod/hackathon_serverpod_server/lib/src`

### Chores and rewards

- [Authentication](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/auth): `hackathon_serverpod/hackathon_serverpod_server/lib/src/auth`
- [Groups and members](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/groups): `hackathon_serverpod/hackathon_serverpod_server/lib/src/groups`
- [Task voting and review](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/tasks): `hackathon_serverpod/hackathon_serverpod_server/lib/src/tasks`
- [Coin wallet](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/wallet): `hackathon_serverpod/hackathon_serverpod_server/lib/src/wallet`
- [Rewards and purchases](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/shop): `hackathon_serverpod/hackathon_serverpod_server/lib/src/shop`
- [Group events](https://github.com/daniel-escamilla/hackathon_serverpod/tree/develop/hackathon_serverpod/hackathon_serverpod_server/lib/src/events): `hackathon_serverpod/hackathon_serverpod_server/lib/src/events`

### Other components

- **Household member**
- **PostgreSQL**
- **Serverpod Cloud**

## Connections

- Household member → Flutter app: uses
- Flutter app → Navigation and gates: starts
- Navigation and gates → Account flows: routes
- Navigation and gates → Group setup: routes
- Navigation and gates → Task workflow: routes
- Navigation and gates → Wallet view: routes
- Navigation and gates → Reward shop: routes
- Account flows → Data repositories: requests auth
- Group setup → Data repositories: requests groups
- Task workflow → Data repositories: requests tasks
- Wallet view → Data repositories: requests wallet
- Reward shop → Data repositories: requests shop
- Data repositories → Generated client: calls API
- Generated client → Serverpod backend: sends requests
- Serverpod backend → Authentication: dispatches
- Serverpod backend → Groups and members: dispatches
- Serverpod backend → Task voting and review: dispatches
- Serverpod backend → Coin wallet: dispatches
- Serverpod backend → Rewards and purchases: dispatches
- Serverpod backend → PostgreSQL: reads and writes
- Authentication → Serverpod Cloud: sends codes
