# fufckddl/2025_ai_hackathon_be architecture

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

- Interactive diagram: https://gitdiagram.com/fufckddl/2025_ai_hackathon_be
- Repository: https://github.com/fufckddl/2025_ai_hackathon_be

## Overview

ROUTY is a Flutter routine-management app backed by a Flask API and MySQL, intended to support children with ADHD and their parents. The user-facing workflow covers account access, routine management and completion, and parent-facing coaching; the README also describes a child-oriented chatbot and reward motivation. The web build is present, but its Dart source is not in this tree. Backend feature boundaries are inferred from documented capabilities and sampled app.py excerpts; unsampled endpoint wiring is not detailed here.

Main entry points: [`static/main.dart.js`](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/static/main.dart.js) (Flutter web app), [`DB/init.sql`](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/DB/init.sql) (MySQL database), [`app.py`](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py) (Coaching reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter client"]
  node_webapp["Flutter web app<br/>[main.dart.js]"]
end

subgraph group_api["Flask services"]
  node_auth["Account access<br/>[app.py]"]
  node_routines["Routine management<br/>[app.py]"]
  node_progress["Routine progress<br/>[app.py]"]
  node_characters["Character selection<br/>[app.py]"]
  node_chat["Child chatbot<br/>[app.py]"]
  node_coaching["Coaching reports<br/>[app.py]"]
  node_profile["Profile settings<br/>[app.py]"]
end

subgraph group_data["Persistent data"]
  node_mysql[("MySQL database<br/>[init.sql]")]
end

subgraph group_integrations["AI integration"]
  node_openai["OpenAI API"]
end

node_user(("Child or parent"))

node_user -->|"uses"| node_webapp
node_webapp -->|"API requests"| node_auth
node_webapp -->|"API requests"| node_routines
node_webapp -.->|"API requests"| node_progress
node_webapp -.->|"API requests"| node_characters
node_webapp -.->|"API requests"| node_chat
node_webapp -.->|"API requests"| node_coaching
node_webapp -.->|"API requests"| node_profile
node_auth -->|"reads and writes"| node_mysql
node_routines -->|"reads and writes"| node_mysql
node_progress -->|"queries"| node_mysql
node_characters -->|"updates"| node_mysql
node_coaching -->|"stores reports"| node_mysql
node_chat -->|"stores dialogue"| node_mysql
node_coaching -->|"generates report"| node_openai

click node_webapp "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/static/main.dart.js"
click node_auth "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py"
click node_routines "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py"
click node_progress "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py"
click node_characters "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py"
click node_chat "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py"
click node_coaching "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py"
click node_profile "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py"
click node_mysql "https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/DB/init.sql"

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_webapp toneBlue
class node_auth,node_routines,node_progress,node_characters,node_chat,node_coaching,node_profile toneAmber
class node_mysql toneMint
class node_openai toneRose
class node_user toneIndigo
```

## Components

### Flutter client

- [Flutter web app](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/static/main.dart.js): `static/main.dart.js`

### Flask services

- [Account access](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py): `app.py`
- [Routine management](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py): `app.py`
- [Routine progress](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py): `app.py`
- [Character selection](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py): `app.py`
- [Child chatbot](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py): `app.py`
- [Coaching reports](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py): `app.py`
- [Profile settings](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/app.py): `app.py`

### Persistent data

- [MySQL database](https://github.com/fufckddl/2025_ai_hackathon_be/blob/main/DB/init.sql): `DB/init.sql`

### AI integration

- **OpenAI API**

### Other components

- **Child or parent**

## Connections

- Child or parent → Flutter web app: uses (evidence: `README.md`)
- Flutter web app → Account access: API requests (evidence: `README.md`)
- Flutter web app → Routine management: API requests (evidence: `README.md`)
- Flutter web app → Routine progress: API requests
- Flutter web app → Character selection: API requests
- Flutter web app → Child chatbot: API requests
- Flutter web app → Coaching reports: API requests
- Flutter web app → Profile settings: API requests
- Account access → MySQL database: reads and writes (evidence: `app.py`)
- Routine management → MySQL database: reads and writes (evidence: `app.py`)
- Routine progress → MySQL database: queries (evidence: `app.py`)
- Character selection → MySQL database: updates (evidence: `app.py`)
- Coaching reports → MySQL database: stores reports (evidence: `app.py`)
- Child chatbot → MySQL database: stores dialogue (evidence: `app.py`)
- Coaching reports → OpenAI API: generates report (evidence: `app.py`)
