# khadar1020/timelymeeting architecture

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

- Interactive diagram: https://gitdiagram.com/khadar1020/timelymeeting
- Repository: https://github.com/khadar1020/timelymeeting

## Overview

TimelyMeet is a scheduling and appointment-booking application for event creators and bookers. Creators configure weekly availability, publish free or paid event types, and share public booking links; bookers select a slot, submit a booking, and receive meeting details. Paid bookings proceed through Stripe Checkout and are confirmed by a verified webhook. The graph includes account, meeting-management, and payout capabilities documented in the README; several route and action implementations were not sampled, so those links are cited as documented rather than inferred from source.

Main entry points: [`app/(main)/dashboard/page.jsx`](https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/dashboard/page.jsx) (Dashboard), [`lib/prisma.js`](https://github.com/khadar1020/timelymeeting/blob/main/lib/prisma.js) (Application database), [`app/api/stripe/create-checkout-session/route.js`](https://github.com/khadar1020/timelymeeting/blob/main/app/api/stripe/create-checkout-session/route.js) (Checkout session API), [`app/api/stripe/webhook/route.js`](https://github.com/khadar1020/timelymeeting/blob/main/app/api/stripe/webhook/route.js) (Payment webhook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creator["Creator Workspace"]
  node_dashboard["Dashboard<br/>[page.jsx]"]
  node_user_actions["User account actions<br/>[users.js]"]
  node_availability_ui["Availability setup"]
  node_availability_actions["Availability actions<br/>[availability.js]"]
  node_event_ui["Event management<br/>[event-form.jsx]"]
  node_event_actions["Event actions<br/>[events.js]"]
  node_meetings["Meeting management"]
end

subgraph group_booking["Public Booking"]
  node_profile["Public profile<br/>[page.jsx]"]
  node_event_page["Public event page<br/>[page.jsx]"]
  node_booking_form["Booking form<br/>[booking-form.jsx]"]
  node_booking_actions["Booking actions<br/>[bookings.js]"]
  node_booking_status["Booking success and issue report<br/>[page.jsx]"]
end

subgraph group_payments["Payments &amp; Payouts"]
  node_checkout["Checkout session API<br/>[route.js]"]
  node_webhook["Payment webhook<br/>[route.js]"]
  node_connect_card["Mentor Connect setup"]
  node_payouts["Payout service<br/>[stripe-connect.js]"]
end

subgraph group_core["Application Services"]
  node_calendar["Calendar integration<br/>[calendar.js]"]
  node_booking_rules["Booking conflict checks<br/>[bookings.js]"]
  node_validators["Input validation<br/>[validators.js]"]
  node_database[("Application database<br/>[prisma.js]")]
  node_clerk["Clerk authentication"]
end

node_creator(("Event creator"))
node_booker(("Booker"))
node_google_calendar["Google Calendar"]
node_stripe["Stripe"]

node_creator -->|"manages account"| node_dashboard
node_dashboard -->|"updates username"| node_user_actions
node_dashboard -->|"views updates"| node_meetings
node_creator -->|"sets hours"| node_availability_ui
node_availability_ui -->|"loads and saves"| node_availability_actions
node_availability_actions -->|"reads and writes"| node_database
node_creator -->|"creates event types"| node_event_ui
node_event_ui -->|"submits event"| node_event_actions
node_event_actions -->|"validates event"| node_validators
node_event_actions -->|"stores events"| node_database
node_creator -->|"manages bookings"| node_meetings
node_creator -->|"connects payout account"| node_dashboard
node_dashboard -->|"renders setup"| node_connect_card
node_connect_card -.->|"configures account"| node_payouts
node_booker -->|"opens shared link"| node_profile
node_profile -->|"opens public event"| node_event_page
node_event_page -->|"loads event details"| node_event_actions
node_event_page -->|"loads available slots"| node_availability_actions
node_event_page -->|"renders booking form"| node_booking_form
node_booker -->|"selects slot"| node_booking_form
node_booking_form -->|"submits booking"| node_booking_actions
node_booking_form -.->|"starts paid checkout"| node_checkout
node_checkout -->|"validates request"| node_validators
node_checkout -->|"checks slot conflict"| node_booking_rules
node_checkout -->|"loads event"| node_database
node_checkout -->|"creates session"| node_stripe
node_stripe -->|"sends payment event"| node_webhook
node_webhook -->|"checks and records booking"| node_database
node_webhook -->|"checks slot conflict"| node_booking_rules
node_webhook -->|"creates meeting event"| node_calendar
node_calendar -.->|"creates calendar event"| node_google_calendar
node_webhook -->|"calculates payout amounts"| node_payouts
node_meetings -->|"handles completed payouts"| node_payouts
node_payouts -->|"creates transfer"| node_stripe
node_payouts -->|"updates payout state"| node_database
node_booker -->|"views booking outcome"| node_booking_status
node_booking_status -->|"reports booking issue"| node_booking_actions
node_meetings -->|"updates meeting status"| node_database
node_dashboard -.->|"reads signed-in user"| node_clerk

click node_dashboard "https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/dashboard/page.jsx"
click node_user_actions "https://github.com/khadar1020/timelymeeting/blob/main/actions/users.js"
click node_availability_ui "https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/availability/_components/availability-form.jsx"
click node_availability_actions "https://github.com/khadar1020/timelymeeting/blob/main/actions/availability.js"
click node_event_ui "https://github.com/khadar1020/timelymeeting/blob/main/components/event-form.jsx"
click node_event_actions "https://github.com/khadar1020/timelymeeting/blob/main/actions/events.js"
click node_meetings "https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/meetings/_components/meeting-actions.jsx"
click node_profile "https://github.com/khadar1020/timelymeeting/blob/main/app/%5Busername%5D/page.jsx"
click node_event_page "https://github.com/khadar1020/timelymeeting/blob/main/app/%5Busername%5D/%5BeventId%5D/page.jsx"
click node_booking_form "https://github.com/khadar1020/timelymeeting/blob/main/app/%5Busername%5D/%5BeventId%5D/_components/booking-form.jsx"
click node_booking_actions "https://github.com/khadar1020/timelymeeting/blob/main/actions/bookings.js"
click node_booking_status "https://github.com/khadar1020/timelymeeting/blob/main/app/booking/success/page.jsx"
click node_checkout "https://github.com/khadar1020/timelymeeting/blob/main/app/api/stripe/create-checkout-session/route.js"
click node_webhook "https://github.com/khadar1020/timelymeeting/blob/main/app/api/stripe/webhook/route.js"
click node_connect_card "https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/dashboard/_components/stripe-connect-card.jsx"
click node_payouts "https://github.com/khadar1020/timelymeeting/blob/main/lib/stripe-connect.js"
click node_calendar "https://github.com/khadar1020/timelymeeting/blob/main/lib/calendar.js"
click node_booking_rules "https://github.com/khadar1020/timelymeeting/blob/main/lib/bookings.js"
click node_validators "https://github.com/khadar1020/timelymeeting/blob/main/app/lib/validators.js"
click node_database "https://github.com/khadar1020/timelymeeting/blob/main/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_dashboard,node_user_actions,node_availability_ui,node_availability_actions,node_event_ui,node_event_actions,node_meetings toneBlue
class node_profile,node_event_page,node_booking_form,node_booking_actions,node_booking_status toneAmber
class node_checkout,node_webhook,node_connect_card,node_payouts toneMint
class node_calendar,node_booking_rules,node_validators,node_database,node_clerk toneRose
class node_creator,node_booker,node_google_calendar,node_stripe toneIndigo
```

## Components

### Creator Workspace

- [Dashboard](https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/dashboard/page.jsx): `app/(main)/dashboard/page.jsx`
- [User account actions](https://github.com/khadar1020/timelymeeting/blob/main/actions/users.js): `actions/users.js`
- [Availability setup](https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/availability/_components/availability-form.jsx): `app/(main)/availability/_components/availability-form.jsx`
- [Availability actions](https://github.com/khadar1020/timelymeeting/blob/main/actions/availability.js): `actions/availability.js`
- [Event management](https://github.com/khadar1020/timelymeeting/blob/main/components/event-form.jsx): `components/event-form.jsx`
- [Event actions](https://github.com/khadar1020/timelymeeting/blob/main/actions/events.js): `actions/events.js`
- [Meeting management](https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/meetings/_components/meeting-actions.jsx): `app/(main)/meetings/_components/meeting-actions.jsx`

### Public Booking

- [Public profile](https://github.com/khadar1020/timelymeeting/blob/main/app/%5Busername%5D/page.jsx): `app/[username]/page.jsx`
- [Public event page](https://github.com/khadar1020/timelymeeting/blob/main/app/%5Busername%5D/%5BeventId%5D/page.jsx): `app/[username]/[eventId]/page.jsx`
- [Booking form](https://github.com/khadar1020/timelymeeting/blob/main/app/%5Busername%5D/%5BeventId%5D/_components/booking-form.jsx): `app/[username]/[eventId]/_components/booking-form.jsx`
- [Booking actions](https://github.com/khadar1020/timelymeeting/blob/main/actions/bookings.js): `actions/bookings.js`
- [Booking success and issue report](https://github.com/khadar1020/timelymeeting/blob/main/app/booking/success/page.jsx): `app/booking/success/page.jsx`

### Payments & Payouts

- [Checkout session API](https://github.com/khadar1020/timelymeeting/blob/main/app/api/stripe/create-checkout-session/route.js): `app/api/stripe/create-checkout-session/route.js`
- [Payment webhook](https://github.com/khadar1020/timelymeeting/blob/main/app/api/stripe/webhook/route.js): `app/api/stripe/webhook/route.js`
- [Mentor Connect setup](https://github.com/khadar1020/timelymeeting/blob/main/app/(main)/dashboard/_components/stripe-connect-card.jsx): `app/(main)/dashboard/_components/stripe-connect-card.jsx`
- [Payout service](https://github.com/khadar1020/timelymeeting/blob/main/lib/stripe-connect.js): `lib/stripe-connect.js`

### Application Services

- [Calendar integration](https://github.com/khadar1020/timelymeeting/blob/main/lib/calendar.js): `lib/calendar.js`
- [Booking conflict checks](https://github.com/khadar1020/timelymeeting/blob/main/lib/bookings.js): `lib/bookings.js`
- [Input validation](https://github.com/khadar1020/timelymeeting/blob/main/app/lib/validators.js): `app/lib/validators.js`
- [Application database](https://github.com/khadar1020/timelymeeting/blob/main/lib/prisma.js): `lib/prisma.js`
- **Clerk authentication**

### Other components

- **Event creator**
- **Booker**
- **Google Calendar**
- **Stripe**

## Connections

- Event creator → Dashboard: manages account
- Dashboard → User account actions: updates username (evidence: `app/(main)/dashboard/page.jsx`)
- Dashboard → Meeting management: views updates (evidence: `app/(main)/dashboard/page.jsx`)
- Event creator → Availability setup: sets hours
- Availability setup → Availability actions: loads and saves (evidence: `app/(main)/availability/_components/availability-form.jsx`)
- Availability actions → Application database: reads and writes (evidence: `actions/availability.js`)
- Event creator → Event management: creates event types
- Event management → Event actions: submits event (evidence: `components/event-form.jsx`)
- Event actions → Input validation: validates event (evidence: `actions/events.js`)
- Event actions → Application database: stores events (evidence: `actions/events.js`)
- Event creator → Meeting management: manages bookings
- Event creator → Dashboard: connects payout account
- Dashboard → Mentor Connect setup: renders setup (evidence: `app/(main)/dashboard/page.jsx`)
- Mentor Connect setup → Payout service: configures account
- Booker → Public profile: opens shared link
- Public profile → Public event page: opens public event (evidence: `app/[username]/page.jsx`)
- Public event page → Event actions: loads event details (evidence: `app/[username]/[eventId]/page.jsx`)
- Public event page → Availability actions: loads available slots (evidence: `app/[username]/[eventId]/page.jsx`)
- Public event page → Booking form: renders booking form (evidence: `app/[username]/[eventId]/page.jsx`)
- Booker → Booking form: selects slot
- Booking form → Booking actions: submits booking (evidence: `app/[username]/[eventId]/_components/booking-form.jsx`)
- Booking form → Checkout session API: starts paid checkout
- Checkout session API → Input validation: validates request (evidence: `app/api/stripe/create-checkout-session/route.js`)
- Checkout session API → Booking conflict checks: checks slot conflict (evidence: `app/api/stripe/create-checkout-session/route.js`)
- Checkout session API → Application database: loads event (evidence: `app/api/stripe/create-checkout-session/route.js`)
- Checkout session API → Stripe: creates session (evidence: `app/api/stripe/create-checkout-session/route.js`)
- Stripe → Payment webhook: sends payment event
- Payment webhook → Application database: checks and records booking (evidence: `app/api/stripe/webhook/route.js`)
- Payment webhook → Booking conflict checks: checks slot conflict (evidence: `app/api/stripe/webhook/route.js`)
- Payment webhook → Calendar integration: creates meeting event (evidence: `app/api/stripe/webhook/route.js`)
- Calendar integration → Google Calendar: creates calendar event
- Payment webhook → Payout service: calculates payout amounts (evidence: `app/api/stripe/webhook/route.js`)
- Meeting management → Payout service: handles completed payouts
- Payout service → Stripe: creates transfer (evidence: `lib/stripe-connect.js`)
- Payout service → Application database: updates payout state (evidence: `lib/stripe-connect.js`)
- Booker → Booking success and issue report: views booking outcome
- Booking success and issue report → Booking actions: reports booking issue
- Meeting management → Application database: updates meeting status
- Dashboard → Clerk authentication: reads signed-in user
