# enrique-diazv/pik architecture

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

- Interactive diagram: https://gitdiagram.com/enrique-diazv/pik
- Repository: https://github.com/enrique-diazv/pik

## Overview

PIK is a Next.js demo with two independent user-to-result flows: business registration and appointment booking. The landing page links to each; registration collects business details, categories, location and hours, services, and staff before a review and simulated confirmation. Booking presents a mock business profile, then guides the user through staff, date/time, summary, and confirmation. The README describes in-memory mock reservations and no backend or external runtime services. Edges reflect the README and visible import/call references in the source index; unsampled implementation details are not assumed.

Main entry points: [`src/components/business/business-onboarding.tsx`](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-onboarding.tsx) (Registration flow), [`src/components/booking/business-profile-tabs.tsx`](https://github.com/enrique-diazv/pik/blob/main/src/components/booking/business-profile-tabs.tsx) (Business profile), [`src/app/page.tsx`](https://github.com/enrique-diazv/pik/blob/main/src/app/page.tsx) (Landing page), [`src/app/booking/page.tsx`](https://github.com/enrique-diazv/pik/blob/main/src/app/booking/page.tsx) (Booking route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_onboarding_route["Registration route<br/>[page.tsx]"]
  node_booking_route["Booking route<br/>[page.tsx]"]
end

subgraph group_onboarding["Business onboarding"]
  node_onboard_flow["Registration flow"]
  node_details["Business details"]
  node_categories["Business categories"]
  node_location["Location and hours"]
  node_hours_editor["Hours editor"]
  node_time_fields["Time range fields"]
  node_services["Services form"]
  node_staff["Staff form"]
  node_summary["Review and confirm"]
end

subgraph group_booking["Appointment booking"]
  node_booking_profile["Business profile"]
  node_gallery["Photo gallery"]
  node_date_picker["Date and availability"]
  node_time_picker["Time selection"]
end

subgraph group_domain["Domain rules and data"]
  node_mock_business["Demo business<br/>[business.ts]"]
  node_availability["Slot calculation"]
  node_hours_rules["Opening-hours rules<br/>[opening-hours.ts]"]
  node_time_rules["Time utilities<br/>[time-picker.ts]"]
  node_service_rules["Service validation"]
  node_reservation_mock[("Reservation mock")]
  node_registration_mock["Registration mock"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_landing
node_landing -->|"links to"| node_onboarding_route
node_landing -->|"links to"| node_booking_route
node_onboarding_route -->|"renders"| node_onboard_flow
node_onboard_flow -->|"collects"| node_details
node_onboard_flow -->|"collects"| node_categories
node_onboard_flow -->|"collects"| node_location
node_onboard_flow -->|"collects"| node_services
node_onboard_flow -->|"collects"| node_staff
node_onboard_flow -->|"reviews"| node_summary
node_location -->|"renders"| node_hours_editor
node_hours_editor -->|"renders"| node_time_fields
node_time_fields -->|"uses"| node_time_rules
node_hours_editor -->|"uses"| node_hours_rules
node_services -->|"validates with"| node_service_rules
node_summary -->|"confirms through"| node_registration_mock
node_booking_route -->|"loads"| node_mock_business
node_booking_route -->|"renders"| node_booking_profile
node_booking_profile -->|"renders"| node_gallery
node_booking_profile -->|"renders"| node_date_picker
node_date_picker -->|"renders"| node_time_picker
node_date_picker -->|"gets slots"| node_availability
node_time_picker -->|"gets slots"| node_availability
node_availability -->|"converts times"| node_time_rules
node_booking_profile -->|"confirms reservation"| node_reservation_mock

click node_landing "https://github.com/enrique-diazv/pik/blob/main/src/app/page.tsx"
click node_onboarding_route "https://github.com/enrique-diazv/pik/blob/main/src/app/business/onboarding/page.tsx"
click node_booking_route "https://github.com/enrique-diazv/pik/blob/main/src/app/booking/page.tsx"
click node_onboard_flow "https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-onboarding.tsx"
click node_details "https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-details-form.tsx"
click node_categories "https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-categories-form.tsx"
click node_location "https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-location-form.tsx"
click node_hours_editor "https://github.com/enrique-diazv/pik/blob/main/src/components/business/opening-hours-editor.tsx"
click node_time_fields "https://github.com/enrique-diazv/pik/blob/main/src/components/business/time-range-fields.tsx"
click node_services "https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-services-form.tsx"
click node_staff "https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-staff-form.tsx"
click node_summary "https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-summary.tsx"
click node_booking_profile "https://github.com/enrique-diazv/pik/blob/main/src/components/booking/business-profile-tabs.tsx"
click node_gallery "https://github.com/enrique-diazv/pik/blob/main/src/components/booking/business-gallery.tsx"
click node_date_picker "https://github.com/enrique-diazv/pik/blob/main/src/components/booking/booking-date-picker.tsx"
click node_time_picker "https://github.com/enrique-diazv/pik/blob/main/src/components/booking/booking-time-picker.tsx"
click node_mock_business "https://github.com/enrique-diazv/pik/blob/main/src/data/mocks/business.ts"
click node_availability "https://github.com/enrique-diazv/pik/blob/main/src/lib/booking-availability.ts"
click node_hours_rules "https://github.com/enrique-diazv/pik/blob/main/src/lib/opening-hours.ts"
click node_time_rules "https://github.com/enrique-diazv/pik/blob/main/src/lib/time-picker.ts"
click node_service_rules "https://github.com/enrique-diazv/pik/blob/main/src/lib/service-validation.ts"
click node_reservation_mock "https://github.com/enrique-diazv/pik/blob/main/src/data/mocks/booking-reservations.ts"
click node_registration_mock "https://github.com/enrique-diazv/pik/blob/main/src/data/mocks/business-registration.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_landing,node_onboarding_route,node_booking_route toneBlue
class node_onboard_flow,node_details,node_categories,node_location,node_hours_editor,node_time_fields,node_services,node_staff,node_summary toneAmber
class node_booking_profile,node_gallery,node_date_picker,node_time_picker toneMint
class node_mock_business,node_availability,node_hours_rules,node_time_rules,node_service_rules,node_reservation_mock,node_registration_mock toneRose
class node_visitor toneIndigo
```

## Components

### App entry

- [Landing page](https://github.com/enrique-diazv/pik/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Registration route](https://github.com/enrique-diazv/pik/blob/main/src/app/business/onboarding/page.tsx): `src/app/business/onboarding/page.tsx`
- [Booking route](https://github.com/enrique-diazv/pik/blob/main/src/app/booking/page.tsx): `src/app/booking/page.tsx`

### Business onboarding

- [Registration flow](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-onboarding.tsx): `src/components/business/business-onboarding.tsx`
- [Business details](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-details-form.tsx): `src/components/business/business-details-form.tsx`
- [Business categories](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-categories-form.tsx): `src/components/business/business-categories-form.tsx`
- [Location and hours](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-location-form.tsx): `src/components/business/business-location-form.tsx`
- [Hours editor](https://github.com/enrique-diazv/pik/blob/main/src/components/business/opening-hours-editor.tsx): `src/components/business/opening-hours-editor.tsx`
- [Time range fields](https://github.com/enrique-diazv/pik/blob/main/src/components/business/time-range-fields.tsx): `src/components/business/time-range-fields.tsx`
- [Services form](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-services-form.tsx): `src/components/business/business-services-form.tsx`
- [Staff form](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-staff-form.tsx): `src/components/business/business-staff-form.tsx`
- [Review and confirm](https://github.com/enrique-diazv/pik/blob/main/src/components/business/business-summary.tsx): `src/components/business/business-summary.tsx`

### Appointment booking

- [Business profile](https://github.com/enrique-diazv/pik/blob/main/src/components/booking/business-profile-tabs.tsx): `src/components/booking/business-profile-tabs.tsx`
- [Photo gallery](https://github.com/enrique-diazv/pik/blob/main/src/components/booking/business-gallery.tsx): `src/components/booking/business-gallery.tsx`
- [Date and availability](https://github.com/enrique-diazv/pik/blob/main/src/components/booking/booking-date-picker.tsx): `src/components/booking/booking-date-picker.tsx`
- [Time selection](https://github.com/enrique-diazv/pik/blob/main/src/components/booking/booking-time-picker.tsx): `src/components/booking/booking-time-picker.tsx`

### Domain rules and data

- [Demo business](https://github.com/enrique-diazv/pik/blob/main/src/data/mocks/business.ts): `src/data/mocks/business.ts`
- [Slot calculation](https://github.com/enrique-diazv/pik/blob/main/src/lib/booking-availability.ts): `src/lib/booking-availability.ts`
- [Opening-hours rules](https://github.com/enrique-diazv/pik/blob/main/src/lib/opening-hours.ts): `src/lib/opening-hours.ts`
- [Time utilities](https://github.com/enrique-diazv/pik/blob/main/src/lib/time-picker.ts): `src/lib/time-picker.ts`
- [Service validation](https://github.com/enrique-diazv/pik/blob/main/src/lib/service-validation.ts): `src/lib/service-validation.ts`
- [Reservation mock](https://github.com/enrique-diazv/pik/blob/main/src/data/mocks/booking-reservations.ts): `src/data/mocks/booking-reservations.ts`
- [Registration mock](https://github.com/enrique-diazv/pik/blob/main/src/data/mocks/business-registration.ts): `src/data/mocks/business-registration.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Landing page: opens (evidence: `README.md`)
- Landing page → Registration route: links to (evidence: `README.md`)
- Landing page → Booking route: links to (evidence: `README.md`)
- Registration route → Registration flow: renders (evidence: `src/app/business/onboarding/page.tsx`)
- Registration flow → Business details: collects (evidence: `src/components/business/business-onboarding.tsx`)
- Registration flow → Business categories: collects (evidence: `src/components/business/business-onboarding.tsx`)
- Registration flow → Location and hours: collects (evidence: `src/components/business/business-onboarding.tsx`)
- Registration flow → Services form: collects (evidence: `src/components/business/business-onboarding.tsx`)
- Registration flow → Staff form: collects (evidence: `src/components/business/business-onboarding.tsx`)
- Registration flow → Review and confirm: reviews (evidence: `src/components/business/business-onboarding.tsx`)
- Location and hours → Hours editor: renders (evidence: `src/components/business/business-location-form.tsx`)
- Hours editor → Time range fields: renders (evidence: `src/components/business/opening-hours-editor.tsx`)
- Time range fields → Time utilities: uses (evidence: `src/components/business/time-range-fields.tsx`)
- Hours editor → Opening-hours rules: uses (evidence: `src/components/business/opening-hours-editor.tsx`)
- Services form → Service validation: validates with (evidence: `src/components/business/business-services-form.tsx`)
- Review and confirm → Registration mock: confirms through (evidence: `src/components/business/business-summary.tsx`)
- Booking route → Demo business: loads (evidence: `src/app/booking/page.tsx`)
- Booking route → Business profile: renders (evidence: `src/app/booking/page.tsx`)
- Business profile → Photo gallery: renders (evidence: `src/components/booking/business-profile-tabs.tsx`)
- Business profile → Date and availability: renders (evidence: `src/components/booking/business-profile-tabs.tsx`)
- Date and availability → Time selection: renders (evidence: `src/components/booking/booking-date-picker.tsx`)
- Date and availability → Slot calculation: gets slots (evidence: `src/components/booking/booking-date-picker.tsx`)
- Time selection → Slot calculation: gets slots (evidence: `src/components/booking/booking-time-picker.tsx`)
- Slot calculation → Time utilities: converts times (evidence: `src/lib/booking-availability.ts`)
- Business profile → Reservation mock: confirms reservation (evidence: `src/components/booking/business-profile-tabs.tsx`)
