# redatest/gparc architecture

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

- Interactive diagram: https://gitdiagram.com/redatest/gparc
- Repository: https://github.com/redatest/gparc

## Overview

GPARC is an IT asset and incident-management application. Users search, register, and manage equipment; report faults; track repairs; and consult dashboards or print intervention records. The repository provides a Node/SQLite web mode and a standalone Flask/SQLite mode. Administration covers reference data and equipment models, while an optional Oracle integration synchronizes enterprise data. The README also documents browser-only offline operation with localStorage and later reconnection. Frontend source is not sampled, so UI-to-API links reflect documented capabilities; internal frontend wiring is not inferred.

Main entry points: [`server.ts`](https://github.com/redatest/gparc/blob/main/server.ts) (Web API), [`server/db.ts`](https://github.com/redatest/gparc/blob/main/server/db.ts) (SQLite access and setup), [`src/components`](https://github.com/redatest/gparc/tree/main/src/components) (Browser UI), [`server/oracleSync.ts`](https://github.com/redatest/gparc/blob/main/server/oracleSync.ts) (Oracle synchronization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interfaces"]
  node_browser["Browser UI"]
  node_offline["Offline workspace"]
  node_presets["Photo presets<br/>[presets.ts]"]
end

subgraph group_operations["Asset operations"]
  node_nodeapi["Web API<br/>[server.ts]"]
  node_flask["Standalone app<br/>[app.py]"]
  node_inventory["Equipment records<br/>[server.ts]"]
  node_incidents["Fault and repair tracking<br/>[server.ts]"]
  node_dashboard["Dashboard and reports<br/>[server.ts]"]
end

subgraph group_management["Administration and sync"]
  node_references["Reference data<br/>[server.ts]"]
  node_admin["Administration<br/>[server.ts]"]
  node_oracleapi["Oracle sync endpoints<br/>[server.ts]"]
  node_oraclesync["Oracle synchronization<br/>[oracleSync.ts]"]
end

subgraph group_persistence["Persistence"]
  node_dbmodule["SQLite access and setup<br/>[db.ts]"]
  node_sqlite[("GPARC database<br/>[gparc.db]")]
  node_localstorage[("Browser storage")]
end

node_user(("IT staff"))
node_oracle[("Oracle database")]

node_user -->|"uses"| node_browser
node_browser -->|"requests data"| node_nodeapi
node_browser -.->|"works offline"| node_offline
node_offline -.->|"persists locally"| node_localstorage
node_offline -.->|"reconnects to"| node_nodeapi
node_presets -->|"provides images"| node_browser
node_user -.->|"runs standalone"| node_flask
node_flask -->|"reads and writes"| node_sqlite
node_nodeapi -->|"handles requests"| node_inventory
node_nodeapi -->|"handles requests"| node_incidents
node_nodeapi -->|"serves views"| node_dashboard
node_nodeapi -->|"serves CRUD"| node_references
node_nodeapi -->|"serves CRUD"| node_admin
node_nodeapi -->|"serves sync"| node_oracleapi
node_inventory -->|"queries"| node_dbmodule
node_incidents -->|"queries"| node_dbmodule
node_dashboard -->|"queries"| node_dbmodule
node_references -->|"queries"| node_dbmodule
node_admin -->|"queries"| node_dbmodule
node_dbmodule -->|"reads and writes"| node_sqlite
node_oracleapi -.->|"dispatches"| node_oraclesync
node_oraclesync -.->|"imports and reads"| node_sqlite
node_oraclesync -.->|"synchronizes with"| node_oracle

click node_browser "https://github.com/redatest/gparc/tree/main/src/components"
click node_offline "https://github.com/redatest/gparc/tree/main/src/components"
click node_presets "https://github.com/redatest/gparc/blob/main/src/data/presets.ts"
click node_nodeapi "https://github.com/redatest/gparc/blob/main/server.ts"
click node_flask "https://github.com/redatest/gparc/blob/main/flask_app/app.py"
click node_inventory "https://github.com/redatest/gparc/blob/main/server.ts"
click node_incidents "https://github.com/redatest/gparc/blob/main/server.ts"
click node_dashboard "https://github.com/redatest/gparc/blob/main/server.ts"
click node_references "https://github.com/redatest/gparc/blob/main/server.ts"
click node_admin "https://github.com/redatest/gparc/blob/main/server.ts"
click node_oracleapi "https://github.com/redatest/gparc/blob/main/server.ts"
click node_oraclesync "https://github.com/redatest/gparc/blob/main/server/oracleSync.ts"
click node_dbmodule "https://github.com/redatest/gparc/blob/main/server/db.ts"
click node_sqlite "https://github.com/redatest/gparc/blob/main/data/gparc.db"

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_browser,node_offline,node_presets toneBlue
class node_nodeapi,node_flask,node_inventory,node_incidents,node_dashboard,node_oracle toneAmber
class node_references,node_admin,node_oracleapi,node_oraclesync toneMint
class node_dbmodule,node_sqlite,node_localstorage toneRose
class node_user toneIndigo
```

## Components

### User interfaces

- [Browser UI](https://github.com/redatest/gparc/tree/main/src/components): `src/components`
- [Offline workspace](https://github.com/redatest/gparc/tree/main/src/components): `src/components`
- [Photo presets](https://github.com/redatest/gparc/blob/main/src/data/presets.ts): `src/data/presets.ts`

### Asset operations

- [Web API](https://github.com/redatest/gparc/blob/main/server.ts): `server.ts`
- [Standalone app](https://github.com/redatest/gparc/blob/main/flask_app/app.py): `flask_app/app.py`
- [Equipment records](https://github.com/redatest/gparc/blob/main/server.ts): `server.ts`
- [Fault and repair tracking](https://github.com/redatest/gparc/blob/main/server.ts): `server.ts`
- [Dashboard and reports](https://github.com/redatest/gparc/blob/main/server.ts): `server.ts`

### Administration and sync

- [Reference data](https://github.com/redatest/gparc/blob/main/server.ts): `server.ts`
- [Administration](https://github.com/redatest/gparc/blob/main/server.ts): `server.ts`
- [Oracle sync endpoints](https://github.com/redatest/gparc/blob/main/server.ts): `server.ts`
- [Oracle synchronization](https://github.com/redatest/gparc/blob/main/server/oracleSync.ts): `server/oracleSync.ts`

### Persistence

- [SQLite access and setup](https://github.com/redatest/gparc/blob/main/server/db.ts): `server/db.ts`
- [GPARC database](https://github.com/redatest/gparc/blob/main/data/gparc.db): `data/gparc.db`
- **Browser storage**

### Other components

- **IT staff**
- **Oracle database**

## Connections

- IT staff → Browser UI: uses
- Browser UI → Web API: requests data
- Browser UI → Offline workspace: works offline
- Offline workspace → Browser storage: persists locally
- Offline workspace → Web API: reconnects to
- Photo presets → Browser UI: provides images
- IT staff → Standalone app: runs standalone
- Standalone app → GPARC database: reads and writes
- Web API → Equipment records: handles requests
- Web API → Fault and repair tracking: handles requests
- Web API → Dashboard and reports: serves views
- Web API → Reference data: serves CRUD
- Web API → Administration: serves CRUD
- Web API → Oracle sync endpoints: serves sync
- Equipment records → SQLite access and setup: queries
- Fault and repair tracking → SQLite access and setup: queries
- Dashboard and reports → SQLite access and setup: queries
- Reference data → SQLite access and setup: queries
- Administration → SQLite access and setup: queries
- SQLite access and setup → GPARC database: reads and writes
- Oracle sync endpoints → Oracle synchronization: dispatches
- Oracle synchronization → GPARC database: imports and reads
- Oracle synchronization → Oracle database: synchronizes with
