# hasishinfant/parko_ architecture

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

- Interactive diagram: https://gitdiagram.com/hasishinfant/parko_
- Repository: https://github.com/hasishinfant/parko_

## Overview

Parko is a React Native parking app with customer booking and operator tools. Customers authenticate, browse parking, choose a spot, book and review a price, then receive a QR pass; administrators view dashboard analytics and validate passes with a scanner. The navigator gates screens by Supabase session and user role. The README documents the customer stages and admin capabilities, while source excerpts show auth calls and navigator wiring. Booking, payment, availability, and admin data implementations are only partly sampled, so their backend relationships are not inferred.

Main entry points: [`src/navigation/AppNavigator.tsx`](https://github.com/hasishinfant/parko_/blob/main/src/navigation/AppNavigator.tsx) (App navigation), [`src/screens/ParkingDetailsScreen.tsx`](https://github.com/hasishinfant/parko_/blob/main/src/screens/ParkingDetailsScreen.tsx) (Parking details), [`src/screens/SlotSelectionScreen.tsx`](https://github.com/hasishinfant/parko_/blob/main/src/screens/SlotSelectionScreen.tsx) (Slot selection), [`src/screens/BookingScreen.tsx`](https://github.com/hasishinfant/parko_/blob/main/src/screens/BookingScreen.tsx) (Booking details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer booking"]
  node_landing["Landing<br/>[LandingScreen.tsx]"]
  node_auth["Login and signup"]
  node_home["Parking map<br/>[HomeScreen.tsx]"]
  node_details["Parking details"]
  node_slots["Slot selection"]
  node_booking["Booking details<br/>[BookingScreen.tsx]"]
  node_payment["Payment summary<br/>[PaymentScreen.tsx]"]
  node_ticket["QR ticket<br/>[QRCodeScreen.tsx]"]
end

subgraph group_admin["Operator tools"]
  node_admin["Admin dashboard"]
  node_scanner["Pass scanner<br/>[ScannerScreen.tsx]"]
end

subgraph group_foundation["App foundation"]
  node_navigator["App navigation<br/>[AppNavigator.tsx]"]
  node_supabaseclient["Supabase client<br/>[supabase.ts]"]
  node_parkingdata["Sample parking data<br/>[dummyData.ts]"]
  node_ui["Reusable UI"]
  node_theme["Theme tokens"]
end

node_user(("Customer"))
node_operator(("Operator"))
node_supabase[("Supabase service")]

node_user -->|"opens app"| node_navigator
node_operator -->|"opens app"| node_navigator
node_navigator -->|"routes unauthenticated"| node_landing
node_navigator -->|"routes unauthenticated"| node_auth
node_navigator -->|"routes customer"| node_home
node_navigator -->|"routes customer"| node_details
node_navigator -->|"routes customer"| node_slots
node_navigator -->|"routes customer"| node_booking
node_navigator -->|"routes customer"| node_payment
node_navigator -->|"routes customer"| node_ticket
node_navigator -->|"routes admin"| node_admin
node_navigator -->|"routes admin"| node_scanner
node_landing -->|"offers sign in"| node_auth
node_auth -->|"authenticates"| node_supabaseclient
node_navigator -->|"checks session"| node_supabaseclient
node_supabaseclient -->|"connects to"| node_supabase
node_home -->|"opens location"| node_details
node_details -->|"continues booking"| node_slots
node_slots -->|"selects spot"| node_booking
node_booking -->|"reviews price"| node_payment
node_payment -->|"receives pass"| node_ticket
node_admin -->|"opens scanner"| node_scanner
node_home -->|"uses sample data"| node_parkingdata
node_details -->|"uses sample data"| node_parkingdata
node_booking -->|"uses sample data"| node_parkingdata
node_slots -->|"uses sample data"| node_parkingdata
node_ui -->|"uses tokens"| node_theme

click node_navigator "https://github.com/hasishinfant/parko_/blob/main/src/navigation/AppNavigator.tsx"
click node_landing "https://github.com/hasishinfant/parko_/blob/main/src/screens/LandingScreen.tsx"
click node_auth "https://github.com/hasishinfant/parko_/tree/main/src/screens/auth"
click node_home "https://github.com/hasishinfant/parko_/blob/main/src/screens/HomeScreen.tsx"
click node_details "https://github.com/hasishinfant/parko_/blob/main/src/screens/ParkingDetailsScreen.tsx"
click node_slots "https://github.com/hasishinfant/parko_/blob/main/src/screens/SlotSelectionScreen.tsx"
click node_booking "https://github.com/hasishinfant/parko_/blob/main/src/screens/BookingScreen.tsx"
click node_payment "https://github.com/hasishinfant/parko_/blob/main/src/screens/PaymentScreen.tsx"
click node_ticket "https://github.com/hasishinfant/parko_/blob/main/src/screens/QRCodeScreen.tsx"
click node_admin "https://github.com/hasishinfant/parko_/blob/main/src/screens/AdminDashboardScreen.tsx"
click node_scanner "https://github.com/hasishinfant/parko_/blob/main/src/screens/ScannerScreen.tsx"
click node_supabaseclient "https://github.com/hasishinfant/parko_/blob/main/src/lib/supabase.ts"
click node_parkingdata "https://github.com/hasishinfant/parko_/blob/main/src/data/dummyData.ts"
click node_ui "https://github.com/hasishinfant/parko_/tree/main/src/components"
click node_theme "https://github.com/hasishinfant/parko_/tree/main/src/theme"

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_auth,node_home,node_details,node_slots,node_booking,node_payment,node_ticket toneBlue
class node_admin,node_scanner,node_supabase toneAmber
class node_navigator,node_supabaseclient,node_parkingdata,node_ui,node_theme toneMint
class node_user,node_operator toneIndigo
```

## Components

### Customer booking

- [Landing](https://github.com/hasishinfant/parko_/blob/main/src/screens/LandingScreen.tsx): `src/screens/LandingScreen.tsx`
- [Login and signup](https://github.com/hasishinfant/parko_/tree/main/src/screens/auth): `src/screens/auth`
- [Parking map](https://github.com/hasishinfant/parko_/blob/main/src/screens/HomeScreen.tsx): `src/screens/HomeScreen.tsx`
- [Parking details](https://github.com/hasishinfant/parko_/blob/main/src/screens/ParkingDetailsScreen.tsx): `src/screens/ParkingDetailsScreen.tsx`
- [Slot selection](https://github.com/hasishinfant/parko_/blob/main/src/screens/SlotSelectionScreen.tsx): `src/screens/SlotSelectionScreen.tsx`
- [Booking details](https://github.com/hasishinfant/parko_/blob/main/src/screens/BookingScreen.tsx): `src/screens/BookingScreen.tsx`
- [Payment summary](https://github.com/hasishinfant/parko_/blob/main/src/screens/PaymentScreen.tsx): `src/screens/PaymentScreen.tsx`
- [QR ticket](https://github.com/hasishinfant/parko_/blob/main/src/screens/QRCodeScreen.tsx): `src/screens/QRCodeScreen.tsx`

### Operator tools

- [Admin dashboard](https://github.com/hasishinfant/parko_/blob/main/src/screens/AdminDashboardScreen.tsx): `src/screens/AdminDashboardScreen.tsx`
- [Pass scanner](https://github.com/hasishinfant/parko_/blob/main/src/screens/ScannerScreen.tsx): `src/screens/ScannerScreen.tsx`

### App foundation

- [App navigation](https://github.com/hasishinfant/parko_/blob/main/src/navigation/AppNavigator.tsx): `src/navigation/AppNavigator.tsx`
- [Supabase client](https://github.com/hasishinfant/parko_/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Sample parking data](https://github.com/hasishinfant/parko_/blob/main/src/data/dummyData.ts): `src/data/dummyData.ts`
- [Reusable UI](https://github.com/hasishinfant/parko_/tree/main/src/components): `src/components`
- [Theme tokens](https://github.com/hasishinfant/parko_/tree/main/src/theme): `src/theme`

### Other components

- **Customer**
- **Operator**
- **Supabase service**

## Connections

- Customer → App navigation: opens app (evidence: `README.md`)
- Operator → App navigation: opens app (evidence: `README.md`)
- App navigation → Landing: routes unauthenticated (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Login and signup: routes unauthenticated (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Parking map: routes customer (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Parking details: routes customer (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Slot selection: routes customer (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Booking details: routes customer (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Payment summary: routes customer (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → QR ticket: routes customer (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Admin dashboard: routes admin (evidence: `src/navigation/AppNavigator.tsx`)
- App navigation → Pass scanner: routes admin (evidence: `src/navigation/AppNavigator.tsx`)
- Landing → Login and signup: offers sign in (evidence: `README.md`)
- Login and signup → Supabase client: authenticates (evidence: `src/screens/auth/SignupScreen.tsx`)
- App navigation → Supabase client: checks session (evidence: `src/navigation/AppNavigator.tsx`)
- Supabase client → Supabase service: connects to (evidence: `src/lib/supabase.ts`)
- Parking map → Parking details: opens location (evidence: `README.md`)
- Parking details → Slot selection: continues booking (evidence: `README.md`)
- Slot selection → Booking details: selects spot (evidence: `README.md`)
- Booking details → Payment summary: reviews price (evidence: `README.md`)
- Payment summary → QR ticket: receives pass (evidence: `README.md`)
- Admin dashboard → Pass scanner: opens scanner (evidence: `src/screens/AdminDashboardScreen.tsx`)
- Parking map → Sample parking data: uses sample data (evidence: `src/screens/HomeScreen.tsx`)
- Parking details → Sample parking data: uses sample data (evidence: `src/screens/ParkingDetailsScreen.tsx`)
- Booking details → Sample parking data: uses sample data (evidence: `src/screens/BookingScreen.tsx`)
- Slot selection → Sample parking data: uses sample data (evidence: `src/screens/SlotSelectionScreen.tsx`)
- Reusable UI → Theme tokens: uses tokens (evidence: `src/components/Button.tsx`)
