# falihsmara80-dot/eventry architecture

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

- Interactive diagram: https://gitdiagram.com/falihsmara80-dot/eventry
- Repository: https://github.com/falihsmara80-dot/eventry

## Overview

Eventry is an AI-assisted event-bundle commerce application. The main flow is a visitor describing an event, receiving generated bundle options, customizing a choice, entering logistics, and proceeding to payment. The frontend keeps planning and selection state in shared event context; the backend uses an OpenAI planning agent and bundle-generation services, with Stripe checkout and PostgreSQL-backed supplier data documented or indicated by the source index. Some page and storage internals were not excerpted, so uncertain links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/App.jsx) (App routing), [`frontend/src/context/EventContext.jsx`](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/context/EventContext.jsx) (Event state), [`frontend/src/pages/PaymentCheckout.jsx`](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/PaymentCheckout.jsx) (Payment checkout UI), [`backend/src/services/agentService.js`](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/agentService.js) (AI planning agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Event planning UI"]
  node_app["App routing<br/>[App.jsx]"]
  node_home["Home and auth<br/>[Home.jsx]"]
  node_auth["Auth modal<br/>[AuthModal.jsx]"]
  node_prompt["Event prompt<br/>[EventPrompt.jsx]"]
  node_context["Event state<br/>[EventContext.jsx]"]
  node_selection["Bundle selection"]
  node_customization["Bundle customization"]
  node_details["Event logistics<br/>[EventDetails.jsx]"]
  node_payment["Payment checkout UI"]
  node_stepbar["Workflow step bar<br/>[StepBar.jsx]"]
end

subgraph group_api["API and checkout"]
  node_server["Express server<br/>[server.js]"]
  node_agentroute["Agent route<br/>[agent.js]"]
  node_agentcontroller["Agent controller<br/>[agentController.js]"]
  node_checkoutroute["Checkout route<br/>[checkout.js]"]
  node_checkoutcontroller["Checkout controller"]
  node_healthroute["Health route<br/>[healthRoutes.js]"]
  node_healthcontroller["Health controller"]
end

subgraph group_planning["Bundle planning"]
  node_agentservice["AI planning agent<br/>[agentService.js]"]
  node_engine["Bundle categories<br/>[bundleEngine.js]"]
  node_algorithm["Bundle algorithm<br/>[bundleAlgorithm.js]"]
  node_selector["Supplier selection<br/>[bundleSelector.js]"]
  node_mockbuilder["Mock bundle builder"]
end

subgraph group_data["Persistence and services"]
  node_prisma["Prisma client<br/>[prisma.js]"]
  node_database[("PostgreSQL")]
end

node_visitor(("Event organizer"))
node_openai["OpenAI"]
node_stripe["Stripe"]

node_visitor -->|"opens"| node_home
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_prompt
node_app -->|"routes to"| node_selection
node_app -->|"routes to"| node_customization
node_app -->|"routes to"| node_details
node_app -->|"routes to"| node_payment
node_home -->|"shows"| node_auth
node_app -->|"provides state"| node_context
node_prompt -->|"updates"| node_context
node_prompt -->|"posts plan request"| node_agentroute
node_selection -->|"reads and updates"| node_context
node_customization -->|"reads and updates"| node_context
node_details -->|"reads and updates"| node_context
node_payment -->|"reads state"| node_context
node_selection -->|"renders"| node_stepbar
node_customization -->|"renders"| node_stepbar
node_details -->|"renders"| node_stepbar
node_payment -->|"renders"| node_stepbar
node_server -->|"mounts"| node_agentroute
node_server -->|"mounts"| node_checkoutroute
node_server -->|"mounts"| node_healthroute
node_agentroute -->|"dispatches"| node_agentcontroller
node_agentcontroller -->|"calls"| node_agentservice
node_agentservice -.->|"calls"| node_openai
node_agentservice -->|"uses categories"| node_engine
node_agentservice -->|"builds bundles"| node_algorithm
node_algorithm -->|"delegates"| node_selector
node_algorithm -->|"delegates"| node_mockbuilder
node_selector -->|"uses client"| node_prisma
node_prisma -.->|"accesses"| node_database
node_checkoutroute -->|"dispatches"| node_checkoutcontroller
node_checkoutcontroller -->|"creates session"| node_stripe
node_healthroute -->|"dispatches"| node_healthcontroller
node_payment -.->|"submits checkout"| node_checkoutroute

click node_app "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/Home.jsx"
click node_auth "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/components/AuthModal.jsx"
click node_prompt "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/EventPrompt.jsx"
click node_context "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/context/EventContext.jsx"
click node_selection "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/BundleSelection.jsx"
click node_customization "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/BundleCustomization.jsx"
click node_details "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/EventDetails.jsx"
click node_payment "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/PaymentCheckout.jsx"
click node_stepbar "https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/components/StepBar.jsx"
click node_server "https://github.com/falihsmara80-dot/eventry/blob/main/backend/server.js"
click node_agentroute "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/routes/agent.js"
click node_agentcontroller "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/controllers/agentController.js"
click node_checkoutroute "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/routes/checkout.js"
click node_checkoutcontroller "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/controllers/checkoutController.js"
click node_healthroute "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/routes/healthRoutes.js"
click node_healthcontroller "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/controllers/healthController.js"
click node_agentservice "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/agentService.js"
click node_engine "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/bundleEngine.js"
click node_algorithm "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/bundleAlgorithm.js"
click node_selector "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/bundleSelector.js"
click node_mockbuilder "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/mockBundleBuilder.js"
click node_prisma "https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/lib/prisma.js"

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_home,node_auth,node_prompt,node_context,node_selection,node_customization,node_details,node_payment,node_stepbar toneBlue
class node_server,node_agentroute,node_agentcontroller,node_checkoutroute,node_checkoutcontroller,node_healthroute,node_healthcontroller toneAmber
class node_agentservice,node_engine,node_algorithm,node_selector,node_mockbuilder toneMint
class node_prisma,node_database toneRose
class node_visitor,node_openai,node_stripe toneIndigo
```

## Components

### Event planning UI

- [App routing](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Home and auth](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Auth modal](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/components/AuthModal.jsx): `frontend/src/components/AuthModal.jsx`
- [Event prompt](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/EventPrompt.jsx): `frontend/src/pages/EventPrompt.jsx`
- [Event state](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/context/EventContext.jsx): `frontend/src/context/EventContext.jsx`
- [Bundle selection](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/BundleSelection.jsx): `frontend/src/pages/BundleSelection.jsx`
- [Bundle customization](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/BundleCustomization.jsx): `frontend/src/pages/BundleCustomization.jsx`
- [Event logistics](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/EventDetails.jsx): `frontend/src/pages/EventDetails.jsx`
- [Payment checkout UI](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/pages/PaymentCheckout.jsx): `frontend/src/pages/PaymentCheckout.jsx`
- [Workflow step bar](https://github.com/falihsmara80-dot/eventry/blob/main/frontend/src/components/StepBar.jsx): `frontend/src/components/StepBar.jsx`

### API and checkout

- [Express server](https://github.com/falihsmara80-dot/eventry/blob/main/backend/server.js): `backend/server.js`
- [Agent route](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/routes/agent.js): `backend/src/routes/agent.js`
- [Agent controller](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/controllers/agentController.js): `backend/src/controllers/agentController.js`
- [Checkout route](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/routes/checkout.js): `backend/src/routes/checkout.js`
- [Checkout controller](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/controllers/checkoutController.js): `backend/src/controllers/checkoutController.js`
- [Health route](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/routes/healthRoutes.js): `backend/src/routes/healthRoutes.js`
- [Health controller](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/controllers/healthController.js): `backend/src/controllers/healthController.js`

### Bundle planning

- [AI planning agent](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/agentService.js): `backend/src/services/agentService.js`
- [Bundle categories](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/bundleEngine.js): `backend/src/services/bundleEngine.js`
- [Bundle algorithm](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/bundleAlgorithm.js): `backend/src/services/bundleAlgorithm.js`
- [Supplier selection](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/bundleSelector.js): `backend/src/services/bundleSelector.js`
- [Mock bundle builder](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/services/mockBundleBuilder.js): `backend/src/services/mockBundleBuilder.js`

### Persistence and services

- [Prisma client](https://github.com/falihsmara80-dot/eventry/blob/main/backend/src/lib/prisma.js): `backend/src/lib/prisma.js`
- **PostgreSQL**

### Other components

- **Event organizer**
- **OpenAI**
- **Stripe**

## Connections

- Event organizer → Home and auth: opens
- App routing → Home and auth: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Event prompt: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Bundle selection: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Bundle customization: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Event logistics: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Payment checkout UI: routes to (evidence: `frontend/src/App.jsx`)
- Home and auth → Auth modal: shows (evidence: `frontend/src/pages/Home.jsx`)
- App routing → Event state: provides state (evidence: `frontend/src/App.jsx`)
- Event prompt → Event state: updates (evidence: `frontend/src/pages/EventPrompt.jsx`)
- Event prompt → Agent route: posts plan request (evidence: `frontend/src/pages/EventPrompt.jsx`)
- Bundle selection → Event state: reads and updates (evidence: `frontend/src/pages/BundleSelection.jsx`)
- Bundle customization → Event state: reads and updates (evidence: `frontend/src/pages/BundleCustomization.jsx`)
- Event logistics → Event state: reads and updates (evidence: `frontend/src/pages/EventDetails.jsx`)
- Payment checkout UI → Event state: reads state (evidence: `frontend/src/pages/PaymentCheckout.jsx`)
- Bundle selection → Workflow step bar: renders (evidence: `frontend/src/pages/BundleSelection.jsx`)
- Bundle customization → Workflow step bar: renders (evidence: `frontend/src/pages/BundleCustomization.jsx`)
- Event logistics → Workflow step bar: renders (evidence: `frontend/src/pages/EventDetails.jsx`)
- Payment checkout UI → Workflow step bar: renders (evidence: `frontend/src/pages/PaymentCheckout.jsx`)
- Express server → Agent route: mounts (evidence: `backend/server.js`)
- Express server → Checkout route: mounts (evidence: `backend/server.js`)
- Express server → Health route: mounts (evidence: `backend/server.js`)
- Agent route → Agent controller: dispatches (evidence: `backend/src/routes/agent.js`)
- Agent controller → AI planning agent: calls (evidence: `backend/src/controllers/agentController.js`)
- AI planning agent → OpenAI: calls
- AI planning agent → Bundle categories: uses categories (evidence: `backend/src/services/agentService.js`)
- AI planning agent → Bundle algorithm: builds bundles (evidence: `backend/src/services/agentService.js`)
- Bundle algorithm → Supplier selection: delegates (evidence: `backend/src/services/bundleAlgorithm.js`)
- Bundle algorithm → Mock bundle builder: delegates (evidence: `backend/src/services/bundleAlgorithm.js`)
- Supplier selection → Prisma client: uses client (evidence: `backend/src/services/bundleSelector.js`)
- Prisma client → PostgreSQL: accesses
- Checkout route → Checkout controller: dispatches (evidence: `backend/src/routes/checkout.js`)
- Checkout controller → Stripe: creates session (evidence: `backend/src/controllers/checkoutController.js`)
- Health route → Health controller: dispatches (evidence: `backend/src/routes/healthRoutes.js`)
- Payment checkout UI → Checkout route: submits checkout
