# mnjaulhaq/dashboard_rafly architecture

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

- Interactive diagram: https://gitdiagram.com/mnjaulhaq/dashboard_rafly
- Repository: https://github.com/mnjaulhaq/dashboard_rafly

## Overview

NantiKita is a wedding-invitation service with public guest invitations and a client dashboard. Guests view invitation data, record that they opened an invitation, and submit RSVP responses and wishes; clients sign in to manage guest lists and review invitation data. The Express server routes API requests to authentication, public-invitation, and dashboard handlers backed by MySQL. The excerpts show these server-side flows and some dashboard API calls; the invitation-page implementation and several dashboard features are not fully sampled, so those links are not inferred.

Main entry points: [`server/src/server.js`](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/server.js) (Express server), [`server/src/routes/auth.js`](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/auth.js) (Authentication API), [`server/src/routes/dashboard.js`](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/dashboard.js) (Dashboard API), [`server/src/db.js`](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/db.js) (MySQL connection pool)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interfaces"]
  node_client["Invitation page<br/>[script.js]"]
  node_dashboard_ui["Client dashboard<br/>[script.js]"]
end

subgraph group_api["API handlers"]
  node_server["Express server<br/>[server.js]"]
  node_public_api["Public invitation API<br/>[public.js]"]
  node_auth_api["Authentication API<br/>[auth.js]"]
  node_dashboard_api["Dashboard API<br/>[dashboard.js]"]
end

subgraph group_shared["Shared services"]
  node_auth["Session authentication<br/>[auth.js]"]
  node_security["CORS and CSRF<br/>[security.js]"]
  node_format["API data formatting<br/>[format.js]"]
end

subgraph group_storage["Persistence"]
  node_db["MySQL connection pool<br/>[db.js]"]
  node_mysql[("MySQL database<br/>[schema.sql]")]
end

node_guest(("Invitation guest"))
node_couple(("Invitation client"))

node_guest -.->|"opens"| node_client
node_guest -->|"submits RSVP"| node_public_api
node_public_api -->|"reads and writes"| node_db
node_public_api -->|"formats time"| node_format
node_couple -.->|"manages guests"| node_dashboard_ui
node_dashboard_ui -->|"requests login"| node_auth_api
node_dashboard_ui -->|"manages guest data"| node_dashboard_api
node_server -->|"mounts route"| node_auth_api
node_server -->|"mounts route"| node_public_api
node_server -->|"mounts route"| node_dashboard_api
node_server -->|"applies middleware"| node_security
node_server -->|"checks secret"| node_auth
node_auth_api -->|"authenticates session"| node_auth
node_auth_api -->|"checks credentials"| node_db
node_auth_api -->|"uses client key"| node_security
node_dashboard_api -->|"requires login"| node_auth
node_dashboard_api -->|"reads and writes"| node_db
node_dashboard_api -->|"formats response"| node_format
node_auth -->|"loads user"| node_db
node_db -.->|"queries"| node_mysql

click node_client "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/client/js/script.js"
click node_dashboard_ui "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/client/dashboard/script.js"
click node_server "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/server.js"
click node_public_api "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/public.js"
click node_auth_api "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/auth.js"
click node_dashboard_api "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/dashboard.js"
click node_auth "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/middleware/auth.js"
click node_security "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/middleware/security.js"
click node_format "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/format.js"
click node_db "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/db.js"
click node_mysql "https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/schema.sql"

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_client,node_dashboard_ui,node_couple toneBlue
class node_server,node_public_api,node_auth_api,node_dashboard_api toneAmber
class node_auth,node_security,node_format toneMint
class node_db,node_mysql toneRose
class node_guest toneIndigo
```

## Components

### Web interfaces

- [Invitation page](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/client/js/script.js): `client/js/script.js`
- [Client dashboard](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/client/dashboard/script.js): `client/dashboard/script.js`

### API handlers

- [Express server](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/server.js): `server/src/server.js`
- [Public invitation API](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/public.js): `server/src/routes/public.js`
- [Authentication API](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/auth.js): `server/src/routes/auth.js`
- [Dashboard API](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/routes/dashboard.js): `server/src/routes/dashboard.js`

### Shared services

- [Session authentication](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/middleware/auth.js): `server/src/middleware/auth.js`
- [CORS and CSRF](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/middleware/security.js): `server/src/middleware/security.js`
- [API data formatting](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/format.js): `server/src/format.js`

### Persistence

- [MySQL connection pool](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/src/db.js): `server/src/db.js`
- [MySQL database](https://github.com/mnjaulhaq/dashboard_rafly/blob/main/server/schema.sql): `server/schema.sql`

### Other components

- **Invitation guest**
- **Invitation client**

## Connections

- Invitation guest → Invitation page: opens
- Invitation guest → Public invitation API: submits RSVP (evidence: `server/src/routes/public.js`)
- Public invitation API → MySQL connection pool: reads and writes (evidence: `server/src/routes/public.js`)
- Public invitation API → API data formatting: formats time (evidence: `server/src/routes/public.js`)
- Invitation client → Client dashboard: manages guests
- Client dashboard → Authentication API: requests login (evidence: `client/dashboard/script.js`)
- Client dashboard → Dashboard API: manages guest data (evidence: `client/dashboard/script.js`)
- Express server → Authentication API: mounts route (evidence: `server/src/server.js`)
- Express server → Public invitation API: mounts route (evidence: `server/src/server.js`)
- Express server → Dashboard API: mounts route (evidence: `server/src/server.js`)
- Express server → CORS and CSRF: applies middleware (evidence: `server/src/server.js`)
- Express server → Session authentication: checks secret (evidence: `server/src/server.js`)
- Authentication API → Session authentication: authenticates session (evidence: `server/src/routes/auth.js`)
- Authentication API → MySQL connection pool: checks credentials (evidence: `server/src/routes/auth.js`)
- Authentication API → CORS and CSRF: uses client key (evidence: `server/src/routes/auth.js`)
- Dashboard API → Session authentication: requires login (evidence: `server/src/routes/dashboard.js`)
- Dashboard API → MySQL connection pool: reads and writes (evidence: `server/src/routes/dashboard.js`)
- Dashboard API → API data formatting: formats response (evidence: `server/src/routes/dashboard.js`)
- Session authentication → MySQL connection pool: loads user (evidence: `server/src/middleware/auth.js`)
- MySQL connection pool → MySQL database: queries
