How oneduckyboy/portfolioproject works
Project Type and Purpose
• This is a full-stack, layered ASP.NET Core MVC portfolio application used both as a live portfolio and a graduation thesis project.
• It follows a Clean (Onion) Architecture style, separating presentation, business logic, data access, and domain models into distinct projects.
File Structure Analysis
• Top-level “portfolio” folder = Presentation layer (ASP.NET Core MVC): Controllers, Razor Views, Identity UI, Program.cs, wwwroot, Dockerfile, appsettings.
• “Core” = Business layer: service interfaces & implementations, repository interfaces & base repository, email & image-upload service abstractions.
• “DataAccess” = Infrastructure layer: EF Core DbContext, migrations, Docker Compose + Dockerfile for SQL Server.
• “Models” = Domain layer: entity classes (User, Project, Category, Comment, Image, Role, etc.).
• “Utils” = Utility helpers (miscellaneous static helpers).
• “ProjectTests” = Test suite covering Controllers, Services, Repositories, Models, DataAccess migrations.
Key Technologies and Patterns
• ASP.NET Core MVC (Controllers + Razor Views)
• ASP.NET Identity (in Areas/Identity)
• Entity Framework Core (Repository pattern + DbContext + Migrations)
• Repository & Service patterns (interfaces in Core.Repositories, Core.Services)
• Docker Compose for local SQL Server
• xUnit (or MSTest) for unit/integration tests
• External services: Cloudinary (image upload), SMTP/email sender
Main Components
a. Presentation Layer (Blue)
• MVC Controllers (Home, Category, Project, Comment, Image, User)
• Razor Views & Static Assets (CSS/JS in wwwroot)
• Identity Razor Pages (Areas/Identity)
b. Business Layer (Green)
• Service Interfaces (IService, IImageUploadService, IEmailSender, etc.)
• Service Implementations (Service.cs, ImageUploadService, EmailSender)
c. Data Access Layer (Orange)
• Repository Interfaces (IRepository)
• Repository Implementation (Repository.cs)
• EF Core DbContext (ApplicationDbContext) + Migrations
• Dockerized SQL Server (docker-compose.yml, Dockerfile)
d. Domain Models Layer (Yellow)
• BaseEntity, User, Project, Category, Comment, Image, Role, LikedProjects, LikedComments
e. Utilities & Tests (Gray)
• Utils helper methods
• ProjectTests (unit + integration tests)
f. External Services (Red)
• Cloudinary API (image storage)
• SMTP / Email provider
Relationships & Data Flows
• User (Browser) → HTTP Request → MVC Controller
• Controller → calls appropriate Service interface
• Service → calls Repository interface
• Repository → interacts with EF Core DbContext → SQL Server (Docker)
• Service → may call external services:
• ImageUploadService → Cloudinary API
• EmailSender → SMTP/Email API
• ASP.NET Identity flows similarly through its own DbContext into SQL Server
• Test project mimics and validates these flows via mocks/fakes
Architectural Patterns & Design Principles
• Clean/Onion Architecture: strict layer independence, Dependency Inversion via interfaces
• Repository Pattern for data access abstraction
• Service Pattern for business rules
• MVC for presentation separation
• Dependency Injection (built into ASP.NET Core)
Essential Elements to Capture
• Separation of concerns across Core, DataAccess, Models, Utils, Presentation
• Interaction between ASP.NET Identity and your main DbContext
• Dockerized SQL Server environment
• External image/email services
• Automated tests sitting outside the main runtime flow