# vishwa073/timelymeet architecture

> Architecture diagram of the GitHub repository vishwa073/timelymeet, 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/vishwa073/timelymeet
- Repository: https://github.com/vishwa073/timelymeet

## Overview

TimelyMeet lets mentors configure availability and event types, then share public booking links; bookers select a slot and complete a free or paid appointment. The graph separates setup, public discovery/booking, meeting operations, and payment/payout handling, with Prisma as the shared persistence layer. README capabilities include calendar sync, payment status controls, and issue reporting. Some implementation details are unsampled, so only documented links are shown for those; sampled source confirms the checkout/webhook and availability paths.

Main entry points: [`lib/prisma.js`](https://github.com/vishwa073/timelymeet/blob/main/lib/prisma.js) (Application Database), [`actions/events.js`](https://github.com/vishwa073/timelymeet/blob/main/actions/events.js) (Event Services), [`app/[username]/[eventId]/page.jsx`](https://github.com/vishwa073/timelymeet/blob/main/app/%5Busername%5D/%5BeventId%5D/page.jsx) (Public Event Page), [`app/api/stripe/create-checkout-session/route.js`](https://github.com/vishwa073/timelymeet/blob/main/app/api/stripe/create-checkout-session/route.js) (Checkout Session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Mentor Setup"]
  node_dashboard["Account Dashboard<br/>[page.jsx]"]
  node_availability_ui["Availability Setup"]
  node_availability_actions["Availability Services<br/>[availability.js]"]
  node_event_management["Event Management<br/>[event-form.jsx]"]
  node_event_actions["Event Services<br/>[events.js]"]
end

subgraph group_booking["Public Scheduling"]
  node_public_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 Services<br/>[bookings.js]"]
end

subgraph group_ops["Meeting Operations"]
  node_meeting_dashboard["Meeting Controls"]
  node_meeting_actions["Meeting Services<br/>[meetings.js]"]
  node_issue_reporting["Issue Reporting"]
end

subgraph group_payments["Payments &amp; Payouts"]
  node_checkout_route["Checkout Session<br/>[route.js]"]
  node_stripe_webhook["Payment Webhook<br/>[route.js]"]
  node_stripe_connect["Stripe Connect<br/>[stripe-connect.js]"]
end

subgraph group_core["Shared Services"]
  node_calendar["Calendar Events<br/>[calendar.js]"]
  node_validators["Input Validation<br/>[validators.js]"]
  node_db[("Application Database<br/>[prisma.js]")]
end

node_mentor(("Mentor"))
node_booker(("Booker"))
node_stripe["Stripe API"]
node_calendar_api["Google Calendar"]
node_clerk["Clerk Authentication"]

node_mentor -->|"manages account"| node_dashboard
node_mentor -->|"sets availability"| node_availability_ui
node_availability_ui -->|"loads and saves"| node_availability_actions
node_availability_actions -->|"reads and writes"| node_db
node_mentor -->|"creates events"| node_event_management
node_event_management -->|"submits events"| node_event_actions
node_event_actions -->|"validates input"| node_validators
node_event_actions -->|"reads and writes"| node_db
node_booker -->|"browses events"| node_public_profile
node_public_profile -->|"loads public events"| node_event_actions
node_booker -->|"selects event"| node_event_page
node_event_page -->|"loads details"| node_event_actions
node_event_page -->|"loads open slots"| node_availability_actions
node_event_page -->|"renders"| node_booking_form
node_booking_form -->|"submits booking"| node_booking_actions
node_booking_form -.->|"starts paid checkout"| node_checkout_route
node_booking_actions -.->|"stores booking"| node_db
node_checkout_route -->|"validates booking"| node_validators
node_checkout_route -->|"loads event"| node_db
node_checkout_route -->|"creates session"| node_stripe
node_stripe -.->|"sends payment event"| node_stripe_webhook
node_stripe_webhook -->|"confirms booking"| node_db
node_stripe_webhook -->|"creates meeting event"| node_calendar
node_calendar -.->|"creates calendar event"| node_calendar_api
node_stripe_webhook -->|"calculates payout"| node_stripe_connect
node_mentor -->|"manages meetings"| node_meeting_dashboard
node_meeting_dashboard -.->|"updates status"| node_meeting_actions
node_meeting_actions -->|"updates meeting"| node_db
node_meeting_actions -->|"initiates payout"| node_stripe_connect
node_stripe_connect -->|"transfers funds"| node_stripe
node_booker -->|"reports issue"| node_issue_reporting
node_issue_reporting -->|"submits report"| node_booking_actions
node_dashboard -.->|"reads signed-in user"| node_clerk

click node_dashboard "https://github.com/vishwa073/timelymeet/blob/main/app/(main)/dashboard/page.jsx"
click node_availability_ui "https://github.com/vishwa073/timelymeet/blob/main/app/(main)/availability/_components/availability-form.jsx"
click node_availability_actions "https://github.com/vishwa073/timelymeet/blob/main/actions/availability.js"
click node_event_management "https://github.com/vishwa073/timelymeet/blob/main/components/event-form.jsx"
click node_event_actions "https://github.com/vishwa073/timelymeet/blob/main/actions/events.js"
click node_public_profile "https://github.com/vishwa073/timelymeet/blob/main/app/%5Busername%5D/page.jsx"
click node_event_page "https://github.com/vishwa073/timelymeet/blob/main/app/%5Busername%5D/%5BeventId%5D/page.jsx"
click node_booking_form "https://github.com/vishwa073/timelymeet/blob/main/app/%5Busername%5D/%5BeventId%5D/_components/booking-form.jsx"
click node_booking_actions "https://github.com/vishwa073/timelymeet/blob/main/actions/bookings.js"
click node_meeting_dashboard "https://github.com/vishwa073/timelymeet/blob/main/app/(main)/meetings/_components/meeting-actions.jsx"
click node_meeting_actions "https://github.com/vishwa073/timelymeet/blob/main/actions/meetings.js"
click node_issue_reporting "https://github.com/vishwa073/timelymeet/blob/main/app/booking/success/_components/report-booking-issue.jsx"
click node_checkout_route "https://github.com/vishwa073/timelymeet/blob/main/app/api/stripe/create-checkout-session/route.js"
click node_stripe_webhook "https://github.com/vishwa073/timelymeet/blob/main/app/api/stripe/webhook/route.js"
click node_stripe_connect "https://github.com/vishwa073/timelymeet/blob/main/lib/stripe-connect.js"
click node_calendar "https://github.com/vishwa073/timelymeet/blob/main/lib/calendar.js"
click node_validators "https://github.com/vishwa073/timelymeet/blob/main/app/lib/validators.js"
click node_db "https://github.com/vishwa073/timelymeet/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_availability_ui,node_availability_actions,node_event_management,node_event_actions toneBlue
class node_public_profile,node_event_page,node_booking_form,node_booking_actions toneAmber
class node_meeting_dashboard,node_meeting_actions,node_issue_reporting,node_stripe toneMint
class node_checkout_route,node_stripe_webhook,node_stripe_connect toneRose
class node_calendar,node_validators,node_db,node_mentor,node_booker,node_calendar_api,node_clerk toneIndigo
```

## Components

### Mentor Setup

- [Account Dashboard](https://github.com/vishwa073/timelymeet/blob/main/app/(main)/dashboard/page.jsx): `app/(main)/dashboard/page.jsx`
- [Availability Setup](https://github.com/vishwa073/timelymeet/blob/main/app/(main)/availability/_components/availability-form.jsx): `app/(main)/availability/_components/availability-form.jsx`
- [Availability Services](https://github.com/vishwa073/timelymeet/blob/main/actions/availability.js): `actions/availability.js`
- [Event Management](https://github.com/vishwa073/timelymeet/blob/main/components/event-form.jsx): `components/event-form.jsx`
- [Event Services](https://github.com/vishwa073/timelymeet/blob/main/actions/events.js): `actions/events.js`

### Public Scheduling

- [Public Profile](https://github.com/vishwa073/timelymeet/blob/main/app/%5Busername%5D/page.jsx): `app/[username]/page.jsx`
- [Public Event Page](https://github.com/vishwa073/timelymeet/blob/main/app/%5Busername%5D/%5BeventId%5D/page.jsx): `app/[username]/[eventId]/page.jsx`
- [Booking Form](https://github.com/vishwa073/timelymeet/blob/main/app/%5Busername%5D/%5BeventId%5D/_components/booking-form.jsx): `app/[username]/[eventId]/_components/booking-form.jsx`
- [Booking Services](https://github.com/vishwa073/timelymeet/blob/main/actions/bookings.js): `actions/bookings.js`

### Meeting Operations

- [Meeting Controls](https://github.com/vishwa073/timelymeet/blob/main/app/(main)/meetings/_components/meeting-actions.jsx): `app/(main)/meetings/_components/meeting-actions.jsx`
- [Meeting Services](https://github.com/vishwa073/timelymeet/blob/main/actions/meetings.js): `actions/meetings.js`
- [Issue Reporting](https://github.com/vishwa073/timelymeet/blob/main/app/booking/success/_components/report-booking-issue.jsx): `app/booking/success/_components/report-booking-issue.jsx`

### Payments & Payouts

- [Checkout Session](https://github.com/vishwa073/timelymeet/blob/main/app/api/stripe/create-checkout-session/route.js): `app/api/stripe/create-checkout-session/route.js`
- [Payment Webhook](https://github.com/vishwa073/timelymeet/blob/main/app/api/stripe/webhook/route.js): `app/api/stripe/webhook/route.js`
- [Stripe Connect](https://github.com/vishwa073/timelymeet/blob/main/lib/stripe-connect.js): `lib/stripe-connect.js`

### Shared Services

- [Calendar Events](https://github.com/vishwa073/timelymeet/blob/main/lib/calendar.js): `lib/calendar.js`
- [Input Validation](https://github.com/vishwa073/timelymeet/blob/main/app/lib/validators.js): `app/lib/validators.js`
- [Application Database](https://github.com/vishwa073/timelymeet/blob/main/lib/prisma.js): `lib/prisma.js`

### Other components

- **Mentor**
- **Booker**
- **Stripe API**
- **Google Calendar**
- **Clerk Authentication**

## Connections

- Mentor → Account Dashboard: manages account
- Mentor → Availability Setup: sets availability
- Availability Setup → Availability Services: loads and saves (evidence: `app/(main)/availability/_components/availability-form.jsx`)
- Availability Services → Application Database: reads and writes (evidence: `actions/availability.js`)
- Mentor → Event Management: creates events
- Event Management → Event Services: submits events (evidence: `components/event-form.jsx`)
- Event Services → Input Validation: validates input (evidence: `actions/events.js`)
- Event Services → Application Database: reads and writes (evidence: `actions/events.js`)
- Booker → Public Profile: browses events
- Public Profile → Event Services: loads public events (evidence: `app/[username]/page.jsx`)
- Booker → Public Event Page: selects event
- Public Event Page → Event Services: loads details (evidence: `app/[username]/[eventId]/page.jsx`)
- Public Event Page → Availability Services: loads open slots (evidence: `app/[username]/[eventId]/page.jsx`)
- Public Event Page → Booking Form: renders (evidence: `app/[username]/[eventId]/page.jsx`)
- Booking Form → Booking Services: submits booking (evidence: `app/[username]/[eventId]/_components/booking-form.jsx`)
- Booking Form → Checkout Session: starts paid checkout
- Booking Services → Application Database: stores booking
- Checkout Session → Input Validation: validates booking (evidence: `app/api/stripe/create-checkout-session/route.js`)
- Checkout Session → Application Database: loads event (evidence: `app/api/stripe/create-checkout-session/route.js`)
- Checkout Session → Stripe API: creates session (evidence: `app/api/stripe/create-checkout-session/route.js`)
- Stripe API → Payment Webhook: sends payment event
- Payment Webhook → Application Database: confirms booking (evidence: `app/api/stripe/webhook/route.js`)
- Payment Webhook → Calendar Events: creates meeting event (evidence: `app/api/stripe/webhook/route.js`)
- Calendar Events → Google Calendar: creates calendar event
- Payment Webhook → Stripe Connect: calculates payout (evidence: `app/api/stripe/webhook/route.js`)
- Mentor → Meeting Controls: manages meetings
- Meeting Controls → Meeting Services: updates status
- Meeting Services → Application Database: updates meeting (evidence: `actions/meetings.js`)
- Meeting Services → Stripe Connect: initiates payout (evidence: `actions/meetings.js`)
- Stripe Connect → Stripe API: transfers funds (evidence: `lib/stripe-connect.js`)
- Booker → Issue Reporting: reports issue
- Issue Reporting → Booking Services: submits report (evidence: `app/booking/success/_components/report-booking-issue.jsx`)
- Account Dashboard → Clerk Authentication: reads signed-in user
