# lazonev1/lazone architecture

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

- Interactive diagram: https://gitdiagram.com/lazonev1/lazone
- Repository: https://github.com/lazonev1/lazone

## Overview

LaZone is an Expo/React Native services marketplace: customers discover providers, arrange bookings, communicate, and review completed work; providers can register and manage their profiles. The README describes a client stack of screens, presentation/state, Firestore adapters, and backend services, with Firebase as the platform. The graph preserves the major marketplace branches, including referrals and notifications. Several route-to-data connections are documented only at the layer level or their source was not sampled, so those links are dashed and unverified rather than asserted as observed calls.

Main entry points: [`apps/mobile/backend/main/src/config/firebase.ts`](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/config/firebase.ts) (Firebase client), [`apps/mobile/app/provider/registration.tsx`](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/provider/registration.tsx) (Provider registration), [`apps/mobile/backend/main/src/services/reviewService.ts`](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/reviewService.ts) (Review operations), [`apps/mobile/backend/main/src/services/authService.ts`](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/authService.ts) (Account operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Marketplace app"]
  node_auth_screen["Sign in<br/>[login.tsx]"]
  node_discovery["Explore providers<br/>[index.tsx]"]
  node_search["Search results<br/>[search-results.tsx]"]
  node_provider_profile["Provider profile<br/>[&#91;id&#93;.tsx]"]
  node_booking_flow["Booking flow<br/>[new.tsx]"]
  node_booking_detail["Booking detail<br/>[&#91;id&#93;.tsx]"]
  node_booking_review["Submit review<br/>[review.tsx]"]
  node_messages["Conversations<br/>[&#91;id&#93;.tsx]"]
  node_account["Account<br/>[account.tsx]"]
  node_referrals["Referrals"]
  node_notifications["Push notifications"]
end

subgraph group_provider["Provider tools"]
  node_provider_registration["Provider registration<br/>[registration.tsx]"]
  node_service_details["Services and portfolio"]
  node_certifications["Certification upload"]
  node_provider_preview["Profile preview<br/>[preview.tsx]"]
end

subgraph group_data["Client data layer"]
  node_booking_hook["Booking state<br/>[useBookings.ts]"]
  node_chat_hook["Chat state<br/>[useChats.ts]"]
  node_review_hook["Review state<br/>[useReviews.ts]"]
  node_booking_repo["Booking adapter"]
  node_message_repo["Message adapter"]
  node_provider_repo["Provider adapter"]
  node_review_repo["Review adapter"]
  node_auth_context["Authentication state<br/>[auth.tsx]"]
end

subgraph group_backend["Firebase operations"]
  node_firebase["Firebase client<br/>[firebase.ts]"]
  node_auth_service["Account operations<br/>[authService.ts]"]
  node_booking_service["Booking operations<br/>[bookingService.ts]"]
  node_provider_service["Provider operations<br/>[providerService.ts]"]
  node_review_service["Review operations<br/>[reviewService.ts]"]
  node_storage_service["File storage<br/>[storageService.ts]"]
  node_firestore[("Firestore")]
end

subgraph group_shared["Shared UI"]
  node_shared_controls["Shared controls<br/>[Button.tsx]"]
end

node_customer(("Customer"))
node_provider_actor(("Provider"))

node_customer -->|"signs in"| node_auth_screen
node_customer -->|"discovers"| node_discovery
node_discovery -.->|"searches"| node_search
node_search -.->|"opens profile"| node_provider_profile
node_customer -->|"requests service"| node_booking_flow
node_booking_flow -.->|"tracks booking"| node_booking_detail
node_booking_detail -.->|"reviews work"| node_booking_review
node_customer -->|"messages provider"| node_messages
node_customer -->|"manages account"| node_account
node_account -.->|"uses referrals"| node_referrals
node_firebase -->|"configures"| node_auth_service
node_auth_context -->|"uses"| node_auth_service
node_auth_context -->|"initializes"| node_firebase
node_provider_actor -->|"registers"| node_provider_registration
node_provider_registration -.->|"enters services"| node_service_details
node_service_details -->|"renders uploader"| node_certifications
node_provider_registration -.->|"previews profile"| node_provider_preview
node_booking_hook -.->|"adapts data"| node_booking_repo
node_chat_hook -.->|"adapts data"| node_message_repo
node_review_hook -.->|"adapts data"| node_review_repo
node_booking_repo -.->|"uses operations"| node_booking_service
node_provider_repo -.->|"uses operations"| node_provider_service
node_review_repo -.->|"uses operations"| node_review_service
node_review_service -->|"uses client"| node_firebase
node_auth_service -->|"reads and writes"| node_firestore
node_review_service -->|"reads and writes"| node_firestore
node_storage_service -->|"uses storage"| node_firebase
node_notifications -.->|"notifies"| node_customer
node_booking_review -->|"renders button"| node_shared_controls

click node_auth_screen "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/(auth)/login.tsx"
click node_discovery "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/(tabs)/index.tsx"
click node_search "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/explore/search-results.tsx"
click node_provider_profile "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/provider/%5Bid%5D.tsx"
click node_booking_flow "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/booking/new.tsx"
click node_booking_detail "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/booking/%5Bid%5D.tsx"
click node_booking_review "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/booking/review.tsx"
click node_messages "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/messages/%5Bid%5D.tsx"
click node_account "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/(tabs)/account.tsx"
click node_referrals "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/components/account/ReferralComponent.tsx"
click node_notifications "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/services/notifications/pushNotifications.ts"
click node_provider_registration "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/provider/registration.tsx"
click node_service_details "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/components/provider/ServiceDetailsStep.tsx"
click node_certifications "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/components/provider/CertificationUploader.tsx"
click node_provider_preview "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/provider/preview.tsx"
click node_booking_hook "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/hooks/useBookings.ts"
click node_chat_hook "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/hooks/useChats.ts"
click node_review_hook "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/hooks/useReviews.ts"
click node_booking_repo "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/bookingRepository.ts"
click node_message_repo "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/messageRepository.ts"
click node_provider_repo "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/providerRepository.ts"
click node_review_repo "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/reviewRepository.ts"
click node_auth_context "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/contexts/auth.tsx"
click node_firebase "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/config/firebase.ts"
click node_auth_service "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/authService.ts"
click node_booking_service "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/bookingService.ts"
click node_provider_service "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/providerService.ts"
click node_review_service "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/reviewService.ts"
click node_storage_service "https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/storageService.ts"
click node_shared_controls "https://github.com/lazonev1/lazone/blob/develop/packages/ui/src/Button.tsx"

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_auth_screen,node_discovery,node_search,node_provider_profile,node_booking_flow,node_booking_detail,node_booking_review,node_messages,node_account,node_referrals,node_notifications toneBlue
class node_provider_registration,node_service_details,node_certifications,node_provider_preview toneAmber
class node_booking_hook,node_chat_hook,node_review_hook,node_booking_repo,node_message_repo,node_provider_repo,node_review_repo,node_auth_context toneMint
class node_firebase,node_auth_service,node_booking_service,node_provider_service,node_review_service,node_storage_service,node_firestore toneRose
class node_shared_controls,node_customer,node_provider_actor toneIndigo
```

## Components

### Marketplace app

- [Sign in](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/(auth)/login.tsx): `apps/mobile/app/(auth)/login.tsx`
- [Explore providers](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/(tabs)/index.tsx): `apps/mobile/app/(tabs)/index.tsx`
- [Search results](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/explore/search-results.tsx): `apps/mobile/app/explore/search-results.tsx`
- [Provider profile](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/provider/%5Bid%5D.tsx): `apps/mobile/app/provider/[id].tsx`
- [Booking flow](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/booking/new.tsx): `apps/mobile/app/booking/new.tsx`
- [Booking detail](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/booking/%5Bid%5D.tsx): `apps/mobile/app/booking/[id].tsx`
- [Submit review](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/booking/review.tsx): `apps/mobile/app/booking/review.tsx`
- [Conversations](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/messages/%5Bid%5D.tsx): `apps/mobile/app/messages/[id].tsx`
- [Account](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/(tabs)/account.tsx): `apps/mobile/app/(tabs)/account.tsx`
- [Referrals](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/components/account/ReferralComponent.tsx): `apps/mobile/components/account/ReferralComponent.tsx`
- [Push notifications](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/services/notifications/pushNotifications.ts): `apps/mobile/services/notifications/pushNotifications.ts`

### Provider tools

- [Provider registration](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/provider/registration.tsx): `apps/mobile/app/provider/registration.tsx`
- [Services and portfolio](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/components/provider/ServiceDetailsStep.tsx): `apps/mobile/components/provider/ServiceDetailsStep.tsx`
- [Certification upload](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/components/provider/CertificationUploader.tsx): `apps/mobile/components/provider/CertificationUploader.tsx`
- [Profile preview](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/app/provider/preview.tsx): `apps/mobile/app/provider/preview.tsx`

### Client data layer

- [Booking state](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/hooks/useBookings.ts): `apps/mobile/hooks/useBookings.ts`
- [Chat state](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/hooks/useChats.ts): `apps/mobile/hooks/useChats.ts`
- [Review state](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/hooks/useReviews.ts): `apps/mobile/hooks/useReviews.ts`
- [Booking adapter](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/bookingRepository.ts): `apps/mobile/repositories/bookingRepository.ts`
- [Message adapter](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/messageRepository.ts): `apps/mobile/repositories/messageRepository.ts`
- [Provider adapter](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/providerRepository.ts): `apps/mobile/repositories/providerRepository.ts`
- [Review adapter](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/repositories/reviewRepository.ts): `apps/mobile/repositories/reviewRepository.ts`
- [Authentication state](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/contexts/auth.tsx): `apps/mobile/contexts/auth.tsx`

### Firebase operations

- [Firebase client](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/config/firebase.ts): `apps/mobile/backend/main/src/config/firebase.ts`
- [Account operations](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/authService.ts): `apps/mobile/backend/main/src/services/authService.ts`
- [Booking operations](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/bookingService.ts): `apps/mobile/backend/main/src/services/bookingService.ts`
- [Provider operations](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/providerService.ts): `apps/mobile/backend/main/src/services/providerService.ts`
- [Review operations](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/reviewService.ts): `apps/mobile/backend/main/src/services/reviewService.ts`
- [File storage](https://github.com/lazonev1/lazone/blob/develop/apps/mobile/backend/main/src/services/storageService.ts): `apps/mobile/backend/main/src/services/storageService.ts`
- **Firestore**

### Shared UI

- [Shared controls](https://github.com/lazonev1/lazone/blob/develop/packages/ui/src/Button.tsx): `packages/ui/src/Button.tsx`

### Other components

- **Customer**
- **Provider**

## Connections

- Customer → Sign in: signs in
- Customer → Explore providers: discovers
- Explore providers → Search results: searches
- Search results → Provider profile: opens profile
- Customer → Booking flow: requests service
- Booking flow → Booking detail: tracks booking
- Booking detail → Submit review: reviews work
- Customer → Conversations: messages provider
- Customer → Account: manages account
- Account → Referrals: uses referrals
- Firebase client → Account operations: configures (evidence: `apps/mobile/backend/main/src/services/authService.ts`)
- Authentication state → Account operations: uses (evidence: `apps/mobile/contexts/auth.tsx`)
- Authentication state → Firebase client: initializes (evidence: `apps/mobile/contexts/auth.tsx`)
- Provider → Provider registration: registers
- Provider registration → Services and portfolio: enters services
- Services and portfolio → Certification upload: renders uploader (evidence: `apps/mobile/components/provider/ServiceDetailsStep.tsx`)
- Provider registration → Profile preview: previews profile
- Booking state → Booking adapter: adapts data
- Chat state → Message adapter: adapts data
- Review state → Review adapter: adapts data
- Booking adapter → Booking operations: uses operations
- Provider adapter → Provider operations: uses operations
- Review adapter → Review operations: uses operations
- Review operations → Firebase client: uses client (evidence: `apps/mobile/backend/main/src/services/reviewService.ts`)
- Account operations → Firestore: reads and writes (evidence: `apps/mobile/backend/main/src/services/authService.ts`)
- Review operations → Firestore: reads and writes (evidence: `apps/mobile/backend/main/src/services/reviewService.ts`)
- File storage → Firebase client: uses storage (evidence: `apps/mobile/backend/main/src/services/storageService.ts`)
- Push notifications → Customer: notifies
- Submit review → Shared controls: renders button (evidence: `apps/mobile/app/booking/review.tsx`)
