# bibimoni/petcare architecture

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

- Interactive diagram: https://gitdiagram.com/bibimoni/petcare
- Repository: https://github.com/bibimoni/petcare

## Overview

Petcare is a multi-store pet-care operations application: staff manage customers and pets, catalog and inventory, services, and point-of-sale orders, while administrators manage stores, roles, employees, and reporting. The client routes users into role-gated feature pages; the server exposes domain APIs, with controllers delegating to services. The README provides no product details, and most client API implementations and server service internals were not sampled, so client-to-server links are shown as unverified rather than asserted.

Main entry points: [`petcareclient/src/main.tsx`](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/main.tsx) (Route access), [`petcareserver/src/orders/orders.controller.ts`](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/orders/orders.controller.ts) (Orders API), [`petcareserver/src/stores/stores.controller.ts`](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/stores/stores.controller.ts) (Store management), [`petcareclient/src/features/pets/pet-list-page.tsx`](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/pets/pet-list-page.tsx) (Pet profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client application"]
  node_router["Route access<br/>[main.tsx]"]
  node_customer_ui["Customer records<br/>[customer-page.tsx]"]
  node_pets_ui["Pet profiles<br/>[pet-list-page.tsx]"]
  node_inventory_ui["Inventory<br/>[inventory-page.tsx]"]
  node_inventory_alerts["Stock and expiry<br/>[low-stock-page.tsx]"]
  node_service_ui["Service catalog<br/>[service-page.tsx]"]
  node_pos_ui["Point of sale<br/>[pos-page.tsx]"]
  node_orders_ui["Order history<br/>[history-page.tsx]"]
  node_dashboard["Dashboard<br/>[dashboard-page.tsx]"]
  node_finance["Finance reports<br/>[page.tsx]"]
  node_audit_ui["Audit logs<br/>[page.tsx]"]
  node_notifications_ui["Notifications"]
  node_employees_ui["Employee management<br/>[page.tsx]"]
  node_settings_ui["Store settings<br/>[page.tsx]"]
  node_invitations_ui["Invitations"]
end

subgraph group_operations["Store operations"]
  node_orders_api["Orders API"]
  node_orders_service["Order processing<br/>[orders.service.ts]"]
  node_customers_api["Customer API"]
  node_customers_service["Customer operations"]
  node_pets_api["Pet API<br/>[pets.controller.ts]"]
  node_pets_service["Pet operations<br/>[pets.service.ts]"]
  node_products_api["Product API"]
  node_products_service["Product operations"]
  node_services_api["Service API"]
  node_services_service["Service operations"]
end

subgraph group_platform["Platform administration"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_stores_api["Store management"]
  node_stores_service["Store operations<br/>[stores.service.ts]"]
  node_roles_api["Role management"]
  node_roles_service["Role operations<br/>[roles.service.ts]"]
  node_notifications_api["Notifications API"]
  node_notifications_service["Notification operations"]
  node_employees_api["Employee invitations"]
end

node_staff(("Staff user"))

node_staff -->|"opens app"| node_router
node_router -->|"routes to"| node_customer_ui
node_router -->|"routes to"| node_pets_ui
node_router -->|"routes to"| node_inventory_ui
node_router -->|"routes to"| node_inventory_alerts
node_router -->|"routes to"| node_pos_ui
node_router -->|"routes to"| node_orders_ui
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_audit_ui
node_router -->|"routes to"| node_settings_ui
node_router -->|"role gates"| node_pets_ui
node_router -->|"role gates"| node_inventory_alerts
node_orders_api -->|"delegates to"| node_orders_service
node_customers_api -->|"delegates to"| node_customers_service
node_pets_api -->|"delegates to"| node_pets_service
node_products_api -->|"delegates to"| node_products_service
node_services_api -->|"delegates to"| node_services_service
node_stores_api -->|"delegates to"| node_stores_service
node_roles_api -->|"delegates to"| node_roles_service
node_notifications_api -->|"delegates to"| node_notifications_service
node_employees_ui -.->|"requests staff"| node_employees_api
node_customer_ui -.->|"requests records"| node_customers_api
node_pets_ui -.->|"requests profiles"| node_pets_api
node_inventory_ui -.->|"requests products"| node_products_api
node_inventory_alerts -.->|"requests alerts"| node_products_api
node_service_ui -.->|"requests services"| node_services_api
node_pos_ui -.->|"creates orders"| node_orders_api
node_orders_ui -.->|"requests history"| node_orders_api
node_notifications_ui -.->|"requests notices"| node_notifications_api
node_settings_ui -.->|"updates settings"| node_stores_api
node_invitations_ui -.->|"accepts invite"| node_stores_api
node_finance -.->|"requests figures"| node_orders_api
node_dashboard -.->|"requests metrics"| node_orders_api
node_audit_ui -.->|"requests logs"| node_stores_api

click node_router "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/main.tsx"
click node_customer_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/customer/customer-page.tsx"
click node_pets_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/pets/pet-list-page.tsx"
click node_inventory_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/inventory/inventory-page.tsx"
click node_inventory_alerts "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/inventory/low-stock-page.tsx"
click node_service_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/service/components/service-page.tsx"
click node_pos_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/pos/pos-page.tsx"
click node_orders_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/pos/history-page.tsx"
click node_dashboard "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/dashboard/dashboard-page.tsx"
click node_finance "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/finance/page.tsx"
click node_audit_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/audit-logs/page.tsx"
click node_notifications_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/notifications/notifications-page.tsx"
click node_employees_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/employees/page.tsx"
click node_settings_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/settings/page.tsx"
click node_invitations_ui "https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/invitation/invitation-page.tsx"
click node_orders_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/orders/orders.controller.ts"
click node_orders_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/orders/orders.service.ts"
click node_customers_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/customers/customers.controller.ts"
click node_customers_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/customers/customers.service.ts"
click node_pets_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/pets/pets.controller.ts"
click node_pets_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/pets/pets.service.ts"
click node_products_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/products/products.controller.ts"
click node_products_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/products/products.service.ts"
click node_services_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/services/services.controller.ts"
click node_services_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/services/services.service.ts"
click node_auth "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/auth/auth.service.ts"
click node_stores_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/stores/stores.controller.ts"
click node_stores_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/stores/stores.service.ts"
click node_roles_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/roles/roles.controller.ts"
click node_roles_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/roles/roles.service.ts"
click node_notifications_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/notifications/notifications.controller.ts"
click node_notifications_service "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/notifications/notifications.service.ts"
click node_employees_api "https://github.com/bibimoni/petcare/blob/main/petcareserver/src/stores/stores.controller.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_router,node_customer_ui,node_pets_ui,node_inventory_ui,node_inventory_alerts,node_service_ui,node_pos_ui,node_orders_ui,node_dashboard,node_finance,node_audit_ui,node_notifications_ui,node_employees_ui,node_settings_ui,node_invitations_ui,node_staff toneBlue
class node_orders_api,node_orders_service,node_customers_api,node_customers_service,node_pets_api,node_pets_service,node_products_api,node_products_service,node_services_api,node_services_service toneAmber
class node_auth,node_stores_api,node_stores_service,node_roles_api,node_roles_service,node_notifications_api,node_notifications_service,node_employees_api toneMint
```

## Components

### Client application

- [Route access](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/main.tsx): `petcareclient/src/main.tsx`
- [Customer records](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/customer/customer-page.tsx): `petcareclient/src/features/customer/customer-page.tsx`
- [Pet profiles](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/pets/pet-list-page.tsx): `petcareclient/src/features/pets/pet-list-page.tsx`
- [Inventory](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/inventory/inventory-page.tsx): `petcareclient/src/features/inventory/inventory-page.tsx`
- [Stock and expiry](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/inventory/low-stock-page.tsx): `petcareclient/src/features/inventory/low-stock-page.tsx`
- [Service catalog](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/service/components/service-page.tsx): `petcareclient/src/features/service/components/service-page.tsx`
- [Point of sale](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/pos/pos-page.tsx): `petcareclient/src/features/pos/pos-page.tsx`
- [Order history](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/pos/history-page.tsx): `petcareclient/src/features/pos/history-page.tsx`
- [Dashboard](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/dashboard/dashboard-page.tsx): `petcareclient/src/features/dashboard/dashboard-page.tsx`
- [Finance reports](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/finance/page.tsx): `petcareclient/src/features/finance/page.tsx`
- [Audit logs](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/audit-logs/page.tsx): `petcareclient/src/features/audit-logs/page.tsx`
- [Notifications](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/notifications/notifications-page.tsx): `petcareclient/src/features/notifications/notifications-page.tsx`
- [Employee management](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/employees/page.tsx): `petcareclient/src/features/employees/page.tsx`
- [Store settings](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/settings/page.tsx): `petcareclient/src/features/settings/page.tsx`
- [Invitations](https://github.com/bibimoni/petcare/blob/main/petcareclient/src/features/invitation/invitation-page.tsx): `petcareclient/src/features/invitation/invitation-page.tsx`

### Store operations

- [Orders API](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/orders/orders.controller.ts): `petcareserver/src/orders/orders.controller.ts`
- [Order processing](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/orders/orders.service.ts): `petcareserver/src/orders/orders.service.ts`
- [Customer API](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/customers/customers.controller.ts): `petcareserver/src/customers/customers.controller.ts`
- [Customer operations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/customers/customers.service.ts): `petcareserver/src/customers/customers.service.ts`
- [Pet API](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/pets/pets.controller.ts): `petcareserver/src/pets/pets.controller.ts`
- [Pet operations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/pets/pets.service.ts): `petcareserver/src/pets/pets.service.ts`
- [Product API](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/products/products.controller.ts): `petcareserver/src/categories/products/products.controller.ts`
- [Product operations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/products/products.service.ts): `petcareserver/src/categories/products/products.service.ts`
- [Service API](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/services/services.controller.ts): `petcareserver/src/categories/services/services.controller.ts`
- [Service operations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/categories/services/services.service.ts): `petcareserver/src/categories/services/services.service.ts`

### Platform administration

- [Authentication](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/auth/auth.service.ts): `petcareserver/src/auth/auth.service.ts`
- [Store management](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/stores/stores.controller.ts): `petcareserver/src/stores/stores.controller.ts`
- [Store operations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/stores/stores.service.ts): `petcareserver/src/stores/stores.service.ts`
- [Role management](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/roles/roles.controller.ts): `petcareserver/src/roles/roles.controller.ts`
- [Role operations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/roles/roles.service.ts): `petcareserver/src/roles/roles.service.ts`
- [Notifications API](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/notifications/notifications.controller.ts): `petcareserver/src/notifications/notifications.controller.ts`
- [Notification operations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/notifications/notifications.service.ts): `petcareserver/src/notifications/notifications.service.ts`
- [Employee invitations](https://github.com/bibimoni/petcare/blob/main/petcareserver/src/stores/stores.controller.ts): `petcareserver/src/stores/stores.controller.ts`

### Other components

- **Staff user**

## Connections

- Staff user → Route access: opens app (evidence: `petcareclient/src/main.tsx`)
- Route access → Customer records: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Pet profiles: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Inventory: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Stock and expiry: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Point of sale: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Order history: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Dashboard: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Audit logs: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Store settings: routes to (evidence: `petcareclient/src/main.tsx`)
- Route access → Pet profiles: role gates (evidence: `petcareclient/src/main.tsx`)
- Route access → Stock and expiry: role gates (evidence: `petcareclient/src/main.tsx`)
- Orders API → Order processing: delegates to (evidence: `petcareserver/src/orders/orders.controller.ts`)
- Customer API → Customer operations: delegates to (evidence: `petcareserver/src/customers/customers.controller.ts`)
- Pet API → Pet operations: delegates to (evidence: `petcareserver/src/pets/pets.controller.ts`)
- Product API → Product operations: delegates to (evidence: `petcareserver/src/categories/products/products.controller.ts`)
- Service API → Service operations: delegates to (evidence: `petcareserver/src/categories/services/services.controller.ts`)
- Store management → Store operations: delegates to (evidence: `petcareserver/src/stores/stores.controller.ts`)
- Role management → Role operations: delegates to (evidence: `petcareserver/src/roles/roles.controller.ts`)
- Notifications API → Notification operations: delegates to (evidence: `petcareserver/src/notifications/notifications.controller.ts`)
- Employee management → Employee invitations: requests staff
- Customer records → Customer API: requests records
- Pet profiles → Pet API: requests profiles
- Inventory → Product API: requests products
- Stock and expiry → Product API: requests alerts
- Service catalog → Service API: requests services
- Point of sale → Orders API: creates orders
- Order history → Orders API: requests history
- Notifications → Notifications API: requests notices
- Store settings → Store management: updates settings
- Invitations → Store management: accepts invite
- Finance reports → Orders API: requests figures
- Dashboard → Orders API: requests metrics
- Audit logs → Store management: requests logs
