# kennethkpn/yourpass1 architecture

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

- Interactive diagram: https://gitdiagram.com/kennethkpn/yourpass1
- Repository: https://github.com/kennethkpn/yourpass1

## Overview

YourPass is an event discovery and ticketing site: visitors browse events, choose tickets, pay through FedaPay, and receive confirmation/ticket details. The excerpts establish event data, browser payment initiation, payment creation, webhook persistence/email, and transaction polling. Other visible pages and API routes indicate account, contact, newsletter, dashboard, and ticket capabilities; their exact runtime wiring is not fully shown, so uncertain links are omitted.

Main entry points: [`js/main.js`](https://github.com/kennethkpn/yourpass1/blob/main/js/main.js) (Site interactions), [`api/pay-fedapay.js`](https://github.com/kennethkpn/yourpass1/blob/main/api/pay-fedapay.js) (Payment creation), [`api/webhook.js`](https://github.com/kennethkpn/yourpass1/blob/main/api/webhook.js) (Payment webhook), [`events.html`](https://github.com/kennethkpn/yourpass1/blob/main/events.html) (Event pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Event discovery"]
  node_eventpages["Event pages<br/>[events.html]"]
  node_eventdetail["Event details<br/>[event-detail.html]"]
  node_eventdata[("Event catalog<br/>[events-data.js]")]
  node_mainjs["Site interactions<br/>[main.js]"]
end

subgraph group_identity["Accounts"]
  node_authpages["Sign-in pages<br/>[connexion.html]"]
  node_authhelpers["Auth helpers<br/>[supabase-auth.js]"]
  node_profile["Profile widget<br/>[profile.js]"]
  node_dashboard["User dashboard<br/>[dashboard.html]"]
end

subgraph group_checkout["Ticket checkout"]
  node_checkoutpage["Checkout page<br/>[checkout.html]"]
  node_paymentapi["Payment creation<br/>[pay-fedapay.js]"]
  node_fedapay["FedaPay"]
  node_successpage["Payment success<br/>[success.html]"]
  node_verifyapi["Transaction verify<br/>[&#91;id&#93;.js]"]
  node_webhook["Payment webhook<br/>[webhook.js]"]
  node_tickets["Ticket delivery<br/>[send-ticket.js]"]
  node_supabase[("Supabase")]
end

subgraph group_operations["Customer services"]
  node_resend["Resend email"]
  node_contactpage["Contact form<br/>[contact.html]"]
  node_contactapi["Contact endpoint<br/>[Contact.js]"]
  node_newsletter["Newsletter endpoint<br/>[Newsletter.js]"]
  node_health["Health endpoint<br/>[health.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_eventpages
node_eventpages -.->|"reads catalog"| node_eventdata
node_visitor -->|"selects event"| node_eventdetail
node_mainjs -.->|"looks up events"| node_eventdata
node_visitor -->|"signs in"| node_authpages
node_authhelpers -->|"authenticates"| node_supabase
node_profile -.->|"reads auth"| node_supabase
node_visitor -->|"starts checkout"| node_checkoutpage
node_mainjs -->|"creates payment"| node_paymentapi
node_paymentapi -->|"creates transaction"| node_fedapay
node_paymentapi -->|"requests token"| node_fedapay
node_fedapay -->|"returns browser"| node_successpage
node_successpage -->|"polls status"| node_verifyapi
node_verifyapi -->|"fetches transaction"| node_fedapay
node_fedapay -->|"sends event"| node_webhook
node_webhook -->|"stores ticket"| node_supabase
node_webhook -->|"sends confirmation"| node_resend
node_visitor -->|"sends inquiry"| node_contactpage
node_contactpage -.->|"submits form"| node_contactapi
node_contactapi -->|"emails inquiry"| node_resend
node_mainjs -.->|"submits signup"| node_newsletter
node_newsletter -->|"upserts subscriber"| node_supabase
node_visitor -->|"views account"| node_dashboard

click node_eventpages "https://github.com/kennethkpn/yourpass1/blob/main/events.html"
click node_eventdetail "https://github.com/kennethkpn/yourpass1/blob/main/event-detail.html"
click node_eventdata "https://github.com/kennethkpn/yourpass1/blob/main/js/events-data.js"
click node_mainjs "https://github.com/kennethkpn/yourpass1/blob/main/js/main.js"
click node_authpages "https://github.com/kennethkpn/yourpass1/blob/main/connexion.html"
click node_authhelpers "https://github.com/kennethkpn/yourpass1/blob/main/supabase-auth.js"
click node_profile "https://github.com/kennethkpn/yourpass1/blob/main/js/profile.js"
click node_dashboard "https://github.com/kennethkpn/yourpass1/blob/main/dashboard.html"
click node_checkoutpage "https://github.com/kennethkpn/yourpass1/blob/main/checkout.html"
click node_paymentapi "https://github.com/kennethkpn/yourpass1/blob/main/api/pay-fedapay.js"
click node_successpage "https://github.com/kennethkpn/yourpass1/blob/main/success.html"
click node_verifyapi "https://github.com/kennethkpn/yourpass1/blob/main/api/verify/%5Bid%5D.js"
click node_webhook "https://github.com/kennethkpn/yourpass1/blob/main/api/webhook.js"
click node_tickets "https://github.com/kennethkpn/yourpass1/blob/main/api/send-ticket.js"
click node_contactpage "https://github.com/kennethkpn/yourpass1/blob/main/contact.html"
click node_contactapi "https://github.com/kennethkpn/yourpass1/blob/main/api/Contact.js"
click node_newsletter "https://github.com/kennethkpn/yourpass1/blob/main/api/Newsletter.js"
click node_health "https://github.com/kennethkpn/yourpass1/blob/main/api/health.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_eventpages,node_eventdetail,node_eventdata,node_mainjs toneBlue
class node_authpages,node_authhelpers,node_profile,node_dashboard toneAmber
class node_checkoutpage,node_paymentapi,node_fedapay,node_successpage,node_verifyapi,node_webhook,node_tickets,node_supabase toneMint
class node_resend,node_contactpage,node_contactapi,node_newsletter,node_health toneRose
class node_visitor toneIndigo
```

## Components

### Event discovery

- [Event pages](https://github.com/kennethkpn/yourpass1/blob/main/events.html): `events.html`
- [Event details](https://github.com/kennethkpn/yourpass1/blob/main/event-detail.html): `event-detail.html`
- [Event catalog](https://github.com/kennethkpn/yourpass1/blob/main/js/events-data.js): `js/events-data.js`
- [Site interactions](https://github.com/kennethkpn/yourpass1/blob/main/js/main.js): `js/main.js`

### Accounts

- [Sign-in pages](https://github.com/kennethkpn/yourpass1/blob/main/connexion.html): `connexion.html`
- [Auth helpers](https://github.com/kennethkpn/yourpass1/blob/main/supabase-auth.js): `supabase-auth.js`
- [Profile widget](https://github.com/kennethkpn/yourpass1/blob/main/js/profile.js): `js/profile.js`
- [User dashboard](https://github.com/kennethkpn/yourpass1/blob/main/dashboard.html): `dashboard.html`

### Ticket checkout

- [Checkout page](https://github.com/kennethkpn/yourpass1/blob/main/checkout.html): `checkout.html`
- [Payment creation](https://github.com/kennethkpn/yourpass1/blob/main/api/pay-fedapay.js): `api/pay-fedapay.js`
- **FedaPay**
- [Payment success](https://github.com/kennethkpn/yourpass1/blob/main/success.html): `success.html`
- [Transaction verify](https://github.com/kennethkpn/yourpass1/blob/main/api/verify/%5Bid%5D.js): `api/verify/[id].js`
- [Payment webhook](https://github.com/kennethkpn/yourpass1/blob/main/api/webhook.js): `api/webhook.js`
- [Ticket delivery](https://github.com/kennethkpn/yourpass1/blob/main/api/send-ticket.js): `api/send-ticket.js`
- **Supabase**

### Customer services

- **Resend email**
- [Contact form](https://github.com/kennethkpn/yourpass1/blob/main/contact.html): `contact.html`
- [Contact endpoint](https://github.com/kennethkpn/yourpass1/blob/main/api/Contact.js): `api/Contact.js`
- [Newsletter endpoint](https://github.com/kennethkpn/yourpass1/blob/main/api/Newsletter.js): `api/Newsletter.js`
- [Health endpoint](https://github.com/kennethkpn/yourpass1/blob/main/api/health.js): `api/health.js`

### Other components

- **Visitor**

## Connections

- Visitor → Event pages: browses
- Event pages → Event catalog: reads catalog
- Visitor → Event details: selects event
- Site interactions → Event catalog: looks up events
- Visitor → Sign-in pages: signs in
- Auth helpers → Supabase: authenticates (evidence: `supabase-auth.js`)
- Profile widget → Supabase: reads auth
- Visitor → Checkout page: starts checkout
- Site interactions → Payment creation: creates payment (evidence: `js/main.js`)
- Payment creation → FedaPay: creates transaction (evidence: `api/pay-fedapay.js`)
- Payment creation → FedaPay: requests token (evidence: `api/pay-fedapay.js`)
- FedaPay → Payment success: returns browser
- Payment success → Transaction verify: polls status (evidence: `api/verify/[id].js`)
- Transaction verify → FedaPay: fetches transaction (evidence: `api/verify/[id].js`)
- FedaPay → Payment webhook: sends event (evidence: `api/webhook.js`)
- Payment webhook → Supabase: stores ticket (evidence: `api/webhook.js`)
- Payment webhook → Resend email: sends confirmation (evidence: `api/webhook.js`)
- Visitor → Contact form: sends inquiry
- Contact form → Contact endpoint: submits form
- Contact endpoint → Resend email: emails inquiry (evidence: `api/Contact.js`)
- Site interactions → Newsletter endpoint: submits signup
- Newsletter endpoint → Supabase: upserts subscriber (evidence: `api/Newsletter.js`)
- Visitor → User dashboard: views account
