# mi-514/cyns architecture

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

## Overview

The tree suggests a Flutter service-marketplace app: customers find workers and request services; workers manage jobs; both roles have shared communication, location, and account features. The README is only the Flutter starter template, and no Dart implementation was excerpted, so product capabilities and component links are inferred from filenames and directories rather than verified source behavior. Dashed, unevidenced links mark those architectural inferences; platform runner and generated-plugin files are omitted as hosting infrastructure.

Main entry points: [`lib/screens/customer`](https://github.com/mi-514/cyns/tree/main/lib/screens/customer) (Customer Screens), [`lib/data/repositories/chat_repository.dart`](https://github.com/mi-514/cyns/blob/main/lib/data/repositories/chat_repository.dart) (Chat), [`lib/screens/worker`](https://github.com/mi-514/cyns/tree/main/lib/screens/worker) (Worker Screens), [`lib/data/repositories/service_request_repository.dart`](https://github.com/mi-514/cyns/blob/main/lib/data/repositories/service_request_repository.dart) (Service Requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Accounts &amp; Discovery"]
  node_auth_ui["Sign-in &amp; Registration"]
  node_customer_views["Customer Screens"]
  node_categories["Service Categories"]
  node_worker_profiles["Worker Profiles"]
  node_account_data["User &amp; Profile Data"]
end

subgraph group_jobs["Service Jobs"]
  node_worker_views["Worker Screens"]
  node_requests["Service Requests"]
  node_request_state["Request State"]
  node_reviews["Ratings &amp; Reports<br/>[review_model.dart]"]
end

subgraph group_shared["Communication &amp; Location"]
  node_chat["Chat"]
  node_call_signaling["Call Signaling"]
  node_voice_calls["Voice Calls<br/>[agora_service.dart]"]
  node_maps["Map &amp; Directions"]
  node_location["Location Tracking"]
  node_notifications["Notifications"]
end

subgraph group_foundation["App Foundation"]
  node_app_entry["Flutter App Entry<br/>[main.dart]"]
  node_providers["App Providers"]
end

node_customer(("Customer"))
node_worker(("Worker"))
node_firebase[("Firebase Services")]
node_agora["Agora Service"]

node_customer -.->|"signs in"| node_auth_ui
node_worker -.->|"registers"| node_auth_ui
node_customer -.->|"browses"| node_customer_views
node_customer_views -.->|"finds services"| node_categories
node_customer_views -.->|"views workers"| node_worker_profiles
node_customer_views -.->|"requests service"| node_requests
node_worker -.->|"manages jobs"| node_worker_views
node_worker_views -.->|"updates jobs"| node_requests
node_customer_views -.->|"tracks requests"| node_request_state
node_customer_views -.->|"reviews service"| node_reviews
node_customer -.->|"messages worker"| node_chat
node_worker -.->|"messages customer"| node_chat
node_chat -.->|"starts calls"| node_call_signaling
node_call_signaling -.->|"signals calls"| node_voice_calls
node_voice_calls -.->|"uses calling"| node_agora
node_customer_views -.->|"views routes"| node_maps
node_worker_views -.->|"shares location"| node_location
node_customer_views -.->|"tracks worker"| node_location
node_customer_views -.->|"views alerts"| node_notifications
node_app_entry -.->|"sets up"| node_providers
node_providers -.->|"uses backend"| node_firebase
node_categories -.->|"stores data"| node_firebase
node_worker_profiles -.->|"stores data"| node_firebase
node_requests -.->|"stores requests"| node_firebase
node_chat -.->|"stores messages"| node_firebase

click node_auth_ui "https://github.com/mi-514/cyns/tree/main/lib/screens/auth"
click node_customer_views "https://github.com/mi-514/cyns/tree/main/lib/screens/customer"
click node_categories "https://github.com/mi-514/cyns/blob/main/lib/data/repositories/category_repository.dart"
click node_worker_profiles "https://github.com/mi-514/cyns/blob/main/lib/data/repositories/worker_repository.dart"
click node_account_data "https://github.com/mi-514/cyns/tree/main/lib/data/models"
click node_worker_views "https://github.com/mi-514/cyns/tree/main/lib/screens/worker"
click node_requests "https://github.com/mi-514/cyns/blob/main/lib/data/repositories/service_request_repository.dart"
click node_request_state "https://github.com/mi-514/cyns/blob/main/lib/providers/service_request_provider.dart"
click node_reviews "https://github.com/mi-514/cyns/blob/main/lib/data/models/review_model.dart"
click node_chat "https://github.com/mi-514/cyns/blob/main/lib/data/repositories/chat_repository.dart"
click node_call_signaling "https://github.com/mi-514/cyns/blob/main/lib/core/services/call_signaling_service.dart"
click node_voice_calls "https://github.com/mi-514/cyns/blob/main/lib/core/services/agora_service.dart"
click node_maps "https://github.com/mi-514/cyns/blob/main/lib/core/services/directions_service.dart"
click node_location "https://github.com/mi-514/cyns/blob/main/lib/core/services/location_service.dart"
click node_notifications "https://github.com/mi-514/cyns/blob/main/lib/core/services/notification_service.dart"
click node_app_entry "https://github.com/mi-514/cyns/blob/main/lib/main.dart"
click node_providers "https://github.com/mi-514/cyns/tree/main/lib/providers"

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_ui,node_customer_views,node_categories,node_worker_profiles,node_account_data toneBlue
class node_worker_views,node_requests,node_request_state,node_reviews,node_firebase toneAmber
class node_chat,node_call_signaling,node_voice_calls,node_maps,node_location,node_notifications toneMint
class node_app_entry,node_providers,node_worker toneRose
class node_customer,node_agora toneIndigo
```

## Components

### Accounts & Discovery

- [Sign-in & Registration](https://github.com/mi-514/cyns/tree/main/lib/screens/auth): `lib/screens/auth`
- [Customer Screens](https://github.com/mi-514/cyns/tree/main/lib/screens/customer): `lib/screens/customer`
- [Service Categories](https://github.com/mi-514/cyns/blob/main/lib/data/repositories/category_repository.dart): `lib/data/repositories/category_repository.dart`
- [Worker Profiles](https://github.com/mi-514/cyns/blob/main/lib/data/repositories/worker_repository.dart): `lib/data/repositories/worker_repository.dart`
- [User & Profile Data](https://github.com/mi-514/cyns/tree/main/lib/data/models): `lib/data/models`

### Service Jobs

- [Worker Screens](https://github.com/mi-514/cyns/tree/main/lib/screens/worker): `lib/screens/worker`
- [Service Requests](https://github.com/mi-514/cyns/blob/main/lib/data/repositories/service_request_repository.dart): `lib/data/repositories/service_request_repository.dart`
- [Request State](https://github.com/mi-514/cyns/blob/main/lib/providers/service_request_provider.dart): `lib/providers/service_request_provider.dart`
- [Ratings & Reports](https://github.com/mi-514/cyns/blob/main/lib/data/models/review_model.dart): `lib/data/models/review_model.dart`

### Communication & Location

- [Chat](https://github.com/mi-514/cyns/blob/main/lib/data/repositories/chat_repository.dart): `lib/data/repositories/chat_repository.dart`
- [Call Signaling](https://github.com/mi-514/cyns/blob/main/lib/core/services/call_signaling_service.dart): `lib/core/services/call_signaling_service.dart`
- [Voice Calls](https://github.com/mi-514/cyns/blob/main/lib/core/services/agora_service.dart): `lib/core/services/agora_service.dart`
- [Map & Directions](https://github.com/mi-514/cyns/blob/main/lib/core/services/directions_service.dart): `lib/core/services/directions_service.dart`
- [Location Tracking](https://github.com/mi-514/cyns/blob/main/lib/core/services/location_service.dart): `lib/core/services/location_service.dart`
- [Notifications](https://github.com/mi-514/cyns/blob/main/lib/core/services/notification_service.dart): `lib/core/services/notification_service.dart`

### App Foundation

- [Flutter App Entry](https://github.com/mi-514/cyns/blob/main/lib/main.dart): `lib/main.dart`
- [App Providers](https://github.com/mi-514/cyns/tree/main/lib/providers): `lib/providers`

### Other components

- **Customer**
- **Worker**
- **Firebase Services**
- **Agora Service**

## Connections

- Customer → Sign-in & Registration: signs in
- Worker → Sign-in & Registration: registers
- Customer → Customer Screens: browses
- Customer Screens → Service Categories: finds services
- Customer Screens → Worker Profiles: views workers
- Customer Screens → Service Requests: requests service
- Worker → Worker Screens: manages jobs
- Worker Screens → Service Requests: updates jobs
- Customer Screens → Request State: tracks requests
- Customer Screens → Ratings & Reports: reviews service
- Customer → Chat: messages worker
- Worker → Chat: messages customer
- Chat → Call Signaling: starts calls
- Call Signaling → Voice Calls: signals calls
- Voice Calls → Agora Service: uses calling
- Customer Screens → Map & Directions: views routes
- Worker Screens → Location Tracking: shares location
- Customer Screens → Location Tracking: tracks worker
- Customer Screens → Notifications: views alerts
- Flutter App Entry → App Providers: sets up
- App Providers → Firebase Services: uses backend
- Service Categories → Firebase Services: stores data
- Worker Profiles → Firebase Services: stores data
- Service Requests → Firebase Services: stores requests
- Chat → Firebase Services: stores messages
