How markharrison/colorsweb works
Project Type & Purpose
– Full-stack web application using ASP.NET Core Razor Pages (.NET 9.0).
– Built and deployed as a Docker container via GitHub Actions into Azure.
File Structure
– Top level:
• Program.cs, Pages/, Models/, appsettings.json → core ASP.NET app
• site/ + Gruntfile.js + package.json → front-end assets (LESS, JS) build
• Dockerfile, .devcontainer/ → containerization and dev environment
• .github/workflows/containerbuildpush.yml → CI/CD pipeline
• infra/ → infrastructure‐as‐code for Azure deployment
– Pages/ follows Razor-Pages pattern (Views + PageModels).
– Models/ holds domain objects (ColorsItem).
– static assets compiled into wwwroot/ by Grunt.
Extract Additional Insights from README
– Environment variable ASPNETCORE_HTTP_PORTS configures container ports.
– Hosted as a container on Azure Web Apps (demo URL provided).
– Related API service lives in a separate repo (ColorsAPI).
Main Components & Their Interactions
a. Components
1. Client Browser
2. ASP.NET Core Razor Pages App (server-side)
– Pages + PageModels
– Models layer
– Configuration subsystem (appsettings.json + env vars)
3. Front-end build pipeline (Node.js + Grunt → LESS, JS → wwwroot/)
4. Docker container image
5. GitHub Actions CI/CD
– Builds .NET app + front-end assets
– Builds and pushes container to GitHub Container Registry
6. Infra as Code (infra/)
– Deploys container to Azure Web App
7. (Optional) External ColorsAPI service
b. Interactions
– Developer commits → GitHub Actions triggered →
• npm/Grunt task → compiles LESS & JS → copies to wwwroot/
• dotnet build/publish → produces site artifacts
• docker build → container image → push to GHCR
• infra IaC deploy step → update Azure Web App with new image
– Client → HTTPS → Azure Web App → container → Razor Pages render HTML → client.
c. Architectural Patterns & Principles
– Layered separation: Presentation (Razor Views) / Domain (Models) / Config
– Server-side rendering (Razor Pages)
– Static asset pipeline (LESS → CSS, JS bundling)
– Containerization for consistency across envs
– GitOps/CI-driven deployments (GitHub Actions + IaC)
d. Key Technologies & Frameworks
– ASP.NET Core 9.0 (Razor Pages)
– .NET CLI & MSBuild
– Node.js + npm + Grunt
– Docker
– GitHub Actions
– Azure Web Apps (container host)
– Infra folder (ARM/Bicep/Terraform – check infra/README)