# tejaspande1211/ticketsapi architecture

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

- Interactive diagram: https://gitdiagram.com/tejaspande1211/ticketsapi
- Repository: https://github.com/tejaspande1211/ticketsapi

## Overview

TicketsApi is an ASP.NET Core REST API for managing tickets. The principal workflow is an HTTP client sending CRUD requests through the application’s controller to the EF Core context and SQLite store; ticket status, priority, and creation time form the domain model. Program.cs configures routing, CORS, and development Swagger. The README also documents enum-backed fields and immutable CreatedAt updates. The test harness is excluded as non-product infrastructure. Relationships shown are supported by excerpts or README statements; unsampled migration details are omitted.

Main entry points: [`Program.cs`](https://github.com/tejaspande1211/ticketsapi/blob/main/Program.cs) (ASP.NET host), [`TicketsDbContext.cs`](https://github.com/tejaspande1211/ticketsapi/blob/main/TicketsDbContext.cs) (Ticket context), [`Controllers/TicketsController.cs`](https://github.com/tejaspande1211/ticketsapi/blob/main/Controllers/TicketsController.cs) (Ticket endpoints), [`Models/Ticket.cs`](https://github.com/tejaspande1211/ticketsapi/blob/main/Models/Ticket.cs) (Ticket model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["API application"]
  node_host["ASP.NET host<br/>[Program.cs]"]
  node_swagger["Dev Swagger<br/>[Program.cs]"]
  node_cors["Frontend CORS<br/>[Program.cs]"]
  node_tickets_api["Ticket endpoints"]
end

subgraph group_domain["Ticket domain"]
  node_ticket_model["Ticket model<br/>[Ticket.cs]"]
end

subgraph group_persistence["Persistence"]
  node_ticket_context["Ticket context"]
  node_sqlite[("SQLite database")]
end

node_client(("HTTP client"))

node_client -->|"sends CRUD requests"| node_tickets_api
node_host -->|"maps controllers"| node_tickets_api
node_host -->|"registers context"| node_ticket_context
node_host -->|"enables in development"| node_swagger
node_host -->|"applies policy"| node_cors
node_tickets_api -->|"queries and saves"| node_ticket_context
node_ticket_context -->|"maps tickets"| node_ticket_model
node_ticket_context -.->|"persists data"| node_sqlite

click node_host "https://github.com/tejaspande1211/ticketsapi/blob/main/Program.cs"
click node_swagger "https://github.com/tejaspande1211/ticketsapi/blob/main/Program.cs"
click node_cors "https://github.com/tejaspande1211/ticketsapi/blob/main/Program.cs"
click node_tickets_api "https://github.com/tejaspande1211/ticketsapi/blob/main/Controllers/TicketsController.cs"
click node_ticket_model "https://github.com/tejaspande1211/ticketsapi/blob/main/Models/Ticket.cs"
click node_ticket_context "https://github.com/tejaspande1211/ticketsapi/blob/main/TicketsDbContext.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_host,node_swagger,node_cors,node_tickets_api,node_client toneBlue
class node_ticket_model toneAmber
class node_ticket_context,node_sqlite toneMint
```

## Components

### API application

- [ASP.NET host](https://github.com/tejaspande1211/ticketsapi/blob/main/Program.cs): `Program.cs`
- [Dev Swagger](https://github.com/tejaspande1211/ticketsapi/blob/main/Program.cs): `Program.cs`
- [Frontend CORS](https://github.com/tejaspande1211/ticketsapi/blob/main/Program.cs): `Program.cs`
- [Ticket endpoints](https://github.com/tejaspande1211/ticketsapi/blob/main/Controllers/TicketsController.cs): `Controllers/TicketsController.cs`

### Ticket domain

- [Ticket model](https://github.com/tejaspande1211/ticketsapi/blob/main/Models/Ticket.cs): `Models/Ticket.cs`

### Persistence

- [Ticket context](https://github.com/tejaspande1211/ticketsapi/blob/main/TicketsDbContext.cs): `TicketsDbContext.cs`
- **SQLite database**

### Other components

- **HTTP client**

## Connections

- HTTP client → Ticket endpoints: sends CRUD requests (evidence: `README.md`)
- ASP.NET host → Ticket endpoints: maps controllers (evidence: `Program.cs`)
- ASP.NET host → Ticket context: registers context (evidence: `Program.cs`)
- ASP.NET host → Dev Swagger: enables in development (evidence: `Program.cs`)
- ASP.NET host → Frontend CORS: applies policy (evidence: `Program.cs`)
- Ticket endpoints → Ticket context: queries and saves (evidence: `Controllers/TicketsController.cs`)
- Ticket context → Ticket model: maps tickets (evidence: `TicketsDbContext.cs`)
- Ticket context → SQLite database: persists data
