# magollap/daymark architecture

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

- Interactive diagram: https://gitdiagram.com/magollap/daymark
- Repository: https://github.com/magollap/daymark

## Overview

Daymark is a self-hosted Flask attendance tracker. Users record attendance through the dashboard or API, then review calendar and reporting views; teams add role-scoped employee access, and to-dos and AI Skills extend the same workflow. The central Flask module owns routing and application behavior, with SQLAlchemy models providing persistence. The README documents several capabilities whose route implementations were not sampled, so those links are documented rather than inferred from unsampled code; the optional Ollama integration is shown separately.

Main entry points: [`attendance/__init__.py`](https://github.com/magollap/daymark/blob/main/attendance/__init__.py) (Flask web app), [`attendance/models.py`](https://github.com/magollap/daymark/blob/main/attendance/models.py) (Domain models), [`attendance/ai_skills.py`](https://github.com/magollap/daymark/blob/main/attendance/ai_skills.py) (AI Skills engine), [`attendance/customization.py`](https://github.com/magollap/daymark/blob/main/attendance/customization.py) (Workspace settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_dashboard["Calendar dashboard<br/>[__init__.py]"]
  node_reports["Reports and exports<br/>[__init__.py]"]
  node_aiui["AI chat interface<br/>[ai.js]"]
  node_help["In-app help<br/>[help.html]"]
end

subgraph group_workforce["Attendance and teams"]
  node_records["Attendance records<br/>[__init__.py]"]
  node_team["Team management<br/>[__init__.py]"]
  node_workspace["Workspace settings<br/>[customization.py]"]
end

subgraph group_assistance["AI and tasks"]
  node_todos["To-dos<br/>[__init__.py]"]
  node_ai["AI Skills engine<br/>[ai_skills.py]"]
  node_ollama["Ollama adapter<br/>[ai_ollama.py]"]
end

subgraph group_platform["Application and data"]
  node_web["Flask web app<br/>[__init__.py]"]
  node_api["Personal REST API<br/>[__init__.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_sqlite[("SQLite database")]
end

node_user(("Daymark user"))

node_user -->|"uses"| node_dashboard
node_user -->|"calls"| node_api
node_dashboard -->|"submits attendance"| node_web
node_web -->|"handles requests"| node_records
node_web -->|"serves reports"| node_reports
node_web -->|"serves team"| node_team
node_web -->|"serves settings"| node_workspace
node_web -->|"serves tasks"| node_todos
node_web -->|"serves API"| node_api
node_dashboard -->|"hosts chat"| node_aiui
node_aiui -->|"posts chat"| node_web
node_web -->|"handles intent"| node_ai
node_ai -->|"records attendance"| node_records
node_ai -->|"generates reports"| node_reports
node_ai -->|"adds tasks"| node_todos
node_ai -->|"tracks employees"| node_team
node_ollama -->|"interprets plans"| node_ai
node_web -->|"uses models"| node_models
node_workspace -->|"persists settings"| node_models
node_records -.->|"persists entries"| node_models
node_reports -.->|"reads attendance"| node_models
node_team -.->|"manages users"| node_models
node_todos -.->|"persists tasks"| node_models
node_api -.->|"reads and writes"| node_models
node_models -->|"stores records"| node_sqlite
node_user -->|"consults"| node_help
node_workspace -->|"configures optionally"| node_ollama
node_ollama -->|"delegates execution"| node_ai

click node_web "https://github.com/magollap/daymark/blob/main/attendance/__init__.py"
click node_dashboard "https://github.com/magollap/daymark/blob/main/attendance/__init__.py"
click node_records "https://github.com/magollap/daymark/blob/main/attendance/__init__.py"
click node_reports "https://github.com/magollap/daymark/blob/main/attendance/__init__.py"
click node_team "https://github.com/magollap/daymark/blob/main/attendance/__init__.py"
click node_workspace "https://github.com/magollap/daymark/blob/main/attendance/customization.py"
click node_todos "https://github.com/magollap/daymark/blob/main/attendance/__init__.py"
click node_api "https://github.com/magollap/daymark/blob/main/attendance/__init__.py"
click node_aiui "https://github.com/magollap/daymark/blob/main/attendance/static/ai.js"
click node_ai "https://github.com/magollap/daymark/blob/main/attendance/ai_skills.py"
click node_ollama "https://github.com/magollap/daymark/blob/main/attendance/ai_ollama.py"
click node_models "https://github.com/magollap/daymark/blob/main/attendance/models.py"
click node_help "https://github.com/magollap/daymark/blob/main/attendance/templates/help.html"

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_dashboard,node_reports,node_aiui,node_help,node_user toneBlue
class node_records,node_team,node_workspace toneAmber
class node_todos,node_ai,node_ollama toneMint
class node_web,node_api,node_models,node_sqlite toneRose
```

## Components

### User experience

- [Calendar dashboard](https://github.com/magollap/daymark/blob/main/attendance/__init__.py): `attendance/__init__.py`
- [Reports and exports](https://github.com/magollap/daymark/blob/main/attendance/__init__.py): `attendance/__init__.py`
- [AI chat interface](https://github.com/magollap/daymark/blob/main/attendance/static/ai.js): `attendance/static/ai.js`
- [In-app help](https://github.com/magollap/daymark/blob/main/attendance/templates/help.html): `attendance/templates/help.html`

### Attendance and teams

- [Attendance records](https://github.com/magollap/daymark/blob/main/attendance/__init__.py): `attendance/__init__.py`
- [Team management](https://github.com/magollap/daymark/blob/main/attendance/__init__.py): `attendance/__init__.py`
- [Workspace settings](https://github.com/magollap/daymark/blob/main/attendance/customization.py): `attendance/customization.py`

### AI and tasks

- [To-dos](https://github.com/magollap/daymark/blob/main/attendance/__init__.py): `attendance/__init__.py`
- [AI Skills engine](https://github.com/magollap/daymark/blob/main/attendance/ai_skills.py): `attendance/ai_skills.py`
- [Ollama adapter](https://github.com/magollap/daymark/blob/main/attendance/ai_ollama.py): `attendance/ai_ollama.py`

### Application and data

- [Flask web app](https://github.com/magollap/daymark/blob/main/attendance/__init__.py): `attendance/__init__.py`
- [Personal REST API](https://github.com/magollap/daymark/blob/main/attendance/__init__.py): `attendance/__init__.py`
- [Domain models](https://github.com/magollap/daymark/blob/main/attendance/models.py): `attendance/models.py`
- **SQLite database**

### Other components

- **Daymark user**

## Connections

- Daymark user → Calendar dashboard: uses (evidence: `README.md`)
- Daymark user → Personal REST API: calls (evidence: `README.md`)
- Calendar dashboard → Flask web app: submits attendance (evidence: `README.md`)
- Flask web app → Attendance records: handles requests (evidence: `README.md`)
- Flask web app → Reports and exports: serves reports (evidence: `README.md`)
- Flask web app → Team management: serves team (evidence: `README.md`)
- Flask web app → Workspace settings: serves settings (evidence: `README.md`)
- Flask web app → To-dos: serves tasks (evidence: `README.md`)
- Flask web app → Personal REST API: serves API (evidence: `README.md`)
- Calendar dashboard → AI chat interface: hosts chat (evidence: `README.md`)
- AI chat interface → Flask web app: posts chat (evidence: `attendance/static/ai.js`)
- Flask web app → AI Skills engine: handles intent (evidence: `README.md`)
- AI Skills engine → Attendance records: records attendance (evidence: `README.md`)
- AI Skills engine → Reports and exports: generates reports (evidence: `README.md`)
- AI Skills engine → To-dos: adds tasks (evidence: `README.md`)
- AI Skills engine → Team management: tracks employees (evidence: `README.md`)
- Ollama adapter → AI Skills engine: interprets plans (evidence: `attendance/ai_ollama.py`)
- Flask web app → Domain models: uses models (evidence: `attendance/__init__.py`)
- Workspace settings → Domain models: persists settings (evidence: `attendance/customization.py`)
- Attendance records → Domain models: persists entries (evidence: `attendance/__init__.py`)
- Reports and exports → Domain models: reads attendance (evidence: `attendance/__init__.py`)
- Team management → Domain models: manages users (evidence: `attendance/__init__.py`)
- To-dos → Domain models: persists tasks (evidence: `attendance/__init__.py`)
- Personal REST API → Domain models: reads and writes (evidence: `attendance/__init__.py`)
- Domain models → SQLite database: stores records (evidence: `attendance/models.py`)
- Daymark user → In-app help: consults (evidence: `README.md`)
- Workspace settings → Ollama adapter: configures optionally (evidence: `attendance/customization.py`)
- Ollama adapter → AI Skills engine: delegates execution (evidence: `attendance/ai_ollama.py`)
