# shinnazukiii/backend-kua architecture

> Architecture diagram of the GitHub repository shinnazukiii/backend-kua, 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/shinnazukiii/backend-kua
- Repository: https://github.com/shinnazukiii/backend-kua

## Overview

KUA Frontend is an office-workflow application for user login, dashboards, and managing marriage recommendations, legalization, marriage registrations, and incoming/outgoing correspondence. Superadmin pages add user management and login-history views. The Vue router renders the pages; the dashboard fetches summary counts, and the recommendation page performs CRUD requests. The Express backend exposes corresponding API route modules, with the sampled user routes querying MySQL directly. The README is empty, and the sampled backend entry point references route paths that do not match the supplied tree, so links from frontend workflows to backend modules are shown as unverified.

Main entry points: [`kua_frontend/src/router/index.ts`](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/router/index.ts) (Page routing), [`kua_frontend/src/pages/DashboardPage.vue`](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/DashboardPage.vue) (Staff dashboard), [`src/index.ts`](https://github.com/shinnazukiii/backend-kua/blob/main/src/index.ts) (Express API entry), [`src/modules/rekomendasi/rekomendasiRoutes.ts`](https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/rekomendasi/rekomendasiRoutes.ts) (Recommendation API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Frontend navigation"]
  node_app["Vue application<br/>[App.vue]"]
  node_router["Page routing<br/>[index.ts]"]
  node_sidebar["Workflow navigation<br/>[Sidebar.vue]"]
  node_login["Staff login<br/>[LoginPage.vue]"]
  node_superlogin["Superadmin login"]
end

subgraph group_workflows["Office workflows"]
  node_dashboard["Staff dashboard<br/>[DashboardPage.vue]"]
  node_chart["Summary chart<br/>[PieChartChart.vue]"]
  node_rekom["Marriage recommendations"]
  node_legal["Legalization<br/>[LegalisirPage.vue]"]
  node_nikah["Marriage registration"]
  node_incoming["Incoming correspondence"]
  node_outgoing["Outgoing correspondence"]
end

subgraph group_admin["Administration"]
  node_superdash["Superadmin dashboard"]
  node_users["User management<br/>[KelolaUserPage.vue]"]
  node_logs["Login history<br/>[LoginLogsPage.vue]"]
end

subgraph group_backend["Backend API and storage"]
  node_api["Express API entry<br/>[index.ts]"]
  node_userapi["User API<br/>[user.routes.ts]"]
  node_rekomapi["Recommendation API"]
  node_legalapi["Legalization API<br/>[legalisirRoutes.ts]"]
  node_nikahapi["Marriage API"]
  node_incomingapi["Incoming agenda API"]
  node_outgoingapi["Outgoing agenda API"]
  node_db[("MySQL pool<br/>[db.ts]")]
end

node_user(("Staff or admin"))

node_user -->|"uses"| node_app
node_app -->|"renders routes"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_superlogin
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_superdash
node_router -->|"routes to"| node_rekom
node_router -->|"routes to"| node_legal
node_router -->|"routes to"| node_nikah
node_router -->|"routes to"| node_incoming
node_router -->|"routes to"| node_outgoing
node_router -->|"routes to"| node_users
node_router -->|"routes to"| node_logs
node_dashboard -->|"renders"| node_chart
node_dashboard -->|"fetches counts"| node_rekomapi
node_dashboard -->|"fetches counts"| node_legalapi
node_dashboard -->|"fetches counts"| node_nikahapi
node_dashboard -->|"fetches counts"| node_incomingapi
node_dashboard -->|"fetches counts"| node_outgoingapi
node_rekom -.->|"CRUD requests"| node_rekomapi
node_api -->|"mounts"| node_userapi
node_userapi -->|"queries"| node_db
node_api -.->|"mounts"| node_rekomapi
node_api -.->|"mounts"| node_legalapi
node_api -.->|"mounts"| node_nikahapi
node_api -.->|"mounts"| node_incomingapi
node_api -.->|"mounts"| node_outgoingapi

click node_app "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/App.vue"
click node_router "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/router/index.ts"
click node_sidebar "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/components/Sidebar.vue"
click node_login "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/LoginPage.vue"
click node_superlogin "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/SuperadminLoginPage.vue"
click node_dashboard "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/DashboardPage.vue"
click node_chart "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/components/PieChartChart.vue"
click node_rekom "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/RekomendasiPage.vue"
click node_legal "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/LegalisirPage.vue"
click node_nikah "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/PendaftaranNikahPage.vue"
click node_incoming "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/AgendaSuratMasukPage.vue"
click node_outgoing "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/AgendaSuratKeluarPage.vue"
click node_superdash "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/SuperadminDashboardPage.vue"
click node_users "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/KelolaUserPage.vue"
click node_logs "https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/LoginLogsPage.vue"
click node_api "https://github.com/shinnazukiii/backend-kua/blob/main/src/index.ts"
click node_userapi "https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/user/user.routes.ts"
click node_rekomapi "https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/rekomendasi/rekomendasiRoutes.ts"
click node_legalapi "https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/legalisir/legalisirRoutes.ts"
click node_nikahapi "https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/nikah/pendaftaranNikahRoutes.ts"
click node_incomingapi "https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/agendaSurat/agendaSuratMasukRoutes.ts"
click node_outgoingapi "https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/agendaSurat/agendaSuratKeluarRoutes.ts"
click node_db "https://github.com/shinnazukiii/backend-kua/blob/main/src/db.ts"

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,node_router,node_sidebar,node_login,node_superlogin toneBlue
class node_dashboard,node_chart,node_rekom,node_legal,node_nikah,node_incoming,node_outgoing toneAmber
class node_superdash,node_users,node_logs toneMint
class node_api,node_userapi,node_rekomapi,node_legalapi,node_nikahapi,node_incomingapi,node_outgoingapi,node_db toneRose
class node_user toneIndigo
```

## Components

### Frontend navigation

- [Vue application](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/App.vue): `kua_frontend/src/App.vue`
- [Page routing](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/router/index.ts): `kua_frontend/src/router/index.ts`
- [Workflow navigation](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/components/Sidebar.vue): `kua_frontend/src/components/Sidebar.vue`
- [Staff login](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/LoginPage.vue): `kua_frontend/src/pages/LoginPage.vue`
- [Superadmin login](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/SuperadminLoginPage.vue): `kua_frontend/src/pages/SuperadminLoginPage.vue`

### Office workflows

- [Staff dashboard](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/DashboardPage.vue): `kua_frontend/src/pages/DashboardPage.vue`
- [Summary chart](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/components/PieChartChart.vue): `kua_frontend/src/components/PieChartChart.vue`
- [Marriage recommendations](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/RekomendasiPage.vue): `kua_frontend/src/pages/RekomendasiPage.vue`
- [Legalization](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/LegalisirPage.vue): `kua_frontend/src/pages/LegalisirPage.vue`
- [Marriage registration](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/PendaftaranNikahPage.vue): `kua_frontend/src/pages/PendaftaranNikahPage.vue`
- [Incoming correspondence](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/AgendaSuratMasukPage.vue): `kua_frontend/src/pages/AgendaSuratMasukPage.vue`
- [Outgoing correspondence](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/AgendaSuratKeluarPage.vue): `kua_frontend/src/pages/AgendaSuratKeluarPage.vue`

### Administration

- [Superadmin dashboard](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/SuperadminDashboardPage.vue): `kua_frontend/src/pages/SuperadminDashboardPage.vue`
- [User management](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/KelolaUserPage.vue): `kua_frontend/src/pages/KelolaUserPage.vue`
- [Login history](https://github.com/shinnazukiii/backend-kua/blob/main/kua_frontend/src/pages/LoginLogsPage.vue): `kua_frontend/src/pages/LoginLogsPage.vue`

### Backend API and storage

- [Express API entry](https://github.com/shinnazukiii/backend-kua/blob/main/src/index.ts): `src/index.ts`
- [User API](https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/user/user.routes.ts): `src/modules/user/user.routes.ts`
- [Recommendation API](https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/rekomendasi/rekomendasiRoutes.ts): `src/modules/rekomendasi/rekomendasiRoutes.ts`
- [Legalization API](https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/legalisir/legalisirRoutes.ts): `src/modules/legalisir/legalisirRoutes.ts`
- [Marriage API](https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/nikah/pendaftaranNikahRoutes.ts): `src/modules/nikah/pendaftaranNikahRoutes.ts`
- [Incoming agenda API](https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/agendaSurat/agendaSuratMasukRoutes.ts): `src/modules/agendaSurat/agendaSuratMasukRoutes.ts`
- [Outgoing agenda API](https://github.com/shinnazukiii/backend-kua/blob/main/src/modules/agendaSurat/agendaSuratKeluarRoutes.ts): `src/modules/agendaSurat/agendaSuratKeluarRoutes.ts`
- [MySQL pool](https://github.com/shinnazukiii/backend-kua/blob/main/src/db.ts): `src/db.ts`

### Other components

- **Staff or admin**

## Connections

- Staff or admin → Vue application: uses
- Vue application → Page routing: renders routes (evidence: `kua_frontend/src/App.vue`)
- Page routing → Staff login: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Superadmin login: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Staff dashboard: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Superadmin dashboard: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Marriage recommendations: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Legalization: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Marriage registration: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Incoming correspondence: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Outgoing correspondence: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → User management: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Page routing → Login history: routes to (evidence: `kua_frontend/src/router/index.ts`)
- Staff dashboard → Summary chart: renders (evidence: `kua_frontend/src/pages/DashboardPage.vue`)
- Staff dashboard → Recommendation API: fetches counts (evidence: `kua_frontend/src/pages/DashboardPage.vue`)
- Staff dashboard → Legalization API: fetches counts (evidence: `kua_frontend/src/pages/DashboardPage.vue`)
- Staff dashboard → Marriage API: fetches counts (evidence: `kua_frontend/src/pages/DashboardPage.vue`)
- Staff dashboard → Incoming agenda API: fetches counts (evidence: `kua_frontend/src/pages/DashboardPage.vue`)
- Staff dashboard → Outgoing agenda API: fetches counts (evidence: `kua_frontend/src/pages/DashboardPage.vue`)
- Marriage recommendations → Recommendation API: CRUD requests
- Express API entry → User API: mounts (evidence: `src/index.ts`)
- User API → MySQL pool: queries (evidence: `src/modules/user/user.routes.ts`)
- Express API entry → Recommendation API: mounts
- Express API entry → Legalization API: mounts
- Express API entry → Marriage API: mounts
- Express API entry → Incoming agenda API: mounts
- Express API entry → Outgoing agenda API: mounts
