# tegonal/cohiva architecture

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

- Interactive diagram: https://gitdiagram.com/tegonal/cohiva
- Repository: https://github.com/tegonal/cohiva

## Overview

Cohiva is a housing-cooperative administration and community platform, with a Django backend and a Quasar/Vue progressive web app. The visible user workflow begins in the PWA, where users can log in and navigate reservation, calendar, repair, and credit-accounting screens. The backend tree also exposes distinct housing, reservation, accounting, import, and reporting domains. The graph shows route dispatches supported by the sampled router and Excel-import processing supported by source; backend-to-PWA endpoint wiring is omitted because it was not established by the excerpts.

Main entry points: [`pwa/src/router/routes.ts`](https://github.com/tegonal/cohiva/blob/develop/pwa/src/router/routes.ts) (Route table), [`pwa/src/pages/LoginPage.vue`](https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/LoginPage.vue) (Login screen), [`django/importer/services.py`](https://github.com/tegonal/cohiva/blob/develop/django/importer/services.py) (Excel import service), [`django/finance/accounting/manager.py`](https://github.com/tegonal/cohiva/blob/develop/django/finance/accounting/manager.py) (Accounting manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pwa["PWA interface"]
  node_router["Route table<br/>[routes.ts]"]
  node_mainlayout["Main layout<br/>[MainLayout.vue]"]
  node_subpagelayout["Subpage layout<br/>[SubpageLayout.vue]"]
  node_login["Login screen<br/>[LoginPage.vue]"]
  node_authflow["OAuth flow<br/>[oauth.ts]"]
  node_authstore["Auth state<br/>[auth-store.ts]"]
  node_reservationui["Reservation screens"]
  node_calendarui["Calendar screen<br/>[CalendarPage.vue]"]
  node_repairui["Repair screen<br/>[RepairPage.vue]"]
  node_creditui["Credit screen"]
end

subgraph group_housing["Housing administration"]
  node_portal["Member portal"]
  node_geno["Housing records"]
  node_genomodels[("Housing data<br/>[models.py]")]
end

subgraph group_operations["Reservations and imports"]
  node_reservation["Reservation service"]
  node_reservationmodels[("Reservation data<br/>[models.py]")]
  node_importer["Excel import service<br/>[services.py]"]
  node_importmodels[("Import job data<br/>[models.py]")]
end

subgraph group_finance["Finance and accounting"]
  node_credit["Credit accounting"]
  node_accounting["Accounting manager<br/>[manager.py]"]
  node_accountingbackends["Accounting backends"]
end

subgraph group_reporting["Reporting"]
  node_reports["Report tasks<br/>[tasks.py]"]
  node_reportdata[("Report data<br/>[models.py]")]
end

node_resident(("Housing user"))

node_resident -->|"navigates"| node_router
node_router -->|"dispatches"| node_mainlayout
node_router -->|"dispatches"| node_subpagelayout
node_router -->|"dispatches"| node_login
node_router -->|"dispatches"| node_reservationui
node_router -->|"dispatches"| node_calendarui
node_router -->|"dispatches"| node_repairui
node_router -->|"dispatches"| node_creditui
node_login -->|"uses"| node_authflow
node_accounting -->|"loads configured"| node_accountingbackends
node_importer -->|"records results"| node_importmodels
node_reports -->|"loads and updates"| node_reportdata

click node_router "https://github.com/tegonal/cohiva/blob/develop/pwa/src/router/routes.ts"
click node_mainlayout "https://github.com/tegonal/cohiva/blob/develop/pwa/src/layouts/MainLayout.vue"
click node_subpagelayout "https://github.com/tegonal/cohiva/blob/develop/pwa/src/layouts/SubpageLayout.vue"
click node_login "https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/LoginPage.vue"
click node_authflow "https://github.com/tegonal/cohiva/blob/develop/pwa/src/services/oauth.ts"
click node_authstore "https://github.com/tegonal/cohiva/blob/develop/pwa/src/stores/auth-store.ts"
click node_reservationui "https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/ReservationPage.vue"
click node_calendarui "https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/CalendarPage.vue"
click node_repairui "https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/RepairPage.vue"
click node_creditui "https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/CreditAccountingPage.vue"
click node_portal "https://github.com/tegonal/cohiva/tree/develop/django/portal"
click node_geno "https://github.com/tegonal/cohiva/tree/develop/django/geno"
click node_genomodels "https://github.com/tegonal/cohiva/blob/develop/django/geno/models.py"
click node_reservation "https://github.com/tegonal/cohiva/tree/develop/django/reservation"
click node_reservationmodels "https://github.com/tegonal/cohiva/blob/develop/django/reservation/models.py"
click node_importer "https://github.com/tegonal/cohiva/blob/develop/django/importer/services.py"
click node_importmodels "https://github.com/tegonal/cohiva/blob/develop/django/importer/models.py"
click node_credit "https://github.com/tegonal/cohiva/tree/develop/django/credit_accounting"
click node_accounting "https://github.com/tegonal/cohiva/blob/develop/django/finance/accounting/manager.py"
click node_accountingbackends "https://github.com/tegonal/cohiva/tree/develop/django/finance/accounting"
click node_reports "https://github.com/tegonal/cohiva/blob/develop/django/report/tasks.py"
click node_reportdata "https://github.com/tegonal/cohiva/blob/develop/django/report/models.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_router,node_mainlayout,node_subpagelayout,node_login,node_authflow,node_authstore,node_reservationui,node_calendarui,node_repairui,node_creditui,node_resident toneBlue
class node_portal,node_geno,node_genomodels toneAmber
class node_reservation,node_reservationmodels,node_importer,node_importmodels toneMint
class node_credit,node_accounting,node_accountingbackends toneRose
class node_reports,node_reportdata toneIndigo
```

## Components

### PWA interface

- [Route table](https://github.com/tegonal/cohiva/blob/develop/pwa/src/router/routes.ts): `pwa/src/router/routes.ts`
- [Main layout](https://github.com/tegonal/cohiva/blob/develop/pwa/src/layouts/MainLayout.vue): `pwa/src/layouts/MainLayout.vue`
- [Subpage layout](https://github.com/tegonal/cohiva/blob/develop/pwa/src/layouts/SubpageLayout.vue): `pwa/src/layouts/SubpageLayout.vue`
- [Login screen](https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/LoginPage.vue): `pwa/src/pages/LoginPage.vue`
- [OAuth flow](https://github.com/tegonal/cohiva/blob/develop/pwa/src/services/oauth.ts): `pwa/src/services/oauth.ts`
- [Auth state](https://github.com/tegonal/cohiva/blob/develop/pwa/src/stores/auth-store.ts): `pwa/src/stores/auth-store.ts`
- [Reservation screens](https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/ReservationPage.vue): `pwa/src/pages/ReservationPage.vue`
- [Calendar screen](https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/CalendarPage.vue): `pwa/src/pages/CalendarPage.vue`
- [Repair screen](https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/RepairPage.vue): `pwa/src/pages/RepairPage.vue`
- [Credit screen](https://github.com/tegonal/cohiva/blob/develop/pwa/src/pages/CreditAccountingPage.vue): `pwa/src/pages/CreditAccountingPage.vue`

### Housing administration

- [Member portal](https://github.com/tegonal/cohiva/tree/develop/django/portal): `django/portal`
- [Housing records](https://github.com/tegonal/cohiva/tree/develop/django/geno): `django/geno`
- [Housing data](https://github.com/tegonal/cohiva/blob/develop/django/geno/models.py): `django/geno/models.py`

### Reservations and imports

- [Reservation service](https://github.com/tegonal/cohiva/tree/develop/django/reservation): `django/reservation`
- [Reservation data](https://github.com/tegonal/cohiva/blob/develop/django/reservation/models.py): `django/reservation/models.py`
- [Excel import service](https://github.com/tegonal/cohiva/blob/develop/django/importer/services.py): `django/importer/services.py`
- [Import job data](https://github.com/tegonal/cohiva/blob/develop/django/importer/models.py): `django/importer/models.py`

### Finance and accounting

- [Credit accounting](https://github.com/tegonal/cohiva/tree/develop/django/credit_accounting): `django/credit_accounting`
- [Accounting manager](https://github.com/tegonal/cohiva/blob/develop/django/finance/accounting/manager.py): `django/finance/accounting/manager.py`
- [Accounting backends](https://github.com/tegonal/cohiva/tree/develop/django/finance/accounting): `django/finance/accounting`

### Reporting

- [Report tasks](https://github.com/tegonal/cohiva/blob/develop/django/report/tasks.py): `django/report/tasks.py`
- [Report data](https://github.com/tegonal/cohiva/blob/develop/django/report/models.py): `django/report/models.py`

### Other components

- **Housing user**

## Connections

- Housing user → Route table: navigates
- Route table → Main layout: dispatches
- Route table → Subpage layout: dispatches
- Route table → Login screen: dispatches
- Route table → Reservation screens: dispatches
- Route table → Calendar screen: dispatches
- Route table → Repair screen: dispatches
- Route table → Credit screen: dispatches
- Login screen → OAuth flow: uses
- Accounting manager → Accounting backends: loads configured
- Excel import service → Import job data: records results
- Report tasks → Report data: loads and updates
