# chonwai/docai_event_x_frontend architecture

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

- Interactive diagram: https://gitdiagram.com/chonwai/docai_event_x_frontend
- Repository: https://github.com/chonwai/docai_event_x_frontend

## Overview

This is a Next.js event-registration frontend. Attendees browse active forms, open a form, submit registration, and receive a QR ticket; administrators browse forms, create forms, inspect and manage submissions, export records, and enter check-in. The backend is external: the sampled pages show API reads, registration submission, and check-in status updates, but no backend implementation. The check-in page and form-creation page are only partially evidenced, so their internal interactions are not expanded.

Main entry points: [`src/app/admin/forms/[id]/form_submissions/page.tsx`](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/forms/%5Bid%5D/form_submissions/page.tsx) (Submission management), [`src/app/admin/page.tsx`](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/page.tsx) (Admin dashboard), [`src/app/forms/[id]/page.tsx`](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/forms/%5Bid%5D/page.tsx) (Registration form), [`src/app/page.tsx`](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/page.tsx) (Active forms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Attendee registration"]
  node_home["Active forms<br/>[page.tsx]"]
  node_public_form["Registration form<br/>[page.tsx]"]
  node_ticket["QR ticket<br/>[page.tsx]"]
end

subgraph group_admin["Admin operations"]
  node_dashboard["Admin dashboard<br/>[page.tsx]"]
  node_create_form["Form creation<br/>[page.tsx]"]
  node_submission_list["Submission management<br/>[page.tsx]"]
  node_submission_detail["Submission detail<br/>[page.tsx]"]
  node_checkin_button["Scan button<br/>[ScanButton.tsx]"]
  node_checkin["Check-in scanner<br/>[page.tsx]"]
  node_xlsx["Excel export"]
end

subgraph group_shared["Shared interface"]
  node_layout["Root layout<br/>[layout.tsx]"]
  node_navbar["User navigation<br/>[UserNavbar.tsx]"]
end

node_attendee(("Attendee"))
node_admin_user(("Administrator"))
node_backend{{"Event API"}}

node_attendee -->|"browses"| node_home
node_home -->|"fetches active forms"| node_backend
node_home -->|"opens form"| node_public_form
node_public_form -->|"loads form"| node_backend
node_public_form -->|"posts registration"| node_backend
node_public_form -->|"renders QR"| node_ticket
node_admin_user -->|"opens"| node_dashboard
node_dashboard -->|"loads forms"| node_backend
node_dashboard -->|"opens submissions"| node_submission_list
node_dashboard -->|"opens creation"| node_create_form
node_dashboard -->|"renders"| node_checkin_button
node_submission_list -->|"searches submissions"| node_backend
node_submission_list -->|"updates check-in"| node_backend
node_submission_list -.->|"opens details"| node_submission_detail
node_submission_list -->|"renders export"| node_xlsx
node_submission_list -->|"renders"| node_checkin_button
node_xlsx -->|"exports supplied records"| node_submission_list
node_checkin_button -->|"routes to"| node_checkin
node_submission_detail -->|"loads form and record"| node_backend
node_layout -->|"renders"| node_navbar

click node_home "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/page.tsx"
click node_public_form "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/forms/%5Bid%5D/page.tsx"
click node_ticket "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/forms/%5Bid%5D/page.tsx"
click node_dashboard "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/page.tsx"
click node_create_form "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/forms/create/page.tsx"
click node_submission_list "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/forms/%5Bid%5D/form_submissions/page.tsx"
click node_submission_detail "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/form_submissions/%5Bid%5D/page.tsx"
click node_checkin_button "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/components/ScanButton.tsx"
click node_checkin "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/checkin/page.tsx"
click node_xlsx "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/components/ExportToXlsxButton.tsx"
click node_layout "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/layout.tsx"
click node_navbar "https://github.com/chonwai/docai_event_x_frontend/blob/main/src/components/UserNavbar.tsx"

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_home,node_public_form,node_ticket toneBlue
class node_dashboard,node_create_form,node_submission_list,node_submission_detail,node_checkin_button,node_checkin,node_xlsx toneAmber
class node_layout,node_navbar,node_backend toneMint
class node_attendee,node_admin_user toneIndigo
```

## Components

### Attendee registration

- [Active forms](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Registration form](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/forms/%5Bid%5D/page.tsx): `src/app/forms/[id]/page.tsx`
- [QR ticket](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/forms/%5Bid%5D/page.tsx): `src/app/forms/[id]/page.tsx`

### Admin operations

- [Admin dashboard](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [Form creation](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/forms/create/page.tsx): `src/app/admin/forms/create/page.tsx`
- [Submission management](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/forms/%5Bid%5D/form_submissions/page.tsx): `src/app/admin/forms/[id]/form_submissions/page.tsx`
- [Submission detail](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/form_submissions/%5Bid%5D/page.tsx): `src/app/admin/form_submissions/[id]/page.tsx`
- [Scan button](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/components/ScanButton.tsx): `src/app/admin/components/ScanButton.tsx`
- [Check-in scanner](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/checkin/page.tsx): `src/app/admin/checkin/page.tsx`
- [Excel export](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/admin/components/ExportToXlsxButton.tsx): `src/app/admin/components/ExportToXlsxButton.tsx`

### Shared interface

- [Root layout](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [User navigation](https://github.com/chonwai/docai_event_x_frontend/blob/main/src/components/UserNavbar.tsx): `src/components/UserNavbar.tsx`

### Other components

- **Attendee**
- **Administrator**
- **Event API**

## Connections

- Attendee → Active forms: browses (evidence: `src/app/page.tsx`)
- Active forms → Event API: fetches active forms (evidence: `src/app/page.tsx`)
- Active forms → Registration form: opens form (evidence: `src/app/page.tsx`)
- Registration form → Event API: loads form (evidence: `src/app/forms/[id]/page.tsx`)
- Registration form → Event API: posts registration (evidence: `src/app/forms/[id]/page.tsx`)
- Registration form → QR ticket: renders QR (evidence: `src/app/forms/[id]/page.tsx`)
- Administrator → Admin dashboard: opens (evidence: `src/app/admin/page.tsx`)
- Admin dashboard → Event API: loads forms (evidence: `src/app/admin/page.tsx`)
- Admin dashboard → Submission management: opens submissions (evidence: `src/app/admin/page.tsx`)
- Admin dashboard → Form creation: opens creation (evidence: `src/app/admin/page.tsx`)
- Admin dashboard → Scan button: renders (evidence: `src/app/admin/page.tsx`)
- Submission management → Event API: searches submissions (evidence: `src/app/admin/forms/[id]/form_submissions/page.tsx`)
- Submission management → Event API: updates check-in (evidence: `src/app/admin/forms/[id]/form_submissions/page.tsx`)
- Submission management → Submission detail: opens details
- Submission management → Excel export: renders export (evidence: `src/app/admin/forms/[id]/form_submissions/page.tsx`)
- Submission management → Scan button: renders (evidence: `src/app/admin/forms/[id]/form_submissions/page.tsx`)
- Excel export → Submission management: exports supplied records (evidence: `src/app/admin/forms/[id]/form_submissions/page.tsx`)
- Scan button → Check-in scanner: routes to (evidence: `src/app/admin/components/ScanButton.tsx`)
- Submission detail → Event API: loads form and record (evidence: `src/app/admin/form_submissions/[id]/page.tsx`)
- Root layout → User navigation: renders (evidence: `src/app/layout.tsx`)
