Skip to main content

Building a Portfolio Builder Kit with Angular 19 & .NET 9

ยท 3 min read
Ali Safari
Full-Stack Software Engineer | Clean Architecture | AI & Data Enthusiast

Architecture Overview for Multi-User Portfoliosโ€‹

This document describes the architecture and design of a multi-user portfolio builder implemented using:

  • Backend: ASP.NET Core 9 (Web API)
  • Frontend: Angular (Portfolio Builder Kit aka asafarim-pbk)
  • Architecture: Clean Architecture with Domain-Driven Design (DDD)

Goalsโ€‹

  • Allow authenticated users to create, edit, and publish personal portfolios.
  • Ensure each portfolio is scoped to a specific user.
  • Enable public browsing of portfolios with role-based restrictions.
  • Showcase multi-framework interoperability in a Clean Architecture.
  • Prepare the portfolio module for future open-source release.

Domain Entity: Portfolioโ€‹

public class Portfolio : BaseEntity
{
public Guid OwnerId { get; set; }
public string Title { get; set; } = string.Empty;
public string Summary { get; set; } = string.Empty;
public string AboutMarkdown { get; set; } = string.Empty;
public string ExperienceMarkdown { get; set; } = string.Empty;
public string PublicationsMarkdown { get; set; } = string.Empty;
public string FundingMarkdown { get; set; } = string.Empty;
public VisibilityEnum Visibility { get; set; } = VisibilityEnum.Public;

public User Owner { get; set; } = null!;
}

API Endpointsโ€‹

MethodRouteDescription
GET/api/portfoliosList all portfolios (non-guest only)
GET/api/portfolios/user/{userId}View a user's portfolio
POST/api/portfoliosCreate new portfolio (self)
PUT/api/portfolios/{userId}Update portfolio (admin or owner)
DELETE/api/portfolios/{userId}Delete portfolio (admin or owner)

Angular Frontend Routesโ€‹

PathComponentAccess
/portfoliosPortfolioListComponentAll except guests
/portfolios/:userIdPortfolioViewComponentPublic
/portfolio/:userId/createPortfolioCreateComponentAuthenticated user
/portfolio/:userId/editPortfolioEditComponentAdmin / Owner only
/portfolio/:userId/deletePortfolioDeleteComponentAdmin / Owner only

File Structure (asafarim-pbk)โ€‹

src/
โ”œโ”€โ”€ app/
โ”‚ โ”œโ”€โ”€ layout/
โ”‚ โ”‚ โ”œโ”€โ”€ navbar/
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ navbar.component.ts
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ navbar.component.html
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ navbar.component.scss
โ”‚ โ”‚ โ”œโ”€โ”€ footer/
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ footer.component.ts
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ footer.component.html
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ footer.component.scss
โ”‚ โ”‚ โ””โ”€โ”€ layout.component.ts
โ”‚ โ”‚ โ””โ”€โ”€ layout.component.html
โ”‚ โ”‚ โ””โ”€โ”€ layout.component.scss
โ”‚ โ”œโ”€โ”€ portfolio/
โ”‚ โ”‚ โ”œโ”€โ”€ portfolio-list/
โ”‚ โ”‚ โ”œโ”€โ”€ portfolio-view/
โ”‚ โ”‚ โ”œโ”€โ”€ portfolio-create/
โ”‚ โ”‚ โ”œโ”€โ”€ portfolio-edit/
โ”‚ โ”‚ โ””โ”€โ”€ portfolio-delete/
โ”‚ โ””โ”€โ”€ app-routing.module.ts
โ”‚ โ””โ”€โ”€ app.module.ts
โ””โ”€โ”€ main.ts

Permissions Modelโ€‹

  • All Authenticated Users (except Guest): can view the portfolio list.
  • Only Admin/SuperAdmin or Portfolio Owner: can edit or delete a portfolio.
  • JWT tokens are used to identify roles and enforce access via guards/interceptors in Angular.

Angular App: asafarim-pbkโ€‹

The Angular app is fully modular:

ASafariM.Clients/
โ”œโ”€โ”€ asafarim-ui/ # ASafariM UI (React + TypeScript + Tailwind CSS)
โ”œโ”€โ”€ asafarim-blog/ # ASafariM Blog (React + Docusaurus Documentation Framework)
โ”œโ”€โ”€ asafarim-bibliography/ # ASafariM Bibliography (React + Redux Toolkit)
โ””โ”€โ”€ asafarim-pbk/ # ASafariM Portfolio Builder Kit (Angular)

Markdown Content Supportโ€‹

Each section of a portfolio (Experience, Publications, Funding, etc.) is authored using Markdown, allowing rich formatting with simple syntax.

Final Thoughtsโ€‹

This architecture is designed for scalability, maintainability, and openness. By isolating the portfolio feature as its own Angular app, the system ensures:

  • Clean separation of concerns
  • Easy deployment under a sub-route (/portfolio)
  • Great demo of polyglot frontend strategy

Stay tuned as this module evolves into a standalone, open-source-ready Portfolio Builder Kit.