# rmorampudi09-arch/craves-build-platform architecture

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

- Interactive diagram: https://gitdiagram.com/rmorampudi09-arch/craves-build-platform
- Repository: https://github.com/rmorampudi09-arch/craves-build-platform

## Overview

Craves is a multi-sided food ordering and meal-subscription platform, with customer, chef, and administrative experiences backed by independently deployable Java services. A principal customer journey is discovery, cart, checkout/payment, order status and delivery tracking; subscriptions add plan selection and ongoing lifecycle management. The tree and README establish these product areas, while the excerpts show selected service internals. Most frontend-to-backend and inter-service wiring is not sampled, so those links are shown as unverified rather than asserted as direct calls.

Main entry points: [`apps/customer-web-next/src/app`](https://github.com/rmorampudi09-arch/craves-build-platform/tree/main/apps/customer-web-next/src/app) (Customer Web), [`apps/customer-web-next/src/app/api`](https://github.com/rmorampudi09-arch/craves-build-platform/tree/main/apps/customer-web-next/src/app/api) (Web API Routes), [`services/auth-service/src/main/java/in/craves/auth/service/AuthService.java`](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/auth-service/src/main/java/in/craves/auth/service/AuthService.java) (Authentication), [`services/order-service/src/main/java/in/craves/order/delivery/DeliveryStatusQueryService.java`](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/order-service/src/main/java/in/craves/order/delivery/DeliveryStatusQueryService.java) (Delivery Status)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Commerce"]
  node_customer_web["Customer Web"]
  node_discovery["Food Discovery<br/>[page.tsx]"]
  node_cart_checkout["Cart And Checkout<br/>[page.tsx]"]
  node_customer_orders["Orders And Tracking<br/>[page.tsx]"]
  node_subscriptions_ui["Meal Plans<br/>[page.tsx]"]
  node_web_api["Web API Routes"]
end

subgraph group_operations["Chef And Admin"]
  node_chef_portal["Chef Portal<br/>[page.tsx]"]
  node_admin_portal["Admin Console<br/>[page.tsx]"]
  node_chef_onboarding["Chef Onboarding"]
  node_document_review["Document Review"]
  node_document_storage[("Private Documents")]
end

subgraph group_services["Domain Services"]
  node_catalog_service["Catalog And Media"]
  node_order_service["Orders And Reviews<br/>[OrderService.java]"]
  node_delivery_status["Delivery Status"]
  node_subscription_service["Subscriptions"]
  node_capacity["Capacity Rules"]
end

subgraph group_integrations["Payments And Delivery"]
  node_integration_service["Payments And Payouts"]
  node_delivery_orchestration["Delivery Dispatch"]
  node_apim{{"Azure API Management"}}
  node_firebase{{"Firebase Authentication"}}
  node_azure_blob[("Azure Blob Storage")]
end

subgraph group_shared["Identity And Messaging"]
  node_auth_service["Authentication<br/>[AuthService.java]"]
  node_identity_state[("Identity And Sessions<br/>[AuthIdentity.java]")]
  node_notifications["Notifications"]
end

node_customer_actor(("Customer"))

node_customer_actor -.->|"uses"| node_customer_web
node_customer_web -.->|"browses"| node_discovery
node_customer_web -.->|"orders through"| node_cart_checkout
node_customer_web -.->|"selects plans"| node_subscriptions_ui
node_customer_web -.->|"tracks orders"| node_customer_orders
node_customer_web -.->|"requests data"| node_web_api
node_web_api -.->|"routes via"| node_apim
node_apim -->|"exposes services"| node_auth_service
node_apim -->|"exposes services"| node_catalog_service
node_apim -->|"exposes services"| node_order_service
node_apim -->|"exposes services"| node_subscription_service
node_apim -->|"exposes services"| node_integration_service
node_apim -->|"exposes services"| node_notifications
node_auth_service -->|"verifies tokens"| node_firebase
node_auth_service -->|"reads and updates"| node_identity_state
node_customer_orders -.->|"requests status"| node_web_api
node_delivery_status -->|"queries order records"| node_order_service
node_delivery_status -.->|"returns tracking"| node_customer_orders
node_chef_portal -.->|"manages operations"| node_web_api
node_admin_portal -.->|"manages operations"| node_web_api
node_chef_onboarding -.->|"supports review"| node_document_review
node_document_review -->|"reads documents"| node_document_storage
node_document_storage -->|"stores files"| node_azure_blob
node_subscription_service -.->|"checks capacity"| node_capacity
node_integration_service -.->|"coordinates delivery"| node_delivery_orchestration
node_order_service -.->|"serves status queries"| node_delivery_status
node_notifications -.->|"delivers notices"| node_customer_web

click node_customer_web "https://github.com/rmorampudi09-arch/craves-build-platform/tree/main/apps/customer-web-next/src/app"
click node_discovery "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/discover/page.tsx"
click node_cart_checkout "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/checkout/page.tsx"
click node_customer_orders "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/orders/%5BorderId%5D/tracking/page.tsx"
click node_subscriptions_ui "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/subscriptions/plans/page.tsx"
click node_chef_portal "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/chef/page.tsx"
click node_admin_portal "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/admin/page.tsx"
click node_web_api "https://github.com/rmorampudi09-arch/craves-build-platform/tree/main/apps/customer-web-next/src/app/api"
click node_auth_service "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/auth-service/src/main/java/in/craves/auth/service/AuthService.java"
click node_identity_state "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/auth-service/src/main/java/in/craves/auth/domain/AuthIdentity.java"
click node_catalog_service "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/catalog-service/src/main/java/in/craves/catalog/service/CatalogService.java"
click node_order_service "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/order-service/src/main/java/in/craves/order/service/OrderService.java"
click node_delivery_status "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/order-service/src/main/java/in/craves/order/delivery/DeliveryStatusQueryService.java"
click node_subscription_service "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/subscription-service/src/main/java/in/craves/subscription/service/SubscriptionService.java"
click node_capacity "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/subscription-service/src/main/java/in/craves/subscription/capacity/CapacityService.java"
click node_chef_onboarding "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/user-chef-service/src/main/java/in/craves/userchef/onboarding/ChefOnboardingService.java"
click node_document_review "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/user-chef-service/src/main/java/in/craves/userchef/service/ChefDocumentReviewService.java"
click node_document_storage "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/user-chef-service/src/main/java/in/craves/userchef/service/BlobDocumentStorageService.java"
click node_integration_service "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/integration-service/src/main/java/in/craves/integration/service/PaymentService.java"
click node_delivery_orchestration "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/integration-service/src/main/java/in/craves/integration/web/DeliveryOrchestrationInternalController.java"
click node_notifications "https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/notification-service/src/main/java/in/craves/notification/service/NotificationService.java"

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_customer_web,node_discovery,node_cart_checkout,node_customer_orders,node_subscriptions_ui,node_web_api toneBlue
class node_chef_portal,node_admin_portal,node_chef_onboarding,node_document_review,node_document_storage toneAmber
class node_catalog_service,node_order_service,node_delivery_status,node_subscription_service,node_capacity toneMint
class node_integration_service,node_delivery_orchestration,node_apim,node_firebase,node_azure_blob toneRose
class node_auth_service,node_identity_state,node_notifications,node_customer_actor toneIndigo
```

## Components

### Customer Commerce

- [Customer Web](https://github.com/rmorampudi09-arch/craves-build-platform/tree/main/apps/customer-web-next/src/app): `apps/customer-web-next/src/app`
- [Food Discovery](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/discover/page.tsx): `apps/customer-web-next/src/app/discover/page.tsx`
- [Cart And Checkout](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/checkout/page.tsx): `apps/customer-web-next/src/app/checkout/page.tsx`
- [Orders And Tracking](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/orders/%5BorderId%5D/tracking/page.tsx): `apps/customer-web-next/src/app/orders/[orderId]/tracking/page.tsx`
- [Meal Plans](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/subscriptions/plans/page.tsx): `apps/customer-web-next/src/app/subscriptions/plans/page.tsx`
- [Web API Routes](https://github.com/rmorampudi09-arch/craves-build-platform/tree/main/apps/customer-web-next/src/app/api): `apps/customer-web-next/src/app/api`

### Chef And Admin

- [Chef Portal](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/chef/page.tsx): `apps/customer-web-next/src/app/chef/page.tsx`
- [Admin Console](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/apps/customer-web-next/src/app/admin/page.tsx): `apps/customer-web-next/src/app/admin/page.tsx`
- [Chef Onboarding](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/user-chef-service/src/main/java/in/craves/userchef/onboarding/ChefOnboardingService.java): `services/user-chef-service/src/main/java/in/craves/userchef/onboarding/ChefOnboardingService.java`
- [Document Review](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/user-chef-service/src/main/java/in/craves/userchef/service/ChefDocumentReviewService.java): `services/user-chef-service/src/main/java/in/craves/userchef/service/ChefDocumentReviewService.java`
- [Private Documents](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/user-chef-service/src/main/java/in/craves/userchef/service/BlobDocumentStorageService.java): `services/user-chef-service/src/main/java/in/craves/userchef/service/BlobDocumentStorageService.java`

### Domain Services

- [Catalog And Media](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/catalog-service/src/main/java/in/craves/catalog/service/CatalogService.java): `services/catalog-service/src/main/java/in/craves/catalog/service/CatalogService.java`
- [Orders And Reviews](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/order-service/src/main/java/in/craves/order/service/OrderService.java): `services/order-service/src/main/java/in/craves/order/service/OrderService.java`
- [Delivery Status](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/order-service/src/main/java/in/craves/order/delivery/DeliveryStatusQueryService.java): `services/order-service/src/main/java/in/craves/order/delivery/DeliveryStatusQueryService.java`
- [Subscriptions](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/subscription-service/src/main/java/in/craves/subscription/service/SubscriptionService.java): `services/subscription-service/src/main/java/in/craves/subscription/service/SubscriptionService.java`
- [Capacity Rules](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/subscription-service/src/main/java/in/craves/subscription/capacity/CapacityService.java): `services/subscription-service/src/main/java/in/craves/subscription/capacity/CapacityService.java`

### Payments And Delivery

- [Payments And Payouts](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/integration-service/src/main/java/in/craves/integration/service/PaymentService.java): `services/integration-service/src/main/java/in/craves/integration/service/PaymentService.java`
- [Delivery Dispatch](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/integration-service/src/main/java/in/craves/integration/web/DeliveryOrchestrationInternalController.java): `services/integration-service/src/main/java/in/craves/integration/web/DeliveryOrchestrationInternalController.java`
- **Azure API Management**
- **Firebase Authentication**
- **Azure Blob Storage**

### Identity And Messaging

- [Authentication](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/auth-service/src/main/java/in/craves/auth/service/AuthService.java): `services/auth-service/src/main/java/in/craves/auth/service/AuthService.java`
- [Identity And Sessions](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/auth-service/src/main/java/in/craves/auth/domain/AuthIdentity.java): `services/auth-service/src/main/java/in/craves/auth/domain/AuthIdentity.java`
- [Notifications](https://github.com/rmorampudi09-arch/craves-build-platform/blob/main/services/notification-service/src/main/java/in/craves/notification/service/NotificationService.java): `services/notification-service/src/main/java/in/craves/notification/service/NotificationService.java`

### Other components

- **Customer**

## Connections

- Customer → Customer Web: uses
- Customer Web → Food Discovery: browses
- Customer Web → Cart And Checkout: orders through
- Customer Web → Meal Plans: selects plans
- Customer Web → Orders And Tracking: tracks orders
- Customer Web → Web API Routes: requests data
- Web API Routes → Azure API Management: routes via
- Azure API Management → Authentication: exposes services (evidence: `README.md`)
- Azure API Management → Catalog And Media: exposes services (evidence: `README.md`)
- Azure API Management → Orders And Reviews: exposes services (evidence: `README.md`)
- Azure API Management → Subscriptions: exposes services (evidence: `README.md`)
- Azure API Management → Payments And Payouts: exposes services (evidence: `README.md`)
- Azure API Management → Notifications: exposes services (evidence: `README.md`)
- Authentication → Firebase Authentication: verifies tokens (evidence: `services/auth-service/src/main/java/in/craves/auth/service/AuthService.java`)
- Authentication → Identity And Sessions: reads and updates (evidence: `services/auth-service/src/main/java/in/craves/auth/service/AuthService.java`)
- Orders And Tracking → Web API Routes: requests status
- Delivery Status → Orders And Reviews: queries order records (evidence: `services/order-service/src/main/java/in/craves/order/delivery/DeliveryStatusQueryService.java`)
- Delivery Status → Orders And Tracking: returns tracking
- Chef Portal → Web API Routes: manages operations
- Admin Console → Web API Routes: manages operations
- Chef Onboarding → Document Review: supports review
- Document Review → Private Documents: reads documents (evidence: `services/user-chef-service/src/main/java/in/craves/userchef/service/ChefDocumentReviewService.java`)
- Private Documents → Azure Blob Storage: stores files (evidence: `services/user-chef-service/src/main/java/in/craves/userchef/service/BlobDocumentStorageService.java`)
- Subscriptions → Capacity Rules: checks capacity
- Payments And Payouts → Delivery Dispatch: coordinates delivery
- Orders And Reviews → Delivery Status: serves status queries
- Notifications → Customer Web: delivers notices
