# mavscriptblu/teamcaret architecture

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

- Interactive diagram: https://gitdiagram.com/mavscriptblu/teamcaret
- Repository: https://github.com/mavscriptblu/teamcaret

## Overview

CCOS is a club merchandise ordering and event-ticketing system, with officer-facing management for products, events, and venues. The clearest implemented workflow is product browsing or officer product creation: Razor Pages call a typed API client, which sends requests to the Web API; the controller delegates product reads to a repository backed by EF Core. The tree and README describe broader event and ticket capabilities, but sampled source does not establish their complete request flows. Dashed links mark those unverified connections.

Main entry points: [`backend/CCOS.Data/AppDbContext.cs`](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/AppDbContext.cs) (EF Core context), [`backend/CCOS.Data/Entities/Event.cs`](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Event.cs) (Event), [`backend/CCOS.Repositories/TicketBookingRepository.cs`](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Repositories/TicketBookingRepository.cs) (Ticket reservations), [`backend/CCOS.Data/Entities/TicketRegistration.cs`](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/TicketRegistration.cs) (Ticket registrations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_product_pages["Product pages<br/>[Index.cshtml.cs]"]
  node_product_admin["Product admin<br/>[Index.cshtml.cs]"]
  node_product_create["Product creation<br/>[Create.cshtml.cs]"]
  node_api_client["Products API client"]
end

subgraph group_api["Product API"]
  node_product_contracts["Product DTOs<br/>[ProductDto.cs]"]
  node_create_contract["Create request"]
  node_product_controller["Products controller"]
  node_product_repository["Product repository"]
end

subgraph group_events["Events and tickets"]
  node_event_pages["Event pages<br/>[Details.cshtml.cs]"]
  node_event_data["Event data<br/>[EventData.cs]"]
  node_event_admin["Event management"]
  node_venue_admin["Venue management<br/>[Create.cshtml.cs]"]
  node_ticket_booking["Ticket reservations"]
  node_sold_out["Sold-out handling"]
end

subgraph group_data["Persistence model"]
  node_db_context["EF Core context<br/>[AppDbContext.cs]"]
  node_products[("Products and ticket types<br/>[Product.cs]")]
  node_orders[("Orders and lines<br/>[Order.cs]")]
  node_order_line[("Order line<br/>[OrderLine.cs]")]
  node_events_model[("Event<br/>[Event.cs]")]
  node_registrations[("Ticket registrations")]
  node_registration_status["Registration status"]
  node_venues[("Venues<br/>[Venue.cs]")]
  node_venue_address[("Venue address<br/>[VenueAddress.cs]")]
  node_ticket_type[("Ticket type<br/>[TicketType.cs]")]
end

node_members(("Members and guests"))
node_officers(("Club officers"))

node_members -->|"browse"| node_product_pages
node_officers -->|"manage"| node_product_admin
node_officers -->|"create"| node_product_create
node_product_pages -->|"requests"| node_api_client
node_product_admin -->|"lists"| node_api_client
node_product_create -->|"submits"| node_api_client
node_product_create -->|"uses"| node_create_contract
node_api_client -->|"HTTP requests"| node_product_controller
node_product_controller -->|"delegates"| node_product_repository
node_product_controller -->|"returns"| node_product_contracts
node_product_repository -->|"queries"| node_db_context
node_db_context -->|"maps"| node_products
node_db_context -->|"maps"| node_orders
node_db_context -->|"maps"| node_order_line
node_db_context -->|"maps"| node_events_model
node_db_context -->|"maps"| node_registrations
node_db_context -->|"maps"| node_venues
node_db_context -->|"maps"| node_venue_address
node_db_context -->|"maps"| node_ticket_type
node_events_model -->|"references"| node_venues
node_events_model -->|"owns ticket types"| node_ticket_type
node_events_model -->|"owns registrations"| node_registrations
node_venues -->|"has address"| node_venue_address
node_order_line -->|"belongs to"| node_orders
node_registrations -->|"references"| node_order_line
node_registrations -->|"stores status"| node_registration_status
node_ticket_booking -->|"updates"| node_db_context
node_ticket_booking -->|"throws"| node_sold_out
node_ticket_booking -->|"reserves capacity"| node_events_model
node_event_pages -->|"reads event"| node_events_model
node_event_admin -->|"manages"| node_events_model
node_event_data -->|"uses event"| node_events_model
node_officers -->|"manage events"| node_event_admin
node_officers -->|"manage venues"| node_venue_admin
node_members -->|"view events"| node_event_pages
node_members -.->|"book tickets"| node_ticket_booking
node_venue_admin -.->|"persists venue"| node_venues

click node_product_pages "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Products/Index.cshtml.cs"
click node_product_admin "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Products/Index.cshtml.cs"
click node_product_create "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Products/Create.cshtml.cs"
click node_api_client "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Services/ProductsApiClient.cs"
click node_product_contracts "https://github.com/mavscriptblu/teamcaret/blob/main/shared/CCOS.Shared/ProductDto.cs"
click node_create_contract "https://github.com/mavscriptblu/teamcaret/blob/main/shared/CCOS.Shared/CreateProductRequest.cs"
click node_product_controller "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Api/Controllers/ProductsController.cs"
click node_product_repository "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Repositories/ProductRepository.cs"
click node_event_pages "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Events/Details.cshtml.cs"
click node_event_data "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Events/EventData.cs"
click node_event_admin "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Events/EventFormPageModel.cs"
click node_venue_admin "https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Venues/Create.cshtml.cs"
click node_ticket_booking "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Repositories/TicketBookingRepository.cs"
click node_sold_out "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Repositories/SoldOutException.cs"
click node_db_context "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/AppDbContext.cs"
click node_products "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Product.cs"
click node_orders "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Order.cs"
click node_order_line "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/OrderLine.cs"
click node_events_model "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Event.cs"
click node_registrations "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/TicketRegistration.cs"
click node_registration_status "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/RegistrationStatus.cs"
click node_venues "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Venue.cs"
click node_venue_address "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/VenueAddress.cs"
click node_ticket_type "https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/TicketType.cs"

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_pages,node_product_admin,node_product_create,node_api_client toneBlue
class node_product_contracts,node_create_contract,node_product_controller,node_product_repository toneAmber
class node_event_pages,node_event_data,node_event_admin,node_venue_admin,node_ticket_booking,node_sold_out toneMint
class node_db_context,node_products,node_orders,node_order_line,node_events_model,node_registrations,node_registration_status,node_venues,node_venue_address,node_ticket_type toneRose
class node_members,node_officers toneIndigo
```

## Components

### Web experience

- [Product pages](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Products/Index.cshtml.cs): `frontend/CCOS.Web/Pages/Products/Index.cshtml.cs`
- [Product admin](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Products/Index.cshtml.cs): `frontend/CCOS.Web/Pages/Officer/Products/Index.cshtml.cs`
- [Product creation](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Products/Create.cshtml.cs): `frontend/CCOS.Web/Pages/Officer/Products/Create.cshtml.cs`
- [Products API client](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Services/ProductsApiClient.cs): `frontend/CCOS.Web/Services/ProductsApiClient.cs`

### Product API

- [Product DTOs](https://github.com/mavscriptblu/teamcaret/blob/main/shared/CCOS.Shared/ProductDto.cs): `shared/CCOS.Shared/ProductDto.cs`
- [Create request](https://github.com/mavscriptblu/teamcaret/blob/main/shared/CCOS.Shared/CreateProductRequest.cs): `shared/CCOS.Shared/CreateProductRequest.cs`
- [Products controller](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Api/Controllers/ProductsController.cs): `backend/CCOS.Api/Controllers/ProductsController.cs`
- [Product repository](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Repositories/ProductRepository.cs): `backend/CCOS.Repositories/ProductRepository.cs`

### Events and tickets

- [Event pages](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Events/Details.cshtml.cs): `frontend/CCOS.Web/Pages/Events/Details.cshtml.cs`
- [Event data](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Events/EventData.cs): `frontend/CCOS.Web/Pages/Events/EventData.cs`
- [Event management](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Events/EventFormPageModel.cs): `frontend/CCOS.Web/Pages/Officer/Events/EventFormPageModel.cs`
- [Venue management](https://github.com/mavscriptblu/teamcaret/blob/main/frontend/CCOS.Web/Pages/Officer/Venues/Create.cshtml.cs): `frontend/CCOS.Web/Pages/Officer/Venues/Create.cshtml.cs`
- [Ticket reservations](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Repositories/TicketBookingRepository.cs): `backend/CCOS.Repositories/TicketBookingRepository.cs`
- [Sold-out handling](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Repositories/SoldOutException.cs): `backend/CCOS.Repositories/SoldOutException.cs`

### Persistence model

- [EF Core context](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/AppDbContext.cs): `backend/CCOS.Data/AppDbContext.cs`
- [Products and ticket types](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Product.cs): `backend/CCOS.Data/Entities/Product.cs`
- [Orders and lines](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Order.cs): `backend/CCOS.Data/Entities/Order.cs`
- [Order line](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/OrderLine.cs): `backend/CCOS.Data/Entities/OrderLine.cs`
- [Event](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Event.cs): `backend/CCOS.Data/Entities/Event.cs`
- [Ticket registrations](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/TicketRegistration.cs): `backend/CCOS.Data/Entities/TicketRegistration.cs`
- [Registration status](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/RegistrationStatus.cs): `backend/CCOS.Data/Entities/RegistrationStatus.cs`
- [Venues](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/Venue.cs): `backend/CCOS.Data/Entities/Venue.cs`
- [Venue address](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/VenueAddress.cs): `backend/CCOS.Data/Entities/VenueAddress.cs`
- [Ticket type](https://github.com/mavscriptblu/teamcaret/blob/main/backend/CCOS.Data/Entities/TicketType.cs): `backend/CCOS.Data/Entities/TicketType.cs`

### Other components

- **Members and guests**
- **Club officers**

## Connections

- Members and guests → Product pages: browse (evidence: `README.md`)
- Club officers → Product admin: manage (evidence: `README.md`)
- Club officers → Product creation: create (evidence: `README.md`)
- Product pages → Products API client: requests (evidence: `frontend/CCOS.Web/Pages/Products/Index.cshtml.cs`)
- Product admin → Products API client: lists (evidence: `frontend/CCOS.Web/Pages/Officer/Products/Index.cshtml.cs`)
- Product creation → Products API client: submits (evidence: `frontend/CCOS.Web/Pages/Officer/Products/Create.cshtml.cs`)
- Product creation → Create request: uses (evidence: `frontend/CCOS.Web/Pages/Officer/Products/Create.cshtml.cs`)
- Products API client → Products controller: HTTP requests (evidence: `frontend/CCOS.Web/Services/ProductsApiClient.cs`)
- Products controller → Product repository: delegates (evidence: `backend/CCOS.Api/Controllers/ProductsController.cs`)
- Products controller → Product DTOs: returns (evidence: `backend/CCOS.Api/Controllers/ProductsController.cs`)
- Product repository → EF Core context: queries (evidence: `backend/CCOS.Repositories/ProductRepository.cs`)
- EF Core context → Products and ticket types: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- EF Core context → Orders and lines: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- EF Core context → Order line: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- EF Core context → Event: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- EF Core context → Ticket registrations: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- EF Core context → Venues: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- EF Core context → Venue address: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- EF Core context → Ticket type: maps (evidence: `backend/CCOS.Data/AppDbContext.cs`)
- Event → Venues: references (evidence: `backend/CCOS.Data/Entities/Event.cs`)
- Event → Ticket type: owns ticket types (evidence: `backend/CCOS.Data/Entities/Event.cs`)
- Event → Ticket registrations: owns registrations (evidence: `backend/CCOS.Data/Entities/Event.cs`)
- Venues → Venue address: has address (evidence: `backend/CCOS.Data/Entities/Venue.cs`)
- Order line → Orders and lines: belongs to (evidence: `backend/CCOS.Data/Entities/OrderLine.cs`)
- Ticket registrations → Order line: references (evidence: `backend/CCOS.Data/Entities/TicketRegistration.cs`)
- Ticket registrations → Registration status: stores status (evidence: `backend/CCOS.Data/Entities/TicketRegistration.cs`)
- Ticket reservations → EF Core context: updates (evidence: `backend/CCOS.Repositories/TicketBookingRepository.cs`)
- Ticket reservations → Sold-out handling: throws (evidence: `backend/CCOS.Repositories/TicketBookingRepository.cs`)
- Ticket reservations → Event: reserves capacity (evidence: `backend/CCOS.Repositories/TicketBookingRepository.cs`)
- Event pages → Event: reads event (evidence: `frontend/CCOS.Web/Pages/Events/Details.cshtml.cs`)
- Event management → Event: manages (evidence: `frontend/CCOS.Web/Pages/Officer/Events/EventFormPageModel.cs`)
- Event data → Event: uses event (evidence: `frontend/CCOS.Web/Pages/Events/EventData.cs`)
- Club officers → Event management: manage events (evidence: `README.md`)
- Club officers → Venue management: manage venues (evidence: `README.md`)
- Members and guests → Event pages: view events (evidence: `README.md`)
- Members and guests → Ticket reservations: book tickets
- Venue management → Venues: persists venue
