# receperturkk/shadowstore-backend architecture

> Architecture diagram of the GitHub repository receperturkk/shadowstore-backend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/receperturkk/shadowstore-backend
- Repository: https://github.com/receperturkk/shadowstore-backend

## Overview

##### Project type and purpose
- This is a monolithic ASP.NET Core Web API backend (“ShadowStore-Backend”) that exposes product and user endpoints, uses ADO.NET for data access, and SQL Server (with stored procedures) as its database.
- Its primary purpose is to handle CRUD operations (via stored procedures) for a “ShadowStore” e-commerce or inventory system, serving requests on port 5001 to a separate frontend.

##### File structure
- Top-level files:
- ShadowStore.sln – Visual Studio solution
- database.sql – schema + stored-procedure definitions
- publish/ – contains the self-contained published app (exe, runtimes, config)
- ShadowStore/ directory holds the API source:
- Controllers/Products.cs, User.cs – HTTP API endpoints
- Product.cs – domain model (POCO)
- Program.cs – host and middleware setup (Kestrel, routing)
- appsettings.json & appsettings.Development.json – configuration (connection strings, ports)
- ShadowStore.csproj – project definition, dependencies
- No separate “DataAccess” folder, but data access occurs inline in controllers (ADO.NET calls to stored procedures).

##### Key README insights
- Database setup steps: create “shadowStore” database in local SQL Server, run database.sql
- The published exe must run on port 5001 to match the frontend’s expectations.
- Emphasis on ADO.NET + stored procedures for Add, Delete, Update operations.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client
    Client["Client (Frontend)"]:::client

    %% API Service
    subgraph "ShadowStore API Service"
        direction TB
        SLN["ShadowStore.sln"]:::file
        CSP["ShadowStore.csproj"]:::file
        Prg["Program.cs"]:::file
        Kestel["HTTP Server / Kestrel"]:::api
        ConfigProd["appsettings.json"]:::config
        ConfigDev["appsettings.Development.json"]:::config
        Launch["launchSettings.json"]:::config
        ProdCtrl["ProductsController"]:::controller
        UserCtrl["UserController"]:::controller
        Domain["Product.cs"]:::domain
        DataAccess["Data Access (ADO.NET inline)"]:::data
    end

    %% Database
    Database[(SQL Server\nTables & Stored Procedures)]:::database

    %% Deployment
    Deployment["Self-Contained Deployment\n(publish/)"]:::deployment

    %% README
    README["README.md"]:::doc

    %% Connections
    Client -->|"HTTPS JSON (port 5001)"| Kestel
    Prg --> Kestel
    Kestel --> ProdCtrl
    Kestel --> UserCtrl
    ProdCtrl --> DataAccess
    UserCtrl --> DataAccess
    DataAccess -->|"Execute Stored Procedures"| Database
    ProdCtrl --> Domain
    UserCtrl --> Domain
    ConfigProd --> Prg
    ConfigDev --> Prg
    Launch --> Prg
    Deployment --> Prg
    README --> Prg

    %% Click Events
    click SLN "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore.sln"
    click CSP "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/ShadowStore.csproj"
    click ProdCtrl "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/Controllers/Products.cs"
    click UserCtrl "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/Controllers/User.cs"
    click Domain "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/Product.cs"
    click Prg "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/Program.cs"
    click ConfigProd "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/appsettings.json"
    click ConfigDev "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/appsettings.Development.json"
    click Launch "https://github.com/receperturkk/shadowstore-backend/blob/master/ShadowStore/Properties/launchSettings.json"
    click databaseSQL "https://github.com/receperturkk/shadowstore-backend/blob/master/database.sql"
    click Deployment "https://github.com/receperturkk/shadowstore-backend/tree/master/publish/"
    click README "https://github.com/receperturkk/shadowstore-backend/blob/master/README.md"

    %% Styles
    classDef client fill:#f9f,stroke:#333,stroke-width:1px;
    classDef api fill:#6f6,stroke:#333,stroke-width:1px;
    classDef controller fill:#8f8,stroke:#333,stroke-width:1px;
    classDef data fill:#fea,stroke:#333,stroke-width:1px;
    classDef domain fill:#dca,stroke:#333,stroke-width:1px;
    classDef config fill:#fdd,stroke:#333,stroke-width:1px;
    classDef database fill:#ccf,stroke:#333,stroke-width:1px;
    classDef deployment fill:#ddd,stroke:#333,stroke-width:1px;
    classDef file fill:#fff,stroke:#333,stroke-width:1px;
    classDef doc fill:#ffc,stroke:#333,stroke-width:1px;
```
