# nightrunners02/sistem-informasi-surat-perintah-membayar_spm architecture

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

- Interactive diagram: https://gitdiagram.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm
- Repository: https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm

## Overview

e-SPM is a browser-based government payment-order management application. Users sign in, work with SPM records through submission and review stages, monitor progress, and produce realization reports; administrators also manage reference and system data. The sampled entry point shows that App owns session and view state and dispatches the feature views. The README documents broader reporting and administration capabilities. No server-side transaction store or external integration is established by the excerpts, so those connections are omitted.

Main entry points: [`src/App.tsx`](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/App.tsx) (Session & Navigation), [`src/components/LaporanView.tsx`](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/LaporanView.tsx) (Realization Reports), [`src/main.tsx`](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/main.tsx) (React Entry), [`src/components/Login.tsx`](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/Login.tsx) (Sign In)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_entry["React Entry<br/>[main.tsx]"]
  node_shell["Session &amp; Navigation<br/>[App.tsx]"]
  node_login["Sign In<br/>[Login.tsx]"]
  node_roles["Role Switcher<br/>[RoleSwitcher.tsx]"]
end

subgraph group_transactions["SPM Workflow"]
  node_spm_list["SPM Register<br/>[SPMList.tsx]"]
  node_spm_form["SPM Submission<br/>[SPMForm.tsx]"]
  node_spm_detail["SPM Review &amp; SP2D<br/>[SPMDetail.tsx]"]
end

subgraph group_oversight["Monitoring &amp; Reports"]
  node_dashboard["Realization Dashboard<br/>[Dashboard.tsx]"]
  node_audit["Audit Trail<br/>[AuditTrailView.tsx]"]
  node_reports["Realization Reports<br/>[LaporanView.tsx]"]
end

subgraph group_admin["Administration &amp; Data"]
  node_master_data["Master Data"]
  node_seed_data["Initial Data &amp; Save<br/>[initialData.ts]"]
  node_domain_types["Domain Types<br/>[types.ts]"]
end

node_user(("Government Staff"))
node_jspdf["jsPDF"]
node_html2canvas["html2canvas"]

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_shell
node_shell -->|"shows when signed out"| node_login
node_shell -->|"renders"| node_roles
node_shell -->|"selects view"| node_spm_list
node_shell -->|"selects view"| node_spm_form
node_shell -->|"selects view"| node_spm_detail
node_shell -->|"selects view"| node_dashboard
node_shell -->|"selects view"| node_audit
node_shell -->|"selects view"| node_reports
node_shell -->|"selects view"| node_master_data
node_shell -->|"loads and saves"| node_seed_data
node_reports -->|"creates PDF"| node_jspdf
node_reports -->|"renders report canvas"| node_html2canvas

click node_entry "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/main.tsx"
click node_shell "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/App.tsx"
click node_login "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/Login.tsx"
click node_roles "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/RoleSwitcher.tsx"
click node_spm_list "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/SPMList.tsx"
click node_spm_form "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/SPMForm.tsx"
click node_spm_detail "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/SPMDetail.tsx"
click node_dashboard "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/Dashboard.tsx"
click node_audit "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/AuditTrailView.tsx"
click node_reports "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/LaporanView.tsx"
click node_master_data "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/AdminMasterData.tsx"
click node_seed_data "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/data/initialData.ts"
click node_domain_types "https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/types.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_entry,node_shell,node_login,node_roles toneBlue
class node_spm_list,node_spm_form,node_spm_detail toneAmber
class node_dashboard,node_audit,node_reports toneMint
class node_master_data,node_seed_data,node_domain_types toneRose
class node_user,node_jspdf,node_html2canvas toneIndigo
```

## Components

### Application Shell

- [React Entry](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/main.tsx): `src/main.tsx`
- [Session & Navigation](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/App.tsx): `src/App.tsx`
- [Sign In](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/Login.tsx): `src/components/Login.tsx`
- [Role Switcher](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/RoleSwitcher.tsx): `src/components/RoleSwitcher.tsx`

### SPM Workflow

- [SPM Register](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/SPMList.tsx): `src/components/SPMList.tsx`
- [SPM Submission](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/SPMForm.tsx): `src/components/SPMForm.tsx`
- [SPM Review & SP2D](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/SPMDetail.tsx): `src/components/SPMDetail.tsx`

### Monitoring & Reports

- [Realization Dashboard](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/Dashboard.tsx): `src/components/Dashboard.tsx`
- [Audit Trail](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/AuditTrailView.tsx): `src/components/AuditTrailView.tsx`
- [Realization Reports](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/LaporanView.tsx): `src/components/LaporanView.tsx`

### Administration & Data

- [Master Data](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/components/AdminMasterData.tsx): `src/components/AdminMasterData.tsx`
- [Initial Data & Save](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/data/initialData.ts): `src/data/initialData.ts`
- [Domain Types](https://github.com/nightrunners02/sistem-informasi-surat-perintah-membayar_spm/blob/main/src/types.ts): `src/types.ts`

### Other components

- **Government Staff**
- **jsPDF**
- **html2canvas**

## Connections

- Government Staff → React Entry: opens app (evidence: `src/main.tsx`)
- React Entry → Session & Navigation: renders (evidence: `src/main.tsx`)
- Session & Navigation → Sign In: shows when signed out (evidence: `src/App.tsx`)
- Session & Navigation → Role Switcher: renders (evidence: `src/App.tsx`)
- Session & Navigation → SPM Register: selects view (evidence: `src/App.tsx`)
- Session & Navigation → SPM Submission: selects view (evidence: `src/App.tsx`)
- Session & Navigation → SPM Review & SP2D: selects view (evidence: `src/App.tsx`)
- Session & Navigation → Realization Dashboard: selects view (evidence: `src/App.tsx`)
- Session & Navigation → Audit Trail: selects view (evidence: `src/App.tsx`)
- Session & Navigation → Realization Reports: selects view (evidence: `src/App.tsx`)
- Session & Navigation → Master Data: selects view (evidence: `src/App.tsx`)
- Session & Navigation → Initial Data & Save: loads and saves (evidence: `src/App.tsx`)
- Realization Reports → jsPDF: creates PDF (evidence: `src/components/LaporanView.tsx`)
- Realization Reports → html2canvas: renders report canvas (evidence: `src/components/LaporanView.tsx`)
