How davidfowl/todoapp works
Project type and purpose
• This is a full-stack ASP.NET Core “Todo” application:
– Front end: Blazor WebAssembly hosted by an ASP.NET Core server (Todo.Web)
– Back end: Minimal-API REST service with EF Core + SQLite (Todo.Api)
– AppHost: orchestrator that boots both front-end host and API via .NET Aspire (TodoApp.AppHost)
• It demonstrates authentication (cookie + bearer + external/OIDC), YARP proxying, rate limiting, OpenAPI/Swagger, EF migrations, OpenTelemetry, and integration testing.
File structure
• Top-level solution (TodoApp.sln) includes:
• Todo.Web
– Client (WASM UI components, shared DTOs, static assets)
– Server (hosts the WASM app, implements cookie auth, forwards API calls via YARP, OpenTelemetry, rate limiting)
• Todo.Api
– Minimal API endpoints (UsersApi, TodoApi), EF Core DbContext, migrations, OpenAPI setup, custom filters (validation), authorization handlers
• TodoApp.AppHost
– Single executable entry point that configures and runs both Todo.Web/Server and Todo.Api
• TodoApp.ServiceDefaults
– Shared extension methods to DRY up service registrations
• Todo.Web.Shared
– Shared models/DTOs between client and server
• Todo.Api.Tests
– Integration tests for API (in-memory database, token service mocks)
• Notice configuration files (appsettings.json, launchSettings), CI workflow, devcontainers, and global.json/nuget.config.
Key architecture insights from README
• Hosted Blazor WASM + minimal REST API
• YARP’s IHttpForwarder proxies front-end server calls to API
• ASP.NET Core Identity (cookie + bearer + external providers)
• OpenTelemetry instrumentation
• SQLite via EF Core
• Integration tests exercising the full API
Details to capture
– The multi-host setup via .NET Aspire (AppHost)
– The dual-authentication mechanisms (cookie for UI, bearer for API)
– Proxying by YARP (path‐based routing)
– External identity provider integrations
– OpenTelemetry telemetry flows
– EF Core migrations & SQLite as the persistence layer