# kcapturedvisuals/kcaptured architecture

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

- Interactive diagram: https://gitdiagram.com/kcapturedvisuals/kcaptured
- Repository: https://github.com/kcapturedvisuals/kcaptured

## Overview

KCAPTURED is a photography portfolio and booking site with public discovery pages, session booking and client booking management, plus a substantial admin/content-management area in the repository. The main visitor path runs from the homepage’s service offers to booking, with booking operations handled server-side and persisted in the database; portfolio, testimonials, FAQ and contact are parallel public capabilities. Several admin screens and APIs are present, but their UI-to-API wiring is not established by the excerpts, so those links are omitted. The README documents Formspree contact delivery and Cloudinary media, while sampled source shows booking email and database behavior.

Main entry points: [`app/page.tsx`](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/page.tsx) (Homepage), [`app/api/bookings/route.ts`](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/api/bookings/route.ts) (Booking operations), [`app/api`](https://github.com/kcapturedvisuals/kcaptured/tree/main/app/api) (Content APIs), [`components/contact-form.tsx`](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/contact-form.tsx) (Contact form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public experience"]
  node_home["Homepage<br/>[page.tsx]"]
  node_hero["Hero section<br/>[hero-section.tsx]"]
  node_services["Service offers"]
  node_portfolio["Portfolio gallery<br/>[page.tsx]"]
  node_gallery["Masonry gallery"]
  node_testimonials["Testimonials"]
  node_faq["FAQ<br/>[page.tsx]"]
  node_contact["Contact form<br/>[contact-form.tsx]"]
end

subgraph group_booking["Booking lifecycle"]
  node_booking_page["Booking page<br/>[page.tsx]"]
  node_booking_form["Booking request form"]
  node_booking_api["Booking operations<br/>[route.ts]"]
  node_booking_record[("Booking records<br/>[schema.ts]")]
  node_booking_email["Booking email<br/>[email.ts]"]
  node_client_manage["Client booking access<br/>[page.tsx]"]
  node_manage_token["Dashboard token access<br/>[route.ts]"]
end

subgraph group_admin["Admin management"]
  node_admin_ui["Admin screens"]
  node_admin_login["Admin login form"]
  node_admin_api["Content APIs"]
end

subgraph group_core["Shared services"]
  node_auth["Admin authentication<br/>[auth-utils.ts]"]
  node_validation["Input validation"]
  node_database[("Database access<br/>[db.ts]")]
end

node_visitor(("Site visitor"))
node_cloudinary["Cloudinary media"]
node_formspree["Formspree email"]

node_visitor -->|"visits"| node_home
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_services
node_home -->|"renders"| node_testimonials
node_home -->|"renders"| node_contact
node_services -->|"links to"| node_booking_page
node_visitor -->|"browses"| node_portfolio
node_portfolio -->|"renders"| node_gallery
node_visitor -->|"browses"| node_faq
node_visitor -->|"submits"| node_contact
node_contact -.->|"delivers email"| node_formspree
node_visitor -->|"books session"| node_booking_page
node_booking_page -->|"renders"| node_booking_form
node_booking_api -->|"queries"| node_database
node_booking_api -.->|"updates records"| node_booking_record
node_booking_api -->|"sends notices"| node_booking_email
node_client_manage -->|"reads bookings"| node_database
node_manage_token -->|"validates token"| node_auth
node_admin_login -.->|"uses sessions"| node_auth
node_admin_api -->|"checks access"| node_auth
node_admin_api -->|"validates input"| node_validation
node_admin_api -->|"persists content"| node_database
node_admin_api -.->|"uploads media"| node_cloudinary
node_booking_api -->|"validates input"| node_validation

click node_home "https://github.com/kcapturedvisuals/kcaptured/blob/main/app/page.tsx"
click node_hero "https://github.com/kcapturedvisuals/kcaptured/blob/main/components/hero-section.tsx"
click node_services "https://github.com/kcapturedvisuals/kcaptured/blob/main/components/services-section.tsx"
click node_portfolio "https://github.com/kcapturedvisuals/kcaptured/blob/main/app/portfolio/page.tsx"
click node_gallery "https://github.com/kcapturedvisuals/kcaptured/blob/main/components/masonry-gallery.tsx"
click node_testimonials "https://github.com/kcapturedvisuals/kcaptured/blob/main/components/testimonials-section.tsx"
click node_faq "https://github.com/kcapturedvisuals/kcaptured/blob/main/app/faq/page.tsx"
click node_contact "https://github.com/kcapturedvisuals/kcaptured/blob/main/components/contact-form.tsx"
click node_booking_page "https://github.com/kcapturedvisuals/kcaptured/blob/main/app/book/page.tsx"
click node_booking_form "https://github.com/kcapturedvisuals/kcaptured/blob/main/components/booking/booking-request-form.tsx"
click node_booking_api "https://github.com/kcapturedvisuals/kcaptured/blob/main/app/api/bookings/route.ts"
click node_booking_record "https://github.com/kcapturedvisuals/kcaptured/blob/main/db/schema.ts"
click node_booking_email "https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/email.ts"
click node_client_manage "https://github.com/kcapturedvisuals/kcaptured/blob/main/app/dashboard/page.tsx"
click node_manage_token "https://github.com/kcapturedvisuals/kcaptured/blob/main/app/dashboard/access/%5Btoken%5D/route.ts"
click node_admin_ui "https://github.com/kcapturedvisuals/kcaptured/tree/main/app/admin"
click node_admin_login "https://github.com/kcapturedvisuals/kcaptured/blob/main/components/admin/admin-login-form.tsx"
click node_admin_api "https://github.com/kcapturedvisuals/kcaptured/tree/main/app/api"
click node_auth "https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/auth-utils.ts"
click node_validation "https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/input-validation.ts"
click node_database "https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/db.ts"

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_home,node_hero,node_services,node_portfolio,node_gallery,node_testimonials,node_faq,node_contact toneBlue
class node_booking_page,node_booking_form,node_booking_api,node_booking_record,node_booking_email,node_client_manage,node_manage_token toneAmber
class node_admin_ui,node_admin_login,node_admin_api toneMint
class node_auth,node_validation,node_database toneRose
class node_visitor,node_cloudinary,node_formspree toneIndigo
```

## Components

### Public experience

- [Homepage](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/page.tsx): `app/page.tsx`
- [Hero section](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/hero-section.tsx): `components/hero-section.tsx`
- [Service offers](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/services-section.tsx): `components/services-section.tsx`
- [Portfolio gallery](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/portfolio/page.tsx): `app/portfolio/page.tsx`
- [Masonry gallery](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/masonry-gallery.tsx): `components/masonry-gallery.tsx`
- [Testimonials](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/testimonials-section.tsx): `components/testimonials-section.tsx`
- [FAQ](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/faq/page.tsx): `app/faq/page.tsx`
- [Contact form](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/contact-form.tsx): `components/contact-form.tsx`

### Booking lifecycle

- [Booking page](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/book/page.tsx): `app/book/page.tsx`
- [Booking request form](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/booking/booking-request-form.tsx): `components/booking/booking-request-form.tsx`
- [Booking operations](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/api/bookings/route.ts): `app/api/bookings/route.ts`
- [Booking records](https://github.com/kcapturedvisuals/kcaptured/blob/main/db/schema.ts): `db/schema.ts`
- [Booking email](https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/email.ts): `lib/email.ts`
- [Client booking access](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Dashboard token access](https://github.com/kcapturedvisuals/kcaptured/blob/main/app/dashboard/access/%5Btoken%5D/route.ts): `app/dashboard/access/[token]/route.ts`

### Admin management

- [Admin screens](https://github.com/kcapturedvisuals/kcaptured/tree/main/app/admin): `app/admin`
- [Admin login form](https://github.com/kcapturedvisuals/kcaptured/blob/main/components/admin/admin-login-form.tsx): `components/admin/admin-login-form.tsx`
- [Content APIs](https://github.com/kcapturedvisuals/kcaptured/tree/main/app/api): `app/api`

### Shared services

- [Admin authentication](https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/auth-utils.ts): `lib/auth-utils.ts`
- [Input validation](https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/input-validation.ts): `lib/input-validation.ts`
- [Database access](https://github.com/kcapturedvisuals/kcaptured/blob/main/lib/db.ts): `lib/db.ts`

### Other components

- **Site visitor**
- **Cloudinary media**
- **Formspree email**

## Connections

- Site visitor → Homepage: visits (evidence: `app/page.tsx`)
- Homepage → Hero section: renders (evidence: `app/page.tsx`)
- Homepage → Service offers: renders (evidence: `app/page.tsx`)
- Homepage → Testimonials: renders (evidence: `app/page.tsx`)
- Homepage → Contact form: renders (evidence: `app/page.tsx`)
- Service offers → Booking page: links to (evidence: `components/services-section.tsx`)
- Site visitor → Portfolio gallery: browses (evidence: `README.md`)
- Portfolio gallery → Masonry gallery: renders (evidence: `app/portfolio/page.tsx`)
- Site visitor → FAQ: browses (evidence: `README.md`)
- Site visitor → Contact form: submits (evidence: `README.md`)
- Contact form → Formspree email: delivers email (evidence: `README.md`)
- Site visitor → Booking page: books session (evidence: `app/book/page.tsx`)
- Booking page → Booking request form: renders (evidence: `app/book/page.tsx`)
- Booking operations → Database access: queries (evidence: `app/api/bookings/route.ts`)
- Booking operations → Booking records: updates records
- Booking operations → Booking email: sends notices (evidence: `app/api/bookings/route.ts`)
- Client booking access → Database access: reads bookings (evidence: `app/dashboard/page.tsx`)
- Dashboard token access → Admin authentication: validates token (evidence: `app/dashboard/access/[token]/route.ts`)
- Admin login form → Admin authentication: uses sessions
- Content APIs → Admin authentication: checks access (evidence: `app/api/package/route.ts`)
- Content APIs → Input validation: validates input (evidence: `app/api/package/route.ts`)
- Content APIs → Database access: persists content (evidence: `app/api/package/route.ts`)
- Content APIs → Cloudinary media: uploads media
- Booking operations → Input validation: validates input (evidence: `app/api/bookings/route.ts`)
