# tercodemagang/backendns-afada architecture

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

- Interactive diagram: https://gitdiagram.com/tercodemagang/backendns-afada
- Repository: https://github.com/tercodemagang/backendns-afada

## Overview

Invito is a backend for managing wedding invitations and related event operations. Its main workflow supports account access, invitation management, guest and RSVP handling, and dashboard summaries; the API also covers digital envelopes, transaction records, packages, domains, and notifications. NestJS controllers delegate to services, which query PostgreSQL. The sampled sources show several service-to-database relationships; other module boundaries and capabilities are preserved from the source index and tree, but their internal behavior was not inspected.

Main entry points: [`src/app.module.ts`](https://github.com/tercodemagang/backendns-afada/blob/main/src/app.module.ts) (Nest app), [`src/db.ts`](https://github.com/tercodemagang/backendns-afada/blob/main/src/db.ts) (PostgreSQL), [`src/data/data.controller.ts`](https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.controller.ts) (Event data API), [`src/accounts/accounts.controller.ts`](https://github.com/tercodemagang/backendns-afada/blob/main/src/accounts/accounts.controller.ts) (Account API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Nest app<br/>[app.module.ts]"]
  node_health["Health endpoint<br/>[app.controller.ts]"]
end

subgraph group_identity["Accounts and access"]
  node_accounts_api["Account API"]
  node_accounts["Account management"]
  node_auth_api["Authentication API<br/>[auth.controller.ts]"]
  node_auth["Registration and login<br/>[auth.service.ts]"]
end

subgraph group_event["Invitation operations"]
  node_invitations_api["Invitation API"]
  node_invitations["Invitation management"]
  node_data_api["Event data API<br/>[data.controller.ts]"]
  node_guest_ops["Guest management<br/>[data.service.ts]"]
  node_rsvp_envelope["RSVPs and envelopes<br/>[data.service.ts]"]
  node_transactions["Transaction records<br/>[data.service.ts]"]
  node_dashboard["Dashboard summaries"]
end

subgraph group_platform["Administration"]
  node_domains["Domain management<br/>[domains.service.ts]"]
  node_packages["Package management"]
  node_notifications["Notifications"]
  node_database[("PostgreSQL<br/>[db.ts]")]
end

node_client(("API clients"))

node_client -.->|"requests"| node_health
node_client -.->|"requests"| node_accounts_api
node_client -.->|"requests"| node_auth_api
node_client -.->|"requests"| node_invitations_api
node_client -.->|"requests"| node_data_api
node_app -->|"registers"| node_health
node_app -->|"imports module"| node_accounts_api
node_app -->|"imports module"| node_auth_api
node_app -->|"imports module"| node_invitations_api
node_app -->|"imports module"| node_data_api
node_app -->|"imports module"| node_dashboard
node_app -->|"imports module"| node_domains
node_app -->|"imports module"| node_notifications
node_app -->|"imports module"| node_packages
node_accounts_api -->|"delegates to"| node_accounts
node_auth_api -->|"delegates to"| node_auth
node_invitations_api -->|"delegates to"| node_invitations
node_data_api -->|"delegates to"| node_guest_ops
node_data_api -->|"delegates to"| node_rsvp_envelope
node_data_api -->|"delegates to"| node_transactions
node_accounts -->|"queries"| node_database
node_auth -->|"queries"| node_database
node_invitations -->|"queries"| node_database
node_guest_ops -->|"queries"| node_database
node_rsvp_envelope -->|"queries"| node_database
node_transactions -->|"queries"| node_database
node_dashboard -->|"queries"| node_database
node_domains -->|"queries"| node_database
node_packages -->|"queries"| node_database
node_notifications -->|"queries"| node_database

click node_app "https://github.com/tercodemagang/backendns-afada/blob/main/src/app.module.ts"
click node_health "https://github.com/tercodemagang/backendns-afada/blob/main/src/app.controller.ts"
click node_accounts_api "https://github.com/tercodemagang/backendns-afada/blob/main/src/accounts/accounts.controller.ts"
click node_accounts "https://github.com/tercodemagang/backendns-afada/blob/main/src/accounts/accounts.service.ts"
click node_auth_api "https://github.com/tercodemagang/backendns-afada/blob/main/src/auth/auth.controller.ts"
click node_auth "https://github.com/tercodemagang/backendns-afada/blob/main/src/auth/auth.service.ts"
click node_invitations_api "https://github.com/tercodemagang/backendns-afada/blob/main/src/invitations/invitations.controller.ts"
click node_invitations "https://github.com/tercodemagang/backendns-afada/blob/main/src/invitations/invitations.service.ts"
click node_data_api "https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.controller.ts"
click node_guest_ops "https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.service.ts"
click node_rsvp_envelope "https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.service.ts"
click node_transactions "https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.service.ts"
click node_dashboard "https://github.com/tercodemagang/backendns-afada/blob/main/src/dashboard/dashboard.service.ts"
click node_domains "https://github.com/tercodemagang/backendns-afada/blob/main/src/domains/domains.service.ts"
click node_packages "https://github.com/tercodemagang/backendns-afada/blob/main/src/packages/packages.service.ts"
click node_notifications "https://github.com/tercodemagang/backendns-afada/blob/main/src/notifications/notifications.service.ts"
click node_database "https://github.com/tercodemagang/backendns-afada/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_health,node_client toneBlue
class node_accounts_api,node_accounts,node_auth_api,node_auth toneAmber
class node_invitations_api,node_invitations,node_data_api,node_guest_ops,node_rsvp_envelope,node_transactions,node_dashboard toneMint
class node_domains,node_packages,node_notifications,node_database toneRose
```

## Components

### Application entry

- [Nest app](https://github.com/tercodemagang/backendns-afada/blob/main/src/app.module.ts): `src/app.module.ts`
- [Health endpoint](https://github.com/tercodemagang/backendns-afada/blob/main/src/app.controller.ts): `src/app.controller.ts`

### Accounts and access

- [Account API](https://github.com/tercodemagang/backendns-afada/blob/main/src/accounts/accounts.controller.ts): `src/accounts/accounts.controller.ts`
- [Account management](https://github.com/tercodemagang/backendns-afada/blob/main/src/accounts/accounts.service.ts): `src/accounts/accounts.service.ts`
- [Authentication API](https://github.com/tercodemagang/backendns-afada/blob/main/src/auth/auth.controller.ts): `src/auth/auth.controller.ts`
- [Registration and login](https://github.com/tercodemagang/backendns-afada/blob/main/src/auth/auth.service.ts): `src/auth/auth.service.ts`

### Invitation operations

- [Invitation API](https://github.com/tercodemagang/backendns-afada/blob/main/src/invitations/invitations.controller.ts): `src/invitations/invitations.controller.ts`
- [Invitation management](https://github.com/tercodemagang/backendns-afada/blob/main/src/invitations/invitations.service.ts): `src/invitations/invitations.service.ts`
- [Event data API](https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.controller.ts): `src/data/data.controller.ts`
- [Guest management](https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.service.ts): `src/data/data.service.ts`
- [RSVPs and envelopes](https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.service.ts): `src/data/data.service.ts`
- [Transaction records](https://github.com/tercodemagang/backendns-afada/blob/main/src/data/data.service.ts): `src/data/data.service.ts`
- [Dashboard summaries](https://github.com/tercodemagang/backendns-afada/blob/main/src/dashboard/dashboard.service.ts): `src/dashboard/dashboard.service.ts`

### Administration

- [Domain management](https://github.com/tercodemagang/backendns-afada/blob/main/src/domains/domains.service.ts): `src/domains/domains.service.ts`
- [Package management](https://github.com/tercodemagang/backendns-afada/blob/main/src/packages/packages.service.ts): `src/packages/packages.service.ts`
- [Notifications](https://github.com/tercodemagang/backendns-afada/blob/main/src/notifications/notifications.service.ts): `src/notifications/notifications.service.ts`
- [PostgreSQL](https://github.com/tercodemagang/backendns-afada/blob/main/src/db.ts): `src/db.ts`

### Other components

- **API clients**

## Connections

- API clients → Health endpoint: requests
- API clients → Account API: requests
- API clients → Authentication API: requests
- API clients → Invitation API: requests
- API clients → Event data API: requests
- Nest app → Health endpoint: registers (evidence: `src/app.module.ts`)
- Nest app → Account API: imports module (evidence: `src/app.module.ts`)
- Nest app → Authentication API: imports module (evidence: `src/app.module.ts`)
- Nest app → Invitation API: imports module (evidence: `src/app.module.ts`)
- Nest app → Event data API: imports module (evidence: `src/app.module.ts`)
- Nest app → Dashboard summaries: imports module (evidence: `src/app.module.ts`)
- Nest app → Domain management: imports module (evidence: `src/app.module.ts`)
- Nest app → Notifications: imports module (evidence: `src/app.module.ts`)
- Nest app → Package management: imports module (evidence: `src/app.module.ts`)
- Account API → Account management: delegates to (evidence: `src/accounts/accounts.controller.ts`)
- Authentication API → Registration and login: delegates to (evidence: `src/auth/auth.controller.ts`)
- Invitation API → Invitation management: delegates to (evidence: `src/invitations/invitations.controller.ts`)
- Event data API → Guest management: delegates to (evidence: `src/data/data.controller.ts`)
- Event data API → RSVPs and envelopes: delegates to (evidence: `src/data/data.controller.ts`)
- Event data API → Transaction records: delegates to (evidence: `src/data/data.controller.ts`)
- Account management → PostgreSQL: queries (evidence: `src/accounts/accounts.service.ts`)
- Registration and login → PostgreSQL: queries (evidence: `src/auth/auth.service.ts`)
- Invitation management → PostgreSQL: queries (evidence: `src/invitations/invitations.service.ts`)
- Guest management → PostgreSQL: queries (evidence: `src/data/data.service.ts`)
- RSVPs and envelopes → PostgreSQL: queries (evidence: `src/data/data.service.ts`)
- Transaction records → PostgreSQL: queries (evidence: `src/data/data.service.ts`)
- Dashboard summaries → PostgreSQL: queries (evidence: `src/dashboard/dashboard.service.ts`)
- Domain management → PostgreSQL: queries (evidence: `src/domains/domains.service.ts`)
- Package management → PostgreSQL: queries (evidence: `src/packages/packages.service.ts`)
- Notifications → PostgreSQL: queries (evidence: `src/notifications/notifications.service.ts`)
