# enthonydev/rest-event-management-api architecture

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

- Interactive diagram: https://gitdiagram.com/enthonydev/rest-event-management-api
- Repository: https://github.com/enthonydev/rest-event-management-api

## Overview

Event Management API supports event and catalog management, user registration and JWT login, and authenticated order creation with server-side pricing and availability checks. The main workflow is a user working in the `/ui` panel, which calls the Express API; handlers validate requests, apply domain rules, and use the current in-memory store. The README also describes a Prisma schema as planned persistence, not as the runtime store. The backend is concentrated in `src/app.ts`; unsampled order-handler details are represented only at the documented capability level.

Main entry points: [`src/app.ts`](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts) (Express App), [`public/app.js`](https://github.com/enthonydev/rest-event-management-api/blob/main/public/app.js) (Web Panel), [`src/server.ts`](https://github.com/enthonydev/rest-event-management-api/blob/main/src/server.ts) (HTTP Server), [`docs/openapi.yaml`](https://github.com/enthonydev/rest-event-management-api/blob/main/docs/openapi.yaml) (OpenAPI Contract)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_panel["Web Panel<br/>[app.js]"]
end

subgraph group_http["HTTP API"]
  node_express["HTTP Server<br/>[server.ts]"]
  node_api["Express App<br/>[app.ts]"]
  node_validation["Request Validation<br/>[app.ts]"]
end

subgraph group_domain["Domain Operations"]
  node_events["Event Management<br/>[app.ts]"]
  node_catalog["Ticket And Product Catalog<br/>[app.ts]"]
  node_accounts["Registration And Login<br/>[app.ts]"]
  node_orders["Order Management<br/>[app.ts]"]
end

subgraph group_persistence["Persistence And Contract"]
  node_memory[("In-Memory Store<br/>[app.ts]")]
  node_prisma[("Relational Schema<br/>[schema.prisma]")]
  node_openapi["OpenAPI Contract<br/>[openapi.yaml]"]
end

node_user(("API User"))

node_user -->|"uses"| node_panel
node_panel -->|"calls API"| node_api
node_express -->|"starts"| node_api
node_api -->|"serves"| node_panel
node_api -->|"serves"| node_openapi
node_api -->|"validates requests"| node_validation
node_api -->|"routes event requests"| node_events
node_api -->|"routes catalog requests"| node_catalog
node_api -->|"routes auth requests"| node_accounts
node_api -->|"routes order requests"| node_orders
node_events -->|"reads and writes"| node_memory
node_catalog -->|"reads and writes"| node_memory
node_accounts -->|"reads and writes"| node_memory
node_orders -.->|"uses runtime store"| node_memory

click node_panel "https://github.com/enthonydev/rest-event-management-api/blob/main/public/app.js"
click node_express "https://github.com/enthonydev/rest-event-management-api/blob/main/src/server.ts"
click node_api "https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts"
click node_validation "https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts"
click node_events "https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts"
click node_catalog "https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts"
click node_accounts "https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts"
click node_orders "https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts"
click node_memory "https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts"
click node_prisma "https://github.com/enthonydev/rest-event-management-api/blob/main/prisma/schema.prisma"
click node_openapi "https://github.com/enthonydev/rest-event-management-api/blob/main/docs/openapi.yaml"

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_panel,node_user toneBlue
class node_express,node_api,node_validation toneAmber
class node_events,node_catalog,node_accounts,node_orders toneMint
class node_memory,node_prisma,node_openapi toneRose
```

## Components

### Client

- [Web Panel](https://github.com/enthonydev/rest-event-management-api/blob/main/public/app.js): `public/app.js`

### HTTP API

- [HTTP Server](https://github.com/enthonydev/rest-event-management-api/blob/main/src/server.ts): `src/server.ts`
- [Express App](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts): `src/app.ts`
- [Request Validation](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts): `src/app.ts`

### Domain Operations

- [Event Management](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts): `src/app.ts`
- [Ticket And Product Catalog](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts): `src/app.ts`
- [Registration And Login](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts): `src/app.ts`
- [Order Management](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts): `src/app.ts`

### Persistence And Contract

- [In-Memory Store](https://github.com/enthonydev/rest-event-management-api/blob/main/src/app.ts): `src/app.ts`
- [Relational Schema](https://github.com/enthonydev/rest-event-management-api/blob/main/prisma/schema.prisma): `prisma/schema.prisma`
- [OpenAPI Contract](https://github.com/enthonydev/rest-event-management-api/blob/main/docs/openapi.yaml): `docs/openapi.yaml`

### Other components

- **API User**

## Connections

- API User → Web Panel: uses (evidence: `README.md`)
- Web Panel → Express App: calls API (evidence: `public/app.js`)
- HTTP Server → Express App: starts (evidence: `src/server.ts`)
- Express App → Web Panel: serves (evidence: `src/app.ts`)
- Express App → OpenAPI Contract: serves (evidence: `src/app.ts`)
- Express App → Request Validation: validates requests (evidence: `src/app.ts`)
- Express App → Event Management: routes event requests (evidence: `src/app.ts`)
- Express App → Ticket And Product Catalog: routes catalog requests (evidence: `src/app.ts`)
- Express App → Registration And Login: routes auth requests (evidence: `src/app.ts`)
- Express App → Order Management: routes order requests (evidence: `README.md`)
- Event Management → In-Memory Store: reads and writes (evidence: `src/app.ts`)
- Ticket And Product Catalog → In-Memory Store: reads and writes (evidence: `src/app.ts`)
- Registration And Login → In-Memory Store: reads and writes (evidence: `src/app.ts`)
- Order Management → In-Memory Store: uses runtime store (evidence: `src/app.ts`)
