# aliensofmars1/copkotd architecture

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

- Interactive diagram: https://gitdiagram.com/aliensofmars1/copkotd
- Repository: https://github.com/aliensofmars1/copkotd

## Overview

This is a Flask church-management and public-site application. Staff authenticate and use role-specific dashboards and administration routes to manage members, families, ministries, user accounts, and public-facing content; the public site serves that content and health resources. SQLAlchemy models provide the persistent domain layer, while Cloudinary handles image storage. The README is empty, so the product capabilities and links below are based on the source index and available excerpts; unsampled subsystems are included where the index establishes them, without guessing their internal flows.

Main entry points: [`app/__init__.py`](https://github.com/aliensofmars1/copkotd/blob/main/app/__init__.py) (App setup), [`app/dashboard/routes.py`](https://github.com/aliensofmars1/copkotd/blob/main/app/dashboard/routes.py) (Role dashboards), [`app/auth/decorators.py`](https://github.com/aliensofmars1/copkotd/blob/main/app/auth/decorators.py) (Role checks), [`app/models/member.py`](https://github.com/aliensofmars1/copkotd/blob/main/app/models/member.py) (Member records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and dashboards"]
  node_app_factory["App setup<br/>[__init__.py]"]
  node_auth["Authentication<br/>[routes.py]"]
  node_access_control["Role checks<br/>[decorators.py]"]
  node_dashboards["Role dashboards<br/>[routes.py]"]
  node_user_admin["User administration<br/>[routes.py]"]
end

subgraph group_records["People and organization"]
  node_member_admin["Member administration<br/>[routes.py]"]
  node_member_forms["Member forms<br/>[forms.py]"]
  node_family_admin["Family administration<br/>[routes.py]"]
  node_ministry_admin["Ministry administration<br/>[routes.py]"]
  node_member_data["Member records<br/>[member.py]"]
  node_family_data["Family records<br/>[family.py]"]
  node_ministry_data["Ministry records<br/>[ministry.py]"]
  node_user_data["User records<br/>[user.py]"]
end

subgraph group_publishing["Publishing and media"]
  node_content_admin["Content management<br/>[routes.py]"]
  node_gallery_admin["Gallery management<br/>[gallery_routes.py]"]
  node_health_admin["Health publishing<br/>[health_admin.py]"]
  node_homepage_data["Homepage content<br/>[homepage.py]"]
  node_gallery_data["Gallery records<br/>[gallery.py]"]
  node_health_data["Health articles<br/>[health.py]"]
end

subgraph group_public["Public site"]
  node_public_site["Public pages<br/>[routes.py]"]
  node_public_announcements["Public announcements<br/>[announcements.py]"]
  node_public_gallery["Public gallery<br/>[gallery.py]"]
  node_public_health["Public health<br/>[health.py]"]
  node_sitemap["Sitemap<br/>[sitemap.py]"]
end

subgraph group_persistence["Persistence and integrations"]
  node_database[("SQL database<br/>[extensions.py]")]
  node_cloudinary["Cloudinary"]
  node_image_helper["Image uploads<br/>[cloudinary.py]"]
end

node_staff(("Church staff"))

node_app_factory -->|"registers routes"| node_auth
node_app_factory -->|"registers routes"| node_dashboards
node_app_factory -->|"registers routes"| node_user_admin
node_app_factory -->|"registers routes"| node_member_admin
node_app_factory -->|"registers routes"| node_family_admin
node_app_factory -->|"registers routes"| node_ministry_admin
node_app_factory -->|"registers routes"| node_content_admin
node_app_factory -->|"registers routes"| node_gallery_admin
node_app_factory -->|"registers routes"| node_public_site
node_staff -->|"signs in"| node_auth
node_dashboards -->|"checks roles"| node_access_control
node_user_admin -->|"checks roles"| node_access_control
node_member_admin -->|"checks roles"| node_access_control
node_family_admin -->|"checks roles"| node_access_control
node_ministry_admin -->|"checks roles"| node_access_control
node_content_admin -->|"checks roles"| node_access_control
node_user_admin -->|"manages accounts"| node_user_data
node_user_admin -->|"links members"| node_member_data
node_member_admin -->|"validates input"| node_member_forms
node_member_admin -->|"manages records"| node_member_data
node_family_admin -->|"manages records"| node_family_data
node_family_admin -->|"uses member records"| node_member_data
node_ministry_admin -->|"manages records"| node_ministry_data
node_dashboards -->|"reads statistics"| node_member_data
node_dashboards -->|"reads statistics"| node_family_data
node_dashboards -->|"reads statistics"| node_ministry_data
node_dashboards -->|"reads statistics"| node_user_data
node_dashboards -->|"reads content stats"| node_homepage_data
node_dashboards -->|"reads photo stats"| node_gallery_data
node_dashboards -->|"reads articles"| node_health_data
node_content_admin -->|"manages content"| node_homepage_data
node_gallery_admin -->|"manages photos"| node_gallery_data
node_health_admin -->|"manages articles"| node_health_data
node_public_site -->|"reads homepage content"| node_homepage_data
node_public_site -->|"reads health articles"| node_health_data
node_public_announcements -->|"reads announcements"| node_homepage_data
node_public_gallery -->|"reads photos"| node_gallery_data
node_public_health -->|"reads articles"| node_health_data
node_sitemap -->|"indexes articles"| node_health_data
node_content_admin -->|"uploads images"| node_image_helper
node_gallery_admin -->|"uploads images"| node_image_helper
node_health_admin -->|"uploads images"| node_image_helper
node_image_helper -->|"uploads and deletes"| node_cloudinary
node_auth -->|"checks credentials"| node_user_data
node_auth -.->|"persists sessions"| node_database
node_member_data -.->|"persists records"| node_database
node_family_data -.->|"persists records"| node_database
node_ministry_data -.->|"persists records"| node_database

click node_app_factory "https://github.com/aliensofmars1/copkotd/blob/main/app/__init__.py"
click node_auth "https://github.com/aliensofmars1/copkotd/blob/main/app/auth/routes.py"
click node_access_control "https://github.com/aliensofmars1/copkotd/blob/main/app/auth/decorators.py"
click node_dashboards "https://github.com/aliensofmars1/copkotd/blob/main/app/dashboard/routes.py"
click node_user_admin "https://github.com/aliensofmars1/copkotd/blob/main/app/users/routes.py"
click node_member_admin "https://github.com/aliensofmars1/copkotd/blob/main/app/members/routes.py"
click node_member_forms "https://github.com/aliensofmars1/copkotd/blob/main/app/members/forms.py"
click node_family_admin "https://github.com/aliensofmars1/copkotd/blob/main/app/families/routes.py"
click node_ministry_admin "https://github.com/aliensofmars1/copkotd/blob/main/app/ministries/routes.py"
click node_member_data "https://github.com/aliensofmars1/copkotd/blob/main/app/models/member.py"
click node_family_data "https://github.com/aliensofmars1/copkotd/blob/main/app/models/family.py"
click node_ministry_data "https://github.com/aliensofmars1/copkotd/blob/main/app/models/ministry.py"
click node_user_data "https://github.com/aliensofmars1/copkotd/blob/main/app/models/user.py"
click node_content_admin "https://github.com/aliensofmars1/copkotd/blob/main/app/content/routes.py"
click node_gallery_admin "https://github.com/aliensofmars1/copkotd/blob/main/app/content/gallery_routes.py"
click node_health_admin "https://github.com/aliensofmars1/copkotd/blob/main/app/content/health_admin.py"
click node_homepage_data "https://github.com/aliensofmars1/copkotd/blob/main/app/models/homepage.py"
click node_gallery_data "https://github.com/aliensofmars1/copkotd/blob/main/app/models/gallery.py"
click node_health_data "https://github.com/aliensofmars1/copkotd/blob/main/app/models/health.py"
click node_public_site "https://github.com/aliensofmars1/copkotd/blob/main/app/main/routes.py"
click node_public_announcements "https://github.com/aliensofmars1/copkotd/blob/main/app/main/announcements.py"
click node_public_gallery "https://github.com/aliensofmars1/copkotd/blob/main/app/main/gallery.py"
click node_public_health "https://github.com/aliensofmars1/copkotd/blob/main/app/main/health.py"
click node_sitemap "https://github.com/aliensofmars1/copkotd/blob/main/app/main/sitemap.py"
click node_database "https://github.com/aliensofmars1/copkotd/blob/main/app/extensions.py"
click node_image_helper "https://github.com/aliensofmars1/copkotd/blob/main/app/utils/cloudinary.py"

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_factory,node_auth,node_access_control,node_dashboards,node_user_admin toneBlue
class node_member_admin,node_member_forms,node_family_admin,node_ministry_admin,node_member_data,node_family_data,node_ministry_data,node_user_data toneAmber
class node_content_admin,node_gallery_admin,node_health_admin,node_homepage_data,node_gallery_data,node_health_data toneMint
class node_public_site,node_public_announcements,node_public_gallery,node_public_health,node_sitemap toneRose
class node_database,node_cloudinary,node_image_helper,node_staff toneIndigo
```

## Components

### Access and dashboards

- [App setup](https://github.com/aliensofmars1/copkotd/blob/main/app/__init__.py): `app/__init__.py`
- [Authentication](https://github.com/aliensofmars1/copkotd/blob/main/app/auth/routes.py): `app/auth/routes.py`
- [Role checks](https://github.com/aliensofmars1/copkotd/blob/main/app/auth/decorators.py): `app/auth/decorators.py`
- [Role dashboards](https://github.com/aliensofmars1/copkotd/blob/main/app/dashboard/routes.py): `app/dashboard/routes.py`
- [User administration](https://github.com/aliensofmars1/copkotd/blob/main/app/users/routes.py): `app/users/routes.py`

### People and organization

- [Member administration](https://github.com/aliensofmars1/copkotd/blob/main/app/members/routes.py): `app/members/routes.py`
- [Member forms](https://github.com/aliensofmars1/copkotd/blob/main/app/members/forms.py): `app/members/forms.py`
- [Family administration](https://github.com/aliensofmars1/copkotd/blob/main/app/families/routes.py): `app/families/routes.py`
- [Ministry administration](https://github.com/aliensofmars1/copkotd/blob/main/app/ministries/routes.py): `app/ministries/routes.py`
- [Member records](https://github.com/aliensofmars1/copkotd/blob/main/app/models/member.py): `app/models/member.py`
- [Family records](https://github.com/aliensofmars1/copkotd/blob/main/app/models/family.py): `app/models/family.py`
- [Ministry records](https://github.com/aliensofmars1/copkotd/blob/main/app/models/ministry.py): `app/models/ministry.py`
- [User records](https://github.com/aliensofmars1/copkotd/blob/main/app/models/user.py): `app/models/user.py`

### Publishing and media

- [Content management](https://github.com/aliensofmars1/copkotd/blob/main/app/content/routes.py): `app/content/routes.py`
- [Gallery management](https://github.com/aliensofmars1/copkotd/blob/main/app/content/gallery_routes.py): `app/content/gallery_routes.py`
- [Health publishing](https://github.com/aliensofmars1/copkotd/blob/main/app/content/health_admin.py): `app/content/health_admin.py`
- [Homepage content](https://github.com/aliensofmars1/copkotd/blob/main/app/models/homepage.py): `app/models/homepage.py`
- [Gallery records](https://github.com/aliensofmars1/copkotd/blob/main/app/models/gallery.py): `app/models/gallery.py`
- [Health articles](https://github.com/aliensofmars1/copkotd/blob/main/app/models/health.py): `app/models/health.py`

### Public site

- [Public pages](https://github.com/aliensofmars1/copkotd/blob/main/app/main/routes.py): `app/main/routes.py`
- [Public announcements](https://github.com/aliensofmars1/copkotd/blob/main/app/main/announcements.py): `app/main/announcements.py`
- [Public gallery](https://github.com/aliensofmars1/copkotd/blob/main/app/main/gallery.py): `app/main/gallery.py`
- [Public health](https://github.com/aliensofmars1/copkotd/blob/main/app/main/health.py): `app/main/health.py`
- [Sitemap](https://github.com/aliensofmars1/copkotd/blob/main/app/main/sitemap.py): `app/main/sitemap.py`

### Persistence and integrations

- [SQL database](https://github.com/aliensofmars1/copkotd/blob/main/app/extensions.py): `app/extensions.py`
- **Cloudinary**
- [Image uploads](https://github.com/aliensofmars1/copkotd/blob/main/app/utils/cloudinary.py): `app/utils/cloudinary.py`

### Other components

- **Church staff**

## Connections

- App setup → Authentication: registers routes (evidence: `app/__init__.py`)
- App setup → Role dashboards: registers routes (evidence: `app/__init__.py`)
- App setup → User administration: registers routes (evidence: `app/__init__.py`)
- App setup → Member administration: registers routes (evidence: `app/__init__.py`)
- App setup → Family administration: registers routes (evidence: `app/__init__.py`)
- App setup → Ministry administration: registers routes (evidence: `app/__init__.py`)
- App setup → Content management: registers routes (evidence: `app/__init__.py`)
- App setup → Gallery management: registers routes (evidence: `app/__init__.py`)
- App setup → Public pages: registers routes (evidence: `app/__init__.py`)
- Church staff → Authentication: signs in (evidence: `app/auth/routes.py`)
- Role dashboards → Role checks: checks roles (evidence: `app/dashboard/routes.py`)
- User administration → Role checks: checks roles (evidence: `app/users/routes.py`)
- Member administration → Role checks: checks roles (evidence: `app/members/routes.py`)
- Family administration → Role checks: checks roles (evidence: `app/families/routes.py`)
- Ministry administration → Role checks: checks roles (evidence: `app/ministries/routes.py`)
- Content management → Role checks: checks roles (evidence: `app/content/routes.py`)
- User administration → User records: manages accounts (evidence: `app/users/routes.py`)
- User administration → Member records: links members (evidence: `app/users/routes.py`)
- Member administration → Member forms: validates input (evidence: `app/members/routes.py`)
- Member administration → Member records: manages records (evidence: `app/members/routes.py`)
- Family administration → Family records: manages records (evidence: `app/families/routes.py`)
- Family administration → Member records: uses member records (evidence: `app/families/routes.py`)
- Ministry administration → Ministry records: manages records (evidence: `app/ministries/routes.py`)
- Role dashboards → Member records: reads statistics (evidence: `app/dashboard/routes.py`)
- Role dashboards → Family records: reads statistics (evidence: `app/dashboard/routes.py`)
- Role dashboards → Ministry records: reads statistics (evidence: `app/dashboard/routes.py`)
- Role dashboards → User records: reads statistics (evidence: `app/dashboard/routes.py`)
- Role dashboards → Homepage content: reads content stats (evidence: `app/dashboard/routes.py`)
- Role dashboards → Gallery records: reads photo stats (evidence: `app/dashboard/routes.py`)
- Role dashboards → Health articles: reads articles (evidence: `app/dashboard/routes.py`)
- Content management → Homepage content: manages content (evidence: `app/content/routes.py`)
- Gallery management → Gallery records: manages photos (evidence: `app/content/gallery_routes.py`)
- Health publishing → Health articles: manages articles (evidence: `app/content/health_admin.py`)
- Public pages → Homepage content: reads homepage content (evidence: `app/main/routes.py`)
- Public pages → Health articles: reads health articles (evidence: `app/main/routes.py`)
- Public announcements → Homepage content: reads announcements (evidence: `app/main/announcements.py`)
- Public gallery → Gallery records: reads photos (evidence: `app/main/gallery.py`)
- Public health → Health articles: reads articles (evidence: `app/main/health.py`)
- Sitemap → Health articles: indexes articles (evidence: `app/main/sitemap.py`)
- Content management → Image uploads: uploads images (evidence: `app/content/routes.py`)
- Gallery management → Image uploads: uploads images (evidence: `app/content/gallery_routes.py`)
- Health publishing → Image uploads: uploads images (evidence: `app/content/health_admin.py`)
- Image uploads → Cloudinary: uploads and deletes (evidence: `app/utils/cloudinary.py`)
- Authentication → User records: checks credentials (evidence: `app/auth/routes.py`)
- Authentication → SQL database: persists sessions (evidence: `app/auth/routes.py`)
- Member records → SQL database: persists records (evidence: `app/models/member.py`)
- Family records → SQL database: persists records (evidence: `app/models/family.py`)
- Ministry records → SQL database: persists records (evidence: `app/models/ministry.py`)
