dev portfolio api README.md
When I set out to build my personal portfolio and technical blog, I intentionally avoided ready-made CMS platforms or bloated, monolithic frameworks. As a software engineer, my goal was to turn the platform itself into a core case study in software engineering: a modular, decoupled, and secure solution designed to run in production with zero infrastructure costs.
In this inaugural post, I break down the architectural decisions, design patterns, and continuous delivery pipeline powering the Dev Portfolio & Headless Blog API.
The API was designed from the ground up as a canonical backend engine adhering to core principles:
pt-BR and en-US), enforced at the database level via translation grouping (TranslationGroupId) with unique constraints per language.The application follows a pragmatic three-layer Clean Architecture model, isolating pure business invariants from delivery mechanisms and persistence details:
graph TD
subgraph Presentation ["Presentation Layer (Blog.Api)"]
Routes["Minimal API Endpoints<br>(/posts, /categories, /auth)"]
AuthMid["JWT Bearer Authentication & Policies"]
ExHandler["GlobalExceptionHandler (RFC 7807)"]
Swagger["Swagger UI & OpenAPI Explorer"]
end
subgraph Application ["Application Layer (Blog.Application)"]
VS_Posts["Posts Slices<br>(Create, Update, Publish, SoftDelete, Feeds)"]
VS_Drafts["Drafts Slices<br>(ListDrafts, GetDraftById)"]
VS_Categories["Categories Slices<br>(List, GetBySlug, Create)"]
VS_Auth["Auth Slices<br>(LoginHandler, JWT Token Generation)"]
end
subgraph Domain ["Domain Layer (Blog.Domain)"]
Entities["Entities<br>(Post, Category, Tag, User)"]
Enums["Enums (PostStatus: Draft, Published, Archived)"]
Interfaces["Repository Interfaces<br>(IPostRepository, ICategoryRepository, IUserRepository)"]
Helpers["SlugHelper & Password Hashing Contracts"]
end
subgraph Infrastructure ["Infrastructure & Persistence (Blog.Api/Data)"]
EF["Entity Framework Core 8 (AppDbContext)"]
PG[("PostgreSQL Database (Supabase)")]
end
Routes --> VS_Posts & VS_Drafts & VS_Categories & VS_Auth
VS_Posts & VS_Drafts & VS_Categories & VS_Auth --> Interfaces
VS_Posts & VS_Drafts & VS_Categories & VS_Auth --> Entities
EF --> PG
Interfaces -.->|Implemented by| EF