# packtpublishing/asp.net-core-full-stack-development-projects- architecture

> Architecture diagram of the GitHub repository packtpublishing/asp.net-core-full-stack-development-projects-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/packtpublishing/asp.net-core-full-stack-development-projects-
- Repository: https://github.com/packtpublishing/asp.net-core-full-stack-development-projects-

## Overview

##### Project Type & Purpose
- This is a collection of three full-stack web applications demonstrating how to build modular, production-ready REST back ends with ASP.NET Core + SQLite and client-side single-page apps using Angular, React, and Vue.
- Each sample pairs “API-master.zip” (the back end) with a framework-specific front end (“Angular”, “React” or “VUE”).

##### File Structure
- Top-level zips correspond to:
- ShoppingASPNETAngular (Angular front end + ASP.NET API)
- FlightAndHotelsReact (React front end + FlightsAndHotelsAPI back end)
- MusicStoreVUE (Vue front end + MusicStoreAPI back end)
- Each API project contains Controllers, Models, Data (EF Core migrations, SQLite), Services, and Startup/Program for dependency injection.
- Each front-end project contains an NPM/webpack build, TypeScript or JavaScript sources, environment configs, and HTTP services to call the API.

##### Key Insights from the README
- Emphasis on building ASP.NET Core REST APIs, using C# 7+ features, Entity Framework Core with SQLite.
- Three client-side frameworks covered.
- Optionally deployable to Azure.

a. Main Components (repeatable per sample app)
- User’s Browser / SPA (Angular or React or Vue)
- SPA Build System (Node.js / NPM / Webpack)
- ASP.NET Core Web Server (Kestrel + Middleware pipeline)
- Business-Logic Layer (Controllers → Services → Repositories)
- Data Access Layer (Entity Framework Core)
- SQLite Database File
- Optional Hosting Environment (IIS, Azure App Service)
- External Services (if any—e.g., Azure Storage, Authentication)

b. Relationships & Interactions
1. Developer runs `npm start` / `dotnet run` or publishes via CI/CD.
2. Browser loads SPA assets (HTML, CSS, JS).
3. SPA issues HTTP(S) requests (GET/POST/PUT/DELETE) to REST endpoints on ASP.NET Core.
4. Controllers receive requests → invoke Services → talk to EF Core DbContext → SQLite.
5. Responses (JSON) return back to the SPA.
6. (If deployed) Azure App Service or IIS hosts the ASP.NET Core app and optionally serves the static SPA.

c. Architectural Patterns & Principles
- RESTful API design (resource-based routing).
- Dependency Injection (built into ASP.NET Core).
- Layered Architecture (Presentation, Business, Data).
- Single-Page Application pattern (client routing + API consumption).
- Use of EF Core Code-First migrations.

d. Key Technologies & Frameworks
- ASP.NET Core (Kestrel, Middleware, DI)
- C# 7 / .NET Standard
- Entity Framework Core + SQLite
- Angular CLI or Create-React-App or Vue CLI
- Node.js / NPM / Webpack
- TypeScript (for Angular/Vue) / ES6+ JavaScript (for React)
- Azure App Service or IIS (for deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Shopping Sample
    subgraph "Shopping Sample"
        direction LR
        Angular["Angular SPA"]:::frontend
        BuildA["Node.js/NPM/Webpack"]:::build
        APIa["ASP.NET Core API"]:::backend
        ControllersA["Controllers"]:::backend
        ServicesA["Services"]:::backend
        ReposA["Repositories/DbContext"]:::backend
        DBa["SQLite Database"]:::db

        Angular -->|"build & serve"| BuildA
        BuildA -->|"HTTP Requests"| APIa
        APIa --> ControllersA
        ControllersA --> ServicesA
        ServicesA --> ReposA
        ReposA --> DBa

        click Angular "https://github.com/packtpublishing/asp.net-core-full-stack-development-projects-/tree/master/shoppingapp-master/"
        click APIa "https://github.com/packtpublishing/asp.net-core-full-stack-development-projects-/tree/master/shoppingAPI-master/"
    end

    %% Flights & Hotels Sample
    subgraph "Flights & Hotels Sample"
        direction LR
        React["React SPA"]:::frontend
        BuildR["Node.js/NPM/Webpack"]:::build
        APIr["ASP.NET Core API"]:::backend
        ControllersR["Controllers"]:::backend
        ServicesR["Services"]:::backend
        ReposR["Repositories/DbContext"]:::backend
        DBr["SQLite Database"]:::db

        React -->|"build & serve"| BuildR
        BuildR -->|"HTTP Requests"| APIr
        APIr --> ControllersR
        ControllersR --> ServicesR
        ServicesR --> ReposR
        ReposR --> DBr

        click React "https://github.com/packtpublishing/asp.net-core-full-stack-development-projects-/tree/master/FlightsandHotelsReact-master/"
        click APIr "https://github.com/packtpublishing/asp.net-core-full-stack-development-projects-/tree/master/FlightAndHotelsAPI-master/"
    end

    %% Music Store Sample
    subgraph "Music Store Sample"
        direction LR
        Vue["Vue SPA"]:::frontend
        BuildV["Node.js/NPM/Webpack"]:::build
        APIv["ASP.NET Core API"]:::backend
        ControllersV["Controllers"]:::backend
        ServicesV["Services"]:::backend
        ReposV["Repositories/DbContext"]:::backend
        DBv["SQLite Database"]:::db

        Vue -->|"build & serve"| BuildV
        BuildV -->|"HTTP Requests"| APIv
        APIv --> ControllersV
        ControllersV --> ServicesV
        ServicesV --> ReposV
        ReposV --> DBv

        click Vue "https://github.com/packtpublishing/asp.net-core-full-stack-development-projects-/tree/master/MusicStoreVUE-master/"
        click APIv "https://github.com/packtpublishing/asp.net-core-full-stack-development-projects-/tree/master/MusicStoreAPI-master/"
    end

    classDef frontend fill:#89CFF0,stroke:#333,stroke-width:1px
    classDef build fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef backend fill:#90EE90,stroke:#333,stroke-width:1px
    classDef db fill:#D3D3D3,stroke:#333,stroke-width:1px
```
