# msgmarketing/wpfw-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/msgmarketing/wpfw-portfolio
- Repository: https://github.com/msgmarketing/wpfw-portfolio

## Overview

WPFW Portfolio is a portfolio web application with an ASP.NET Core API for authentication and role-protected project and blogpost management, alongside static portfolio, project, blog, and contact pages. The API workflow routes requests through controllers to services and then the EF Core context; Identity and SQL Server provide supporting state. The tree also shows browser-side scripts, but their API wiring is not established by the available excerpts. The backend startup and controller-to-service links are excerpted; some subsystem details are known only from the tree and source index.

Main entry points: [`PortfolioBackend/Program.cs`](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Program.cs) (API Startup), [`PortfolioBackend/Data/AppDbContext.cs`](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Data/AppDbContext.cs) (EF Core Context), [`PortfolioBackend/Services/ProjectService.cs`](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/ProjectService.cs) (Project Service), [`PortfolioBackend/Services/BlogpostService.cs`](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/BlogpostService.cs) (Blogpost Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portfolio Website"]
  node_pages["Portfolio Pages<br/>[index.html]"]
  node_project_ui["Project Browser<br/>[projects.js]"]
  node_blog_ui["Blog Browser<br/>[blog.js]"]
  node_contact_ui["Contact Form<br/>[contact.js]"]
  node_api_client["Browser API Helper<br/>[api.js]"]
end

subgraph group_api["API Endpoints"]
  node_auth["Authentication API<br/>[AuthController.cs]"]
  node_project_controller["Projects API"]
  node_blog_controller["Blogposts API"]
  node_startup["API Startup<br/>[Program.cs]"]
end

subgraph group_services["Domain Services"]
  node_project_service["Project Service<br/>[ProjectService.cs]"]
  node_blog_service["Blogpost Service<br/>[BlogpostService.cs]"]
  node_project_contract["Project Service Contract<br/>[IProjectService.cs]"]
  node_blog_contract["Blogpost Service Contract"]
end

subgraph group_persistence["Persistence And Identity"]
  node_db_context["EF Core Context<br/>[AppDbContext.cs]"]
  node_project_entity["Project Records<br/>[Project.cs]"]
  node_blog_entity["Blogpost Records<br/>[Blogpost.cs]"]
  node_db_initializer["Identity Seeder<br/>[DbInitializer.cs]"]
end

node_visitor(("Visitor / Editor"))
node_sql_server[("SQL Server")]

node_visitor -.->|"views"| node_pages
node_visitor -.->|"authenticates"| node_auth
node_startup -->|"registers"| node_db_context
node_startup -->|"registers"| node_project_service
node_startup -->|"registers"| node_blog_service
node_startup -->|"seeds roles"| node_db_initializer
node_startup -->|"configures provider"| node_sql_server
node_project_controller -->|"calls"| node_project_contract
node_blog_controller -->|"calls"| node_blog_contract
node_project_service -->|"reads and writes"| node_db_context
node_blog_service -->|"reads and writes"| node_db_context
node_db_context -->|"maps"| node_project_entity
node_db_context -->|"maps"| node_blog_entity

click node_pages "https://github.com/msgmarketing/wpfw-portfolio/blob/main/index.html"
click node_project_ui "https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/projects.js"
click node_blog_ui "https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/blog.js"
click node_contact_ui "https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/contact.js"
click node_api_client "https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/api.js"
click node_auth "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Controllers/AuthController.cs"
click node_project_controller "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Controllers/ProjectsControllers.cs"
click node_blog_controller "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Controllers/BlogpostsController.cs"
click node_project_service "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/ProjectService.cs"
click node_blog_service "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/BlogpostService.cs"
click node_project_contract "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/Interfaces/IProjectService.cs"
click node_blog_contract "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/Interfaces/IBlogpostService.cs"
click node_startup "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Program.cs"
click node_db_context "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Data/AppDbContext.cs"
click node_project_entity "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Models/Entities/Project.cs"
click node_blog_entity "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Models/Entities/Blogpost.cs"
click node_db_initializer "https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Data/DbInitializer.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_pages,node_project_ui,node_blog_ui,node_contact_ui,node_api_client toneBlue
class node_auth,node_project_controller,node_blog_controller,node_startup,node_sql_server toneAmber
class node_project_service,node_blog_service,node_project_contract,node_blog_contract toneMint
class node_db_context,node_project_entity,node_blog_entity,node_db_initializer toneRose
class node_visitor toneIndigo
```

## Components

### Portfolio Website

- [Portfolio Pages](https://github.com/msgmarketing/wpfw-portfolio/blob/main/index.html): `index.html`
- [Project Browser](https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/projects.js): `js/projects.js`
- [Blog Browser](https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/blog.js): `js/blog.js`
- [Contact Form](https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/contact.js): `js/contact.js`
- [Browser API Helper](https://github.com/msgmarketing/wpfw-portfolio/blob/main/js/api.js): `js/api.js`

### API Endpoints

- [Authentication API](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Controllers/AuthController.cs): `PortfolioBackend/Controllers/AuthController.cs`
- [Projects API](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Controllers/ProjectsControllers.cs): `PortfolioBackend/Controllers/ProjectsControllers.cs`
- [Blogposts API](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Controllers/BlogpostsController.cs): `PortfolioBackend/Controllers/BlogpostsController.cs`
- [API Startup](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Program.cs): `PortfolioBackend/Program.cs`

### Domain Services

- [Project Service](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/ProjectService.cs): `PortfolioBackend/Services/ProjectService.cs`
- [Blogpost Service](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/BlogpostService.cs): `PortfolioBackend/Services/BlogpostService.cs`
- [Project Service Contract](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/Interfaces/IProjectService.cs): `PortfolioBackend/Services/Interfaces/IProjectService.cs`
- [Blogpost Service Contract](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Services/Interfaces/IBlogpostService.cs): `PortfolioBackend/Services/Interfaces/IBlogpostService.cs`

### Persistence And Identity

- [EF Core Context](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Data/AppDbContext.cs): `PortfolioBackend/Data/AppDbContext.cs`
- [Project Records](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Models/Entities/Project.cs): `PortfolioBackend/Models/Entities/Project.cs`
- [Blogpost Records](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Models/Entities/Blogpost.cs): `PortfolioBackend/Models/Entities/Blogpost.cs`
- [Identity Seeder](https://github.com/msgmarketing/wpfw-portfolio/blob/main/PortfolioBackend/Data/DbInitializer.cs): `PortfolioBackend/Data/DbInitializer.cs`

### Other components

- **Visitor / Editor**
- **SQL Server**

## Connections

- Visitor / Editor → Portfolio Pages: views
- Visitor / Editor → Authentication API: authenticates
- API Startup → EF Core Context: registers (evidence: `PortfolioBackend/Program.cs`)
- API Startup → Project Service: registers (evidence: `PortfolioBackend/Program.cs`)
- API Startup → Blogpost Service: registers (evidence: `PortfolioBackend/Program.cs`)
- API Startup → Identity Seeder: seeds roles (evidence: `PortfolioBackend/Program.cs`)
- API Startup → SQL Server: configures provider (evidence: `PortfolioBackend/Program.cs`)
- Projects API → Project Service Contract: calls (evidence: `PortfolioBackend/Controllers/ProjectsControllers.cs`)
- Blogposts API → Blogpost Service Contract: calls (evidence: `PortfolioBackend/Controllers/BlogpostsController.cs`)
- Project Service → EF Core Context: reads and writes (evidence: `PortfolioBackend/Services/ProjectService.cs`)
- Blogpost Service → EF Core Context: reads and writes (evidence: `PortfolioBackend/Services/BlogpostService.cs`)
- EF Core Context → Project Records: maps (evidence: `PortfolioBackend/Data/AppDbContext.cs`)
- EF Core Context → Blogpost Records: maps (evidence: `PortfolioBackend/Data/AppDbContext.cs`)
