How gabrielvesal/devconfessions works
Project type and purpose
• Full-stack web application (ASP.NET Core MVC)
• Purpose: Let developers anonymously submit, read, edit, and share “confessions” stored in a JSON file
File structure
• Top-level project: DevConfessions.sln / DevConfessions/
• Controllers: HTTP endpoints (ConfessionsController.cs)
• Models: domain object (Confession.cs)
• Services: business/data access (DataConfessionService.cs)
• Views: Razor pages (Create, Edit, Index, Share)
• wwwroot: static assets (CSS, JS, bootstrap, jQuery) + data store (confessions.json)
• Program.cs + launchSettings.json: app startup, host configuration
• Dockerfile: containerization
README
• Confirms web-based platform for anonymous dev stories
• No external database—data is file-based
Main components & interactions
a. User’s Web Browser (UI)
– Loads HTML/CSS/JS (bootstrap, site.css, site.js)
– Sends HTTP requests (GET/POST) to the server
b. ASP.NET Core Web App (Container / Kestrel)
– Program.cs → configures Kestrel + middleware + routing
– MVC pipeline
c. Controllers (ConfessionsController)
– Receive user requests, call Services, choose Views or Redirect
d. Services (DataConfessionService)
– Encapsulate read/write of confessions.json in wwwroot/data
– Return domain Models to controllers
e. Domain Models (Confession)
– Represents a single confession (ID, Text, Date, etc.)
f. Views (Razor .cshtml)
– Render UI based on Models (Create/Edit/Index/Share pages)
g. Static Assets
– CSS & JS libraries served from wwwroot/lib/** and site.css, site.js
h. Data store (confessions.json)
– File-based “database” in wwwroot/data
Architectural patterns & principles
• MVC (Model-View-Controller) separation of concerns
• Single-page requests returning Razor views (server-rendered)
• File-based persistence (no external RDBMS)
• Containerization via Docker
Detailed layering (drill-down)
• Web App container: subdivide into
– Startup/Program (host + middleware)
– Controllers (ConfessionsController)
– Services (DataConfessionService)
– Models (Confession.cs)
– Views (Razor pages under Views/Confessions & Shared)
• Static file server (under wwwroot/lib & css/js)
Deployment context (optional)
• Docker container running on Linux host
• Could add —> “Container Registry” or “CI/CD pipeline” if relevant