# kirillfty/testproject architecture

> Architecture diagram of the GitHub repository kirillfty/testproject, 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/kirillfty/testproject
- Repository: https://github.com/kirillfty/testproject

## Overview

This repository implements a contact-management application: users can view, create, update, and delete contacts through a Vue frontend and an ASP.NET API. The API routes requests through MediatR handlers to SQLite-backed contact storage; missing records and other exceptions become problem responses. The frontend’s page and supporting modules are represented, but their internal wiring and connection to the API are not asserted because the excerpts do not show those relationships. The frontend-to-backend boundary is likewise not documented in the available evidence.

Main entry points: [`Test.Backend/Controller/ContactController.cs`](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Controller/ContactController.cs) (Contact routes), [`Test.Backend/Database/ApplicationDbContext.cs`](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Database/ApplicationDbContext.cs) (Contact data access), [`Test.Backend/Common/Exceptions/NotFoundException.cs`](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Common/Exceptions/NotFoundException.cs) (Not-found error), [`Test.Backend/Features/Contacts/Commands/UpdateContact/UpdateContactCommand.cs`](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Commands/UpdateContact/UpdateContactCommand.cs) (Update contact)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Contact frontend"]
  node_app["App root<br/>[App.vue]"]
  node_contacts_page["Contacts page<br/>[ContactsPage.vue]"]
  node_contacts_api["API client<br/>[client.ts]"]
  node_contacts_state["Contact state<br/>[useContacts.ts]"]
  node_contact_form["Contact form<br/>[useContactForm.ts]"]
  node_contacts_table["Contacts table<br/>[ContactsTable.vue]"]
  node_contact_modal["Contact modal<br/>[ContactModal.vue]"]
  node_confirm_modal["Confirmation modal<br/>[ConfirmModal.vue]"]
  node_phone_input["Phone input<br/>[PhoneInput.vue]"]
  node_countries["Country data<br/>[countries.ts]"]
  node_contact_type["Contact type<br/>[contact.ts]"]
end

subgraph group_api["HTTP API"]
  node_program["API host<br/>[Program.cs]"]
  node_controller["Contact routes"]
end

subgraph group_handlers["Contact operations"]
  node_add_handler["Add contact"]
  node_update_handler["Update contact"]
  node_delete_handler["Delete contact"]
  node_list_handler["List contacts"]
  node_get_handler["Get contact"]
end

subgraph group_storage["Contact persistence"]
  node_db_context[("Contact data access")]
  node_contact_entity["Contact record<br/>[Contact.cs]"]
end

subgraph group_errors["Error handling"]
  node_exception_handler["Problem responses"]
  node_not_found["Not-found error"]
end

node_user(("User"))

node_user -.->|"uses"| node_app
node_app -->|"renders"| node_contacts_page
node_program -->|"maps routes"| node_controller
node_controller -->|"dispatches"| node_list_handler
node_controller -->|"dispatches"| node_add_handler
node_controller -->|"dispatches"| node_get_handler
node_controller -->|"dispatches"| node_update_handler
node_controller -->|"dispatches"| node_delete_handler
node_add_handler -->|"writes"| node_db_context
node_update_handler -->|"reads and writes"| node_db_context
node_delete_handler -->|"deletes"| node_db_context
node_list_handler -->|"queries"| node_db_context
node_get_handler -->|"queries"| node_db_context
node_db_context -->|"exposes"| node_contact_entity
node_update_handler -->|"throws"| node_not_found
node_delete_handler -->|"throws"| node_not_found
node_get_handler -->|"throws"| node_not_found
node_program -->|"registers"| node_exception_handler
node_exception_handler -->|"handles"| node_not_found

click node_app "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/App.vue"
click node_contacts_page "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/pages/ContactsPage.vue"
click node_contacts_api "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/api/client.ts"
click node_contacts_state "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/composables/useContacts.ts"
click node_contact_form "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/composables/useContactForm.ts"
click node_contacts_table "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/ContactsTable.vue"
click node_contact_modal "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/ContactModal.vue"
click node_confirm_modal "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/ConfirmModal.vue"
click node_phone_input "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/PhoneInput.vue"
click node_countries "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/data/countries.ts"
click node_contact_type "https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/types/contact.ts"
click node_program "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Program.cs"
click node_controller "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Controller/ContactController.cs"
click node_add_handler "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Commands/AddContact/AddContactCommand.cs"
click node_update_handler "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Commands/UpdateContact/UpdateContactCommand.cs"
click node_delete_handler "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Commands/DeleteContact/DeleteContactCommand.cs"
click node_list_handler "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Queries/GetAll/GetAllContactsQuery.cs"
click node_get_handler "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Queries/GetById/GetContactByIdQuery.cs"
click node_db_context "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Database/ApplicationDbContext.cs"
click node_contact_entity "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Database/Entitty/Contact.cs"
click node_exception_handler "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Common/Exceptions/GlobalExceptionHandler.cs"
click node_not_found "https://github.com/kirillfty/testproject/blob/main/Test.Backend/Common/Exceptions/NotFoundException.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_app,node_contacts_page,node_contacts_api,node_contacts_state,node_contact_form,node_contacts_table,node_contact_modal,node_confirm_modal,node_phone_input,node_countries,node_contact_type,node_user toneBlue
class node_program,node_controller toneAmber
class node_add_handler,node_update_handler,node_delete_handler,node_list_handler,node_get_handler toneMint
class node_db_context,node_contact_entity toneRose
class node_exception_handler,node_not_found toneIndigo
```

## Components

### Contact frontend

- [App root](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/App.vue): `Test.Frontend/src/App.vue`
- [Contacts page](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/pages/ContactsPage.vue): `Test.Frontend/src/pages/ContactsPage.vue`
- [API client](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/api/client.ts): `Test.Frontend/src/api/client.ts`
- [Contact state](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/composables/useContacts.ts): `Test.Frontend/src/composables/useContacts.ts`
- [Contact form](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/composables/useContactForm.ts): `Test.Frontend/src/composables/useContactForm.ts`
- [Contacts table](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/ContactsTable.vue): `Test.Frontend/src/components/ContactsTable.vue`
- [Contact modal](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/ContactModal.vue): `Test.Frontend/src/components/ContactModal.vue`
- [Confirmation modal](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/ConfirmModal.vue): `Test.Frontend/src/components/ConfirmModal.vue`
- [Phone input](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/components/PhoneInput.vue): `Test.Frontend/src/components/PhoneInput.vue`
- [Country data](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/data/countries.ts): `Test.Frontend/src/data/countries.ts`
- [Contact type](https://github.com/kirillfty/testproject/blob/main/Test.Frontend/src/types/contact.ts): `Test.Frontend/src/types/contact.ts`

### HTTP API

- [API host](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Program.cs): `Test.Backend/Program.cs`
- [Contact routes](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Controller/ContactController.cs): `Test.Backend/Controller/ContactController.cs`

### Contact operations

- [Add contact](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Commands/AddContact/AddContactCommand.cs): `Test.Backend/Features/Contacts/Commands/AddContact/AddContactCommand.cs`
- [Update contact](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Commands/UpdateContact/UpdateContactCommand.cs): `Test.Backend/Features/Contacts/Commands/UpdateContact/UpdateContactCommand.cs`
- [Delete contact](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Commands/DeleteContact/DeleteContactCommand.cs): `Test.Backend/Features/Contacts/Commands/DeleteContact/DeleteContactCommand.cs`
- [List contacts](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Queries/GetAll/GetAllContactsQuery.cs): `Test.Backend/Features/Contacts/Queries/GetAll/GetAllContactsQuery.cs`
- [Get contact](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Features/Contacts/Queries/GetById/GetContactByIdQuery.cs): `Test.Backend/Features/Contacts/Queries/GetById/GetContactByIdQuery.cs`

### Contact persistence

- [Contact data access](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Database/ApplicationDbContext.cs): `Test.Backend/Database/ApplicationDbContext.cs`
- [Contact record](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Database/Entitty/Contact.cs): `Test.Backend/Database/Entitty/Contact.cs`

### Error handling

- [Problem responses](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Common/Exceptions/GlobalExceptionHandler.cs): `Test.Backend/Common/Exceptions/GlobalExceptionHandler.cs`
- [Not-found error](https://github.com/kirillfty/testproject/blob/main/Test.Backend/Common/Exceptions/NotFoundException.cs): `Test.Backend/Common/Exceptions/NotFoundException.cs`

### Other components

- **User**

## Connections

- User → App root: uses
- App root → Contacts page: renders (evidence: `Test.Frontend/src/App.vue`)
- API host → Contact routes: maps routes (evidence: `Test.Backend/Program.cs`)
- Contact routes → List contacts: dispatches (evidence: `Test.Backend/Controller/ContactController.cs`)
- Contact routes → Add contact: dispatches (evidence: `Test.Backend/Controller/ContactController.cs`)
- Contact routes → Get contact: dispatches (evidence: `Test.Backend/Controller/ContactController.cs`)
- Contact routes → Update contact: dispatches (evidence: `Test.Backend/Controller/ContactController.cs`)
- Contact routes → Delete contact: dispatches (evidence: `Test.Backend/Controller/ContactController.cs`)
- Add contact → Contact data access: writes (evidence: `Test.Backend/Features/Contacts/Commands/AddContact/AddContactCommand.cs`)
- Update contact → Contact data access: reads and writes (evidence: `Test.Backend/Features/Contacts/Commands/UpdateContact/UpdateContactCommand.cs`)
- Delete contact → Contact data access: deletes (evidence: `Test.Backend/Features/Contacts/Commands/DeleteContact/DeleteContactCommand.cs`)
- List contacts → Contact data access: queries (evidence: `Test.Backend/Features/Contacts/Queries/GetAll/GetAllContactsQuery.cs`)
- Get contact → Contact data access: queries (evidence: `Test.Backend/Features/Contacts/Queries/GetById/GetContactByIdQuery.cs`)
- Contact data access → Contact record: exposes (evidence: `Test.Backend/Database/ApplicationDbContext.cs`)
- Update contact → Not-found error: throws (evidence: `Test.Backend/Features/Contacts/Commands/UpdateContact/UpdateContactCommand.cs`)
- Delete contact → Not-found error: throws (evidence: `Test.Backend/Features/Contacts/Commands/DeleteContact/DeleteContactCommand.cs`)
- Get contact → Not-found error: throws (evidence: `Test.Backend/Features/Contacts/Queries/GetById/GetContactByIdQuery.cs`)
- API host → Problem responses: registers (evidence: `Test.Backend/Program.cs`)
- Problem responses → Not-found error: handles (evidence: `Test.Backend/Common/Exceptions/GlobalExceptionHandler.cs`)
