# lindaabytyqi/chronoscart architecture

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

- Interactive diagram: https://gitdiagram.com/lindaabytyqi/chronoscart
- Repository: https://github.com/lindaabytyqi/chronoscart

## Overview

This is a Symfony e-commerce application with product browsing, carts, checkout, inventory reservations, flash sales, dynamic pricing, and asynchronous payment/restocking capabilities represented in the source tree. The likely customer workflow is browsing products, adding items to a cart, and checking out; reservation expiry and payment processing provide supporting operational stages. Only CartController and selected entities were sampled, and there is no README, so most subsystem relationships are shown as unverified rather than asserted as observed calls.

Main entry points: [`src/Controller/CartController.php`](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/CartController.php) (Cart), [`src/Service/DynamicPricingService.php`](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/DynamicPricingService.php) (Dynamic pricing), [`src/Controller/ReservationController.php`](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/ReservationController.php) (Reservations), [`src/Service/ReservationExpiryService.php`](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/ReservationExpiryService.php) (Reservation expiry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Shopping"]
  node_product_browse["Product browsing"]
  node_shopfront["Shopfront<br/>[ShopController.php]"]
  node_cart["Cart<br/>[CartController.php]"]
  node_product["Product<br/>[Product.php]"]
end

subgraph group_inventory["Inventory"]
  node_reservation["Inventory reservation"]
  node_reservation_controller["Reservations"]
  node_stock["Stock service<br/>[StockService.php]"]
  node_stock_cache["Stock cache"]
  node_expiry_service["Reservation expiry"]
  node_expiry_command["Expiry command"]
  node_restock_message["Restock message"]
  node_restock_handler["Restock handler"]
end

subgraph group_pricing["Pricing and sales"]
  node_flash_sale["Flash sales"]
  node_flash_sale_event["Sale event<br/>[FlashSaleEvent.php]"]
  node_dynamic_pricing["Dynamic pricing"]
  node_pricing_subscriber["Pricing subscriber"]
  node_price_log["Price log<br/>[PriceLog.php]"]
end

subgraph group_orders["Orders and payments"]
  node_checkout["Checkout"]
  node_checkout_service["Checkout service"]
  node_order["Order<br/>[Order.php]"]
  node_order_items["Order items<br/>[OrderItems.php]"]
  node_payment_message["Payment message"]
  node_payment_handler["Payment handler"]
  node_payment_failure["Payment failure"]
end

subgraph group_accounts["Accounts"]
  node_registration["Registration"]
  node_security["Authentication"]
  node_user["User<br/>[User.php]"]
end

node_customer(("Customer"))

node_customer -.->|"browses"| node_product_browse
node_customer -.->|"visits"| node_shopfront
node_customer -.->|"adds items"| node_cart
node_cart -.->|"uses product"| node_product
node_cart -.->|"uses pricing"| node_dynamic_pricing
node_cart -.->|"dispatches"| node_payment_message
node_cart -.->|"proceeds to"| node_checkout
node_checkout -.->|"delegates to"| node_checkout_service
node_checkout_service -.->|"creates"| node_order
node_order -.->|"contains"| node_order_items
node_payment_message -.->|"handled by"| node_payment_handler
node_payment_handler -.->|"may trigger"| node_payment_failure
node_customer -.->|"manages reservations"| node_reservation_controller
node_reservation_controller -.->|"uses"| node_reservation
node_stock -.->|"uses cache"| node_stock_cache
node_expiry_command -.->|"runs"| node_expiry_service
node_expiry_service -.->|"expires"| node_reservation
node_restock_message -.->|"handled by"| node_restock_handler
node_customer -.->|"browses sales"| node_flash_sale
node_flash_sale -.->|"manages"| node_flash_sale_event
node_pricing_subscriber -.->|"uses"| node_dynamic_pricing
node_dynamic_pricing -.->|"records prices"| node_price_log
node_customer -.->|"registers"| node_registration
node_customer -.->|"authenticates"| node_security
node_registration -.->|"creates"| node_user

click node_product_browse "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/ProductController.php"
click node_shopfront "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/ShopController.php"
click node_cart "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/CartController.php"
click node_product "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/Product.php"
click node_checkout "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/CheckoutController.php"
click node_checkout_service "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/CheckoutService.php"
click node_order "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/Order.php"
click node_order_items "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/OrderItems.php"
click node_payment_message "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Message/ProcessPaymentMessage.php"
click node_payment_handler "https://github.com/lindaabytyqi/chronoscart/blob/master/src/MessageHandler/ProcessPaymentHandler.php"
click node_payment_failure "https://github.com/lindaabytyqi/chronoscart/blob/master/src/EventSubscriber/PaymentFailureSubscriber.php"
click node_reservation "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/InventoryReservation.php"
click node_reservation_controller "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/ReservationController.php"
click node_stock "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/StockService.php"
click node_stock_cache "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/StockCacheService.php"
click node_expiry_service "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/ReservationExpiryService.php"
click node_expiry_command "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Command/ReservationsExpireCommand.php"
click node_restock_message "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Message/RestockInventoryMessage.php"
click node_restock_handler "https://github.com/lindaabytyqi/chronoscart/blob/master/src/MessageHandler/RestockInventoryHandler.php"
click node_flash_sale "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/FlashSaleEventController.php"
click node_flash_sale_event "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/FlashSaleEvent.php"
click node_dynamic_pricing "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/DynamicPricingService.php"
click node_pricing_subscriber "https://github.com/lindaabytyqi/chronoscart/blob/master/src/EventSubscriber/DynamicPricingSubscriber.php"
click node_price_log "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/PriceLog.php"
click node_registration "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/RegistrationController.php"
click node_security "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/SecurityController.php"
click node_user "https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/User.php"

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_product_browse,node_shopfront,node_cart,node_product toneBlue
class node_reservation,node_reservation_controller,node_stock,node_stock_cache,node_expiry_service,node_expiry_command,node_restock_message,node_restock_handler toneAmber
class node_flash_sale,node_flash_sale_event,node_dynamic_pricing,node_pricing_subscriber,node_price_log toneMint
class node_checkout,node_checkout_service,node_order,node_order_items,node_payment_message,node_payment_handler,node_payment_failure toneRose
class node_registration,node_security,node_user,node_customer toneIndigo
```

## Components

### Shopping

- [Product browsing](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/ProductController.php): `src/Controller/ProductController.php`
- [Shopfront](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/ShopController.php): `src/Controller/ShopController.php`
- [Cart](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/CartController.php): `src/Controller/CartController.php`
- [Product](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/Product.php): `src/Entity/Product.php`

### Inventory

- [Inventory reservation](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/InventoryReservation.php): `src/Entity/InventoryReservation.php`
- [Reservations](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/ReservationController.php): `src/Controller/ReservationController.php`
- [Stock service](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/StockService.php): `src/Service/StockService.php`
- [Stock cache](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/StockCacheService.php): `src/Service/StockCacheService.php`
- [Reservation expiry](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/ReservationExpiryService.php): `src/Service/ReservationExpiryService.php`
- [Expiry command](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Command/ReservationsExpireCommand.php): `src/Command/ReservationsExpireCommand.php`
- [Restock message](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Message/RestockInventoryMessage.php): `src/Message/RestockInventoryMessage.php`
- [Restock handler](https://github.com/lindaabytyqi/chronoscart/blob/master/src/MessageHandler/RestockInventoryHandler.php): `src/MessageHandler/RestockInventoryHandler.php`

### Pricing and sales

- [Flash sales](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/FlashSaleEventController.php): `src/Controller/FlashSaleEventController.php`
- [Sale event](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/FlashSaleEvent.php): `src/Entity/FlashSaleEvent.php`
- [Dynamic pricing](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/DynamicPricingService.php): `src/Service/DynamicPricingService.php`
- [Pricing subscriber](https://github.com/lindaabytyqi/chronoscart/blob/master/src/EventSubscriber/DynamicPricingSubscriber.php): `src/EventSubscriber/DynamicPricingSubscriber.php`
- [Price log](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/PriceLog.php): `src/Entity/PriceLog.php`

### Orders and payments

- [Checkout](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/CheckoutController.php): `src/Controller/CheckoutController.php`
- [Checkout service](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Service/CheckoutService.php): `src/Service/CheckoutService.php`
- [Order](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/Order.php): `src/Entity/Order.php`
- [Order items](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/OrderItems.php): `src/Entity/OrderItems.php`
- [Payment message](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Message/ProcessPaymentMessage.php): `src/Message/ProcessPaymentMessage.php`
- [Payment handler](https://github.com/lindaabytyqi/chronoscart/blob/master/src/MessageHandler/ProcessPaymentHandler.php): `src/MessageHandler/ProcessPaymentHandler.php`
- [Payment failure](https://github.com/lindaabytyqi/chronoscart/blob/master/src/EventSubscriber/PaymentFailureSubscriber.php): `src/EventSubscriber/PaymentFailureSubscriber.php`

### Accounts

- [Registration](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/RegistrationController.php): `src/Controller/RegistrationController.php`
- [Authentication](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Controller/SecurityController.php): `src/Controller/SecurityController.php`
- [User](https://github.com/lindaabytyqi/chronoscart/blob/master/src/Entity/User.php): `src/Entity/User.php`

### Other components

- **Customer**

## Connections

- Customer → Product browsing: browses
- Customer → Shopfront: visits
- Customer → Cart: adds items
- Cart → Product: uses product (evidence: `src/Controller/CartController.php`)
- Cart → Dynamic pricing: uses pricing (evidence: `src/Controller/CartController.php`)
- Cart → Payment message: dispatches (evidence: `src/Controller/CartController.php`)
- Cart → Checkout: proceeds to
- Checkout → Checkout service: delegates to
- Checkout service → Order: creates
- Order → Order items: contains (evidence: `src/Entity/Order.php`)
- Payment message → Payment handler: handled by
- Payment handler → Payment failure: may trigger
- Customer → Reservations: manages reservations
- Reservations → Inventory reservation: uses
- Stock service → Stock cache: uses cache (evidence: `src/Service/StockService.php`)
- Expiry command → Reservation expiry: runs
- Reservation expiry → Inventory reservation: expires
- Restock message → Restock handler: handled by (evidence: `src/MessageHandler/RestockInventoryHandler.php`)
- Customer → Flash sales: browses sales
- Flash sales → Sale event: manages
- Pricing subscriber → Dynamic pricing: uses
- Dynamic pricing → Price log: records prices
- Customer → Registration: registers
- Customer → Authentication: authenticates
- Registration → User: creates
