# yuujikon/admin-app architecture

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

- Interactive diagram: https://gitdiagram.com/yuujikon/admin-app
- Repository: https://github.com/yuujikon/admin-app

## Overview

GDC Sari-Sari Store is a Flutter admin and point-of-sale application. Staff authenticate through Firebase and use the management screens for checkout, inventory, orders, reporting, and store operations; Firestore provides real-time data, while order and refund events can produce customer or admin push notifications. The README establishes the main app capabilities and Firebase roles, and the sampled function source shows its event triggers and messaging behavior; Flutter implementation details were not sampled, so those links are documented only where supported.

Main entry points: [`lib/screens/admin_app.dart`](https://github.com/yuujikon/admin-app/blob/master/lib/screens/admin_app.dart) (Admin App), [`lib/providers`](https://github.com/yuujikon/admin-app/tree/master/lib/providers) (State Providers), [`lib/screens/staff_login_screen.dart`](https://github.com/yuujikon/admin-app/blob/master/lib/screens/staff_login_screen.dart) (PIN And Login), [`lib/screens/pos_screen.dart`](https://github.com/yuujikon/admin-app/blob/master/lib/screens/pos_screen.dart) (POS Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Admin App"]
  node_app["Admin App<br/>[admin_app.dart]"]
  node_auth["PIN And Login"]
  node_providers["State Providers"]
end

subgraph group_domain["Store Operations"]
  node_pos["POS Checkout<br/>[pos_screen.dart]"]
  node_inventory["Inventory Management"]
  node_orders["Order Management<br/>[orders_screen.dart]"]
  node_dashboard["Sales Dashboard"]
  node_storehours["Store Status<br/>[store_hours.dart]"]
  node_models["Store Data Models"]
end

subgraph group_backend["Firebase Backend"]
  node_authsvc["Authentication Service<br/>[auth_service.dart]"]
  node_firestore_service["Firestore Service"]
  node_firestore[("Cloud Firestore")]
  node_firebase_auth["Firebase Authentication"]
end

subgraph group_events["Notifications"]
  node_functions["Order And Refund Triggers<br/>[index.js]"]
  node_messaging["Firebase Messaging"]
end

node_staff(("Store Staff"))
node_customers(("Customers"))

node_staff -->|"signs in"| node_auth
node_auth -.->|"authenticates through"| node_authsvc
node_authsvc -->|"uses"| node_firebase_auth
node_staff -->|"manages store"| node_app
node_app -->|"offers checkout"| node_pos
node_app -->|"offers management"| node_inventory
node_app -->|"tracks orders"| node_orders
node_app -->|"shows insights"| node_dashboard
node_app -->|"sets store status"| node_storehours
node_pos -.->|"uses state"| node_providers
node_inventory -.->|"uses state"| node_providers
node_orders -.->|"uses state"| node_providers
node_providers -.->|"accesses data"| node_firestore_service
node_firestore_service -->|"reads and writes"| node_firestore
node_firestore -.->|"stores records"| node_models
node_firestore -->|"triggers on changes"| node_functions
node_functions -->|"sends notifications"| node_messaging
node_messaging -->|"notifies order status"| node_customers
node_messaging -->|"notifies refund requests"| node_staff
node_storehours -->|"closure notices"| node_customers

click node_app "https://github.com/yuujikon/admin-app/blob/master/lib/screens/admin_app.dart"
click node_auth "https://github.com/yuujikon/admin-app/blob/master/lib/screens/staff_login_screen.dart"
click node_authsvc "https://github.com/yuujikon/admin-app/blob/master/lib/services/auth_service.dart"
click node_pos "https://github.com/yuujikon/admin-app/blob/master/lib/screens/pos_screen.dart"
click node_inventory "https://github.com/yuujikon/admin-app/blob/master/lib/screens/inventory_screen.dart"
click node_orders "https://github.com/yuujikon/admin-app/blob/master/lib/screens/orders_screen.dart"
click node_dashboard "https://github.com/yuujikon/admin-app/blob/master/lib/screens/dashboard_screen.dart"
click node_storehours "https://github.com/yuujikon/admin-app/blob/master/lib/utils/store_hours.dart"
click node_providers "https://github.com/yuujikon/admin-app/tree/master/lib/providers"
click node_models "https://github.com/yuujikon/admin-app/tree/master/lib/models"
click node_firestore_service "https://github.com/yuujikon/admin-app/blob/master/lib/services/firestore_service.dart"
click node_functions "https://github.com/yuujikon/admin-app/blob/master/functions/index.js"

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_app,node_auth,node_providers toneBlue
class node_pos,node_inventory,node_orders,node_dashboard,node_storehours,node_models toneAmber
class node_authsvc,node_firestore_service,node_firestore,node_firebase_auth toneMint
class node_functions,node_messaging toneRose
class node_staff,node_customers toneIndigo
```

## Components

### Admin App

- [Admin App](https://github.com/yuujikon/admin-app/blob/master/lib/screens/admin_app.dart): `lib/screens/admin_app.dart`
- [PIN And Login](https://github.com/yuujikon/admin-app/blob/master/lib/screens/staff_login_screen.dart): `lib/screens/staff_login_screen.dart`
- [State Providers](https://github.com/yuujikon/admin-app/tree/master/lib/providers): `lib/providers`

### Store Operations

- [POS Checkout](https://github.com/yuujikon/admin-app/blob/master/lib/screens/pos_screen.dart): `lib/screens/pos_screen.dart`
- [Inventory Management](https://github.com/yuujikon/admin-app/blob/master/lib/screens/inventory_screen.dart): `lib/screens/inventory_screen.dart`
- [Order Management](https://github.com/yuujikon/admin-app/blob/master/lib/screens/orders_screen.dart): `lib/screens/orders_screen.dart`
- [Sales Dashboard](https://github.com/yuujikon/admin-app/blob/master/lib/screens/dashboard_screen.dart): `lib/screens/dashboard_screen.dart`
- [Store Status](https://github.com/yuujikon/admin-app/blob/master/lib/utils/store_hours.dart): `lib/utils/store_hours.dart`
- [Store Data Models](https://github.com/yuujikon/admin-app/tree/master/lib/models): `lib/models`

### Firebase Backend

- [Authentication Service](https://github.com/yuujikon/admin-app/blob/master/lib/services/auth_service.dart): `lib/services/auth_service.dart`
- [Firestore Service](https://github.com/yuujikon/admin-app/blob/master/lib/services/firestore_service.dart): `lib/services/firestore_service.dart`
- **Cloud Firestore**
- **Firebase Authentication**

### Notifications

- [Order And Refund Triggers](https://github.com/yuujikon/admin-app/blob/master/functions/index.js): `functions/index.js`
- **Firebase Messaging**

### Other components

- **Store Staff**
- **Customers**

## Connections

- Store Staff → PIN And Login: signs in (evidence: `README.md`)
- PIN And Login → Authentication Service: authenticates through
- Authentication Service → Firebase Authentication: uses (evidence: `README.md`)
- Store Staff → Admin App: manages store (evidence: `README.md`)
- Admin App → POS Checkout: offers checkout (evidence: `README.md`)
- Admin App → Inventory Management: offers management (evidence: `README.md`)
- Admin App → Order Management: tracks orders (evidence: `README.md`)
- Admin App → Sales Dashboard: shows insights (evidence: `README.md`)
- Admin App → Store Status: sets store status (evidence: `README.md`)
- POS Checkout → State Providers: uses state
- Inventory Management → State Providers: uses state
- Order Management → State Providers: uses state
- State Providers → Firestore Service: accesses data
- Firestore Service → Cloud Firestore: reads and writes (evidence: `README.md`)
- Cloud Firestore → Store Data Models: stores records
- Cloud Firestore → Order And Refund Triggers: triggers on changes (evidence: `functions/index.js`)
- Order And Refund Triggers → Firebase Messaging: sends notifications (evidence: `functions/index.js`)
- Firebase Messaging → Customers: notifies order status
- Firebase Messaging → Store Staff: notifies refund requests
- Store Status → Customers: closure notices (evidence: `README.md`)
