MarcelMichau/fake-survey-generator
58.1
Adequate · 20 September 2026
3k
lines of production code
C#
with TypeScript
4
measurements over time
What this system is
This system is a Fake Survey Generator that allows users to create, manage, and analyze surveys through a web interface and API. It supports semantic analysis of survey questions for bias and coverage, and simulates respondent data using various vote distribution strategies. The application handles user authentication, survey persistence, and background monitoring, all orchestrated via .NET Aspire for local development and Azure infrastructure.
How it got here
2018–2022 — Initial scaffolding and infrastructure modernization
10 changes.
The project was initialized with a .NET 11 and Aspire-based architecture, establishing the core server-side components and a modular Azure infrastructure using Bicep. The frontend was rebuilt with Vite, TypeScript, and Auth0, introducing a new component library and type-safe interfaces for survey management. Concurrently, the backend integrated a background worker for monitoring and replaced MediatR with a custom command/query handler to support semantic survey analysis.
2023 — Application layer implementation and testing
21 changes.
This period focused on implementing the core application layer, including domain models for surveys and users, persistence with EF Core, and custom command/query handlers. It also established comprehensive test coverage through unit tests for domain logic and integration tests using .NET Aspire and Playwright.
2024–2026 — Modernization and infrastructure overhaul
8 changes.
This period focused on modernizing the development and runtime environment by introducing Aspire for local orchestration, .NET 9 HybridCache, and centralized service defaults with OpenTelemetry telemetry. The team also refactored core application logic by implementing a new Domain Events system and migrating UI tests to Vitest, while adding comprehensive test coverage for domain entities and semantic analysis.
Features
Add notification message model and simulated service
Introduced a MessageModel record to define notification payloads and a NotificationService implementation that simulates sending messages by logging them, providing the initial infrastructure for the notification feature.
src/server/FakeSurveyGenerator.Application/Features/Notifications, src/server/FakeSurveyGenerator.Application/Infrastructure/Notifications · high confidence
Added Bruno API collection for the Fake Survey Generator API
A new Bruno API collection has been added to the \api-collections\ directory, providing a structured set of HTTP requests for testing the Fake Survey Generator API. The collection includes endpoints for Admin operations (version check, ping, and secret retrieval), Survey management (create, retrieve by ID, and list by user), and User management (registration, retrieval, and registration status check). It also includes a Bruno configuration file and a Production environment definition pointing to \https://fakesurveygenerator.mysecondarydomain.com\.
api-collections · high confidence
Added centralized service defaults for health checks, telemetry, and resilience
The ServiceDefaults project now provides a shared extension library that configures common infrastructure for all services in the solution. This includes automatic service discovery, HTTP resilience handlers, and OpenTelemetry instrumentation for metrics, traces, and logs. It also registers default health checks and maps /health and /alive endpoints in development environments, while supporting OpenTelemetry Protocol (OTLP) and Azure Monitor exporters based on configuration.
src/server/FakeSurveyGenerator.ServiceDefaults · high confidence
Initial database schema migration for Survey, User, and SurveyOption entities
Added the initial Entity Framework Core migration (20231021132053\_CleanState) and model snapshot, establishing the database schema for the application. This migration creates the Survey, User, and SurveyOption tables within the Survey schema, defines the foreign key relationship where Surveys are owned by Users with cascade deletion, and sets up HiLo identity generation sequences for efficient ID allocation.
src/server/FakeSurveyGenerator.Application/Infrastructure/Migrations · high confidence
Initial project scaffolding with .NET 11 SDK and Aspire configuration
The repository has been initialized with a new solution structure using the .slnx format, defining the server-side components (API, Worker, AppHost, ServiceDefaults) and test projects. The project targets the .NET 11 SDK (version 11.0.100-rc.1) and includes configuration for the .NET Aspire application host via \aspire.config.json\ and \azure.yaml\. Essential development files such as \.editorconfig\, \.dockerignore\, \NuGet.config\, and a comprehensive \.gitignore\ have been added to standardize coding styles, container builds, and package sources.
(repo-wide) · high confidence
Introduce Aspire-based local development environment with Dapr and Vite frontend
The application now uses an Aspire AppHost to orchestrate local development services, replacing previous setup methods. This configuration provisions a SQL Server database, a Redis cache with Redis Insight, and a Dapr sidecar for the API service, ensuring the API waits for these dependencies before starting. The Vite-based frontend is integrated as a managed resource with HTTPS developer certificate support and health checks, while the background worker is also wired to the database and cache. This change simplifies local environment setup and ensures consistent dependency management for developers.
src/server/FakeSurveyGenerator.AppHost · high confidence
Introduce TypeSafe semantic survey analysis and custom command/query handlers
The application now supports semantic analysis of survey questions via the external TypeSafe API, allowing users to receive feedback on question clarity, bias, and coverage. This feature is implemented through a new \TypeSafeSurveySemanticAnalyzer\ and its configuration, which is wired into the service collection. Additionally, the application layer has replaced the previous MediatR dependency with a custom, lightweight command and query handler infrastructure defined in \Handlers.cs\, streamlining how commands like \CreateSurveyCommand\ and queries like \GetUserSurveysQuery\ are dispatched and handled.
src/server/FakeSurveyGenerator.Application · high confidence
Introduce core domain model base classes and interfaces
The SeedWork layer now provides foundational building blocks for the domain model, including a generic Entity base class with strongly-typed identifiers, equality checks, and built-in domain event management, alongside a non-generic Entity for backward compatibility. An AuditableEntity class has been added to support tracking creation and modification metadata (user and timestamp). Additionally, an Enumeration base class is introduced to simplify the implementation of strongly-typed enumerations with value-based equality and lookup capabilities, and an IAggregateRoot marker interface is defined to identify aggregate roots within the domain.
src/server/FakeSurveyGenerator.Application/Domain/Shared/SeedWork · high confidence
Introduce dedicated background worker for periodic survey monitoring
A new background worker service has been added to the application, implemented as a .NET 11 RC1 hosted service that runs on a 10-second interval. This worker periodically queries the database to count the total number of surveys and logs the result, providing a mechanism for ongoing system health or data volume monitoring. The component includes its own Dockerfile for containerized deployment, launch settings for local development, and a dependency lock file reflecting the .NET 11 runtime and associated Aspire/EF Core packages.
src/server/FakeSurveyGenerator.Worker · high confidence
Introduce semantic survey analysis and delete capability
Users can now analyze the semantic quality of a survey topic and respondent type to receive warnings about potential bias or coverage issues, and can delete existing surveys. The delete operation is integrated with the new HybridCache to ensure cached survey data is removed upon deletion. Additionally, the system now uses custom mapping extensions instead of AutoMapper for converting domain entities to models.
src/server/FakeSurveyGenerator.Application/Features/Surveys · high confidence
Introduce shared application infrastructure for auditing, errors, identity, and notifications
This change adds a new set of shared application-layer components that standardize how the system handles cross-cutting concerns. It introduces an \AuditableModel\ record to enforce creation and modification metadata on domain entities, a structured error handling system using \CSharpFunctionalExtensions\ with specific error types for validation and general failures, and interfaces for user identity (\IUser\, \IUserService\) and notifications (\INotificationService\). These additions provide the foundational contracts and base classes required for consistent data tracking, error reporting, and user context across the application.
src/server/FakeSurveyGenerator.Application/Shared · high confidence
Introduce survey domain model with validation and vote distribution logic
The application now includes core domain entities for Surveys and Users, enabling the creation of surveys with specific topics, respondent counts, and option texts. The Survey entity enforces business rules such as preventing duplicate options, ensuring respondent counts are positive, and validating that preferred vote allocations do not exceed the total number of respondents. It also supports calculating outcomes using different vote distribution strategies (random, fixed, or one-sided) and tracks whether a survey is rigged based on preferred votes. A new domain event is raised when a survey is created, and a dedicated exception type handles domain-specific validation errors.
src/server/FakeSurveyGenerator.Application/Domain/Surveys · high confidence
Introduction of TypeScript type definitions for survey and user models
A new \src/client/ui/src/types/index.ts\ file has been added to the UI client, introducing a comprehensive set of TypeScript interfaces and types. These definitions cover core domain entities such as \UserModel\, \SurveyModel\, \UserSurveyModel\, and \SurveyOptionModel\, as well as specific data structures for survey creation (\CreateSurveyCommand\), analysis results (\SurveyAnalysisModel\, \SurveyAnalysisWarningModel\), and API error handling (\ExceptionMessage\, \ResponseException\). This change provides the necessary type safety for the frontend components interacting with the survey and user APIs.
src/client/ui/src/types · high confidence
New UI component library and My Surveys feature
The UI components have been rewritten in TypeScript and now include a comprehensive set of reusable elements: Alert, AuthButton (using Auth0), Button (with primary/secondary/destructive variants), ConfirmDialog, Field, Footer, NavBar, SkeletonButton, and VersionInfo. A new MySurveys component has been added, allowing users to view a table of their surveys and delete them via a confirmation dialog. Supporting components for survey creation and retrieval (CreateSurvey, GetSurvey, SurveyResult, Splash) are also included, along with their corresponding Vitest browser tests.
src/client/ui/src/components · high confidence
New vote distribution strategies for survey simulations
The survey simulation domain now supports multiple vote distribution strategies via the IVoteDistribution interface. Users can now generate survey results using fixed distributions (assigning votes based on preferred counts), one-sided distributions (concentrating all votes on a single random option), or random distributions (spreading votes evenly across all options). These strategies allow for more varied and realistic survey data generation within the application.
src/server/FakeSurveyGenerator.Application/Domain/Surveys/VoteDistributions · high confidence
Architecture
Restructured infrastructure into modular Bicep components with updated Azure resource versions
The infrastructure definition in infra/modules has been reorganized into distinct, reusable Bicep modules (appInsights, compute, containerAppEnvironment, containerRegistry, daprComponent, deploymentScriptStorage, dnsZone, keyVault, logAnalytics, managedIdentity, redisCache, redisContainerApp, redisPassword, sql, and virtualNetwork). This change updates the Azure Resource Provider API versions to newer releases (e.g., Container Apps 2026-01-01, Key Vault 2025-05-01, Managed Identity 2025-05-31-preview) and introduces new capabilities such as a dedicated module for generating and storing Redis passwords in Key Vault, a Container App-based Redis deployment, and VNet-restricted SQL deployment scripts. The modular structure improves maintainability and allows specific resources like the Container App Environment and Dapr secret stores to be configured with precise dependencies and outputs.
infra/modules · high confidence
Restructured infrastructure with standardized naming and modular Bicep templates
The infrastructure deployment has been reorganized into a modular structure using new Bicep files (main.bicep, api.bicep) and a centralized abbreviations.json file to enforce consistent Azure resource naming conventions. This change introduces a new Container App for the API service, configures it with managed identity and environment variables, and updates the main deployment to provision supporting resources like Key Vault, SQL, and a Redis Cache module, ensuring all resource names follow the defined abbreviation standards.
infra · high confidence
Behavioural changes
API server restructured with modular configuration and consolidated frontend serving
The API project has been reorganized into a modular architecture where configuration logic (authentication, Dapr, OpenAPI, health checks, security headers, and forwarded headers) is extracted into dedicated extension classes, simplifying the main Program.cs entry point. The server now serves the frontend application directly via static files, consolidating the UI into the API container and removing the need for a separate frontend service or CORS configuration. Additionally, new admin endpoints have been added to expose version information, a health ping, and a secret test route, while survey and user endpoints now utilize custom endpoint filters for structured request and validation logging.
src/server/FakeSurveyGenerator.Api · high confidence
Introduce custom query/command handlers for user operations
The application now implements user-related features using a custom dispatching pattern instead of MediatR. This includes new handlers for retrieving user details (GetUserQuery), checking registration status (IsUserRegisteredQuery), and registering new users (RegisterUserCommand). The registration process is now idempotent, returning existing user data if the user is already registered. User data mapping has been replaced with explicit extension methods, removing the dependency on AutoMapper.
src/server/FakeSurveyGenerator.Application/Features/Users · high confidence
Introduction of a new Domain Events system
The application now includes a new Domain Events infrastructure within the \FakeSurveyGenerator.Application.DomainEvents\ namespace. This change introduces core abstractions including the \IDomainEvent\ interface, an abstract \DomainEvent\ record, and the \IDomainEventHandler\<T\>\ interface for processing events. It also provides the \IEventBus\ interface and a concrete \DomainEventPublisher\ implementation that uses dependency injection to locate and execute registered handlers for published domain events, replacing the previous EventBus mechanism.
src/server/FakeSurveyGenerator.Application/DomainEvents · high confidence
Migrate authentication to Auth0 and update UI framework
The client UI now uses Auth0 for user authentication, replacing the previous implementation with the @auth0/auth0-react package and configuring providers via auth\_config.json. The application has been migrated to Vite as the build tool, and the UI styling has been updated to Tailwind CSS v4 with new fade-in and slide-up animations. The main App component now integrates these changes, handling user registration and displaying survey creation, retrieval, and management interfaces.
src/client/ui/src · high confidence
Migrate caching infrastructure to .NET 9 HybridCache
The application's caching layer has been updated to use the new .NET 9 HybridCache API, replacing the previous distributed cache implementation. This change involves a new configuration extension that registers the HybridCache service and sets up the Redis client connection string based on specific configuration keys, ensuring that both hostname and password are provided together for secure connectivity.
src/server/FakeSurveyGenerator.Application/Infrastructure/Caching · high confidence
Migrate frontend build tooling to Vite and Vitest
The client UI has moved from the previous setup to Vite as the build and development server, with a corresponding shift to Vitest for testing. This change introduces a new Vite configuration that proxies API requests to the backend, enabling seamless local development and integration testing. The testing infrastructure is updated to use Vitest with Playwright for browser-based tests, replacing the prior test runner. Additionally, the project now uses Biome for code formatting and linting, and TypeScript configuration has been updated to align with Vite's module resolution requirements.
src/client/ui · high confidence
New EF Core persistence layer with domain event publishing and audit tracking
The application now uses Entity Framework Core with a new \SurveyContext\ to manage data persistence for Surveys and Users. This change introduces automatic audit tracking (CreatedOn, ModifiedOn, etc.) via the \AuditableEntitySaveChangesInterceptor\ and ensures domain events are published to the event bus immediately upon saving changes through the new \PublishDomainEventsInterceptor\. The database schema is configured with specific entity mappings, including HiLo ID generation and owned entity support for survey options, and relies on a SQL Server connection.
src/server/FakeSurveyGenerator.Application/Infrastructure/Persistence · high confidence
Refactor identity infrastructure with new token provider and OAuth services
The identity infrastructure layer has been restructured to introduce a new ITokenProviderService interface and its JwtBearerTokenProviderService implementation, which extracts JWT tokens from the current HTTP context. OAuth user information retrieval is now handled by OAuthUserInfoService, which leverages HybridCache for caching and includes resilience handlers for timeouts and circuit breaking when communicating with the identity provider. Additionally, new services and models have been added to support SystemUser and UnauthorizedUser scenarios, providing distinct behaviors for internal system operations and unauthenticated access respectively.
src/server/FakeSurveyGenerator.Application/Infrastructure/Identity · high confidence
Test coverage
Add Aspire-based acceptance tests with Playwright E2E coverage; Added TestUser helper for simplified test setup; Added integration tests for cache, forwarded headers, and API documentation endpoints; Added integration tests for survey and admin API endpoints; Added integration tests for user endpoints; Added test infrastructure for survey application integration tests; Added tests for Entity domain base class behavior; Added tests for TypeSafe survey semantic analysis; Added unit tests for Survey domain logic; Added unit tests for survey command and query handlers; Added unit tests for user query and command handlers; Migrated UI test infrastructure to Vitest Browser mode; Refactored integration test infrastructure to use Aspire and custom test helpers.
Dependencies
Broad dependency updates across .NET and JavaScript/TypeScript stacks
This release updates dependencies across the application, including .NET packages such as FluentAssertions, Dapr.AspNetCore, Microsoft.Extensions.Configuration.Abstractions, and CSharpFunctionalExtensions, as well as JavaScript/TypeScript packages in the client UI like @types/react, @types/node, @testing-library/react, tailwindcss, and postcss. The Aspire SDK and related packages are also updated to version 13.2.2, and the TUnit testing framework is upgraded to version 0.67.0.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 58.
Lenses
- Code Health 85
- Architecture 84
- Maturity 57
- Readiness 51
- Security 68
- Domain Modelling 67
- Event-Driven 100
- Accessibility 66
Changes since last survey
- 300 commits — 271 feature/other, 29 fixes
By area
- src/server — 114 commits
- src/client — 55 commits
- (repo) — 46 commits
- .azdo/pipelines — 20 commits
- infra/modules — 19 commits
- (root) — 13 commits
- .config/dotnet-tools.json — 12 commits
- infra/api.bicep — 9 commits
- .agents/skills — 2 commits
- .github/dependabot.yml — 2 commits
- infra/tests — 2 commits
- .codegraph/.gitignore — 1 commit
- .github/skills — 1 commit
- infra/main.bicep — 1 commit
- infra/ui.bicep — 1 commit
- scripts/CreateDatabaseMigrationScript.ps1 — 1 commit
- scripts/ProvisionSqlDatabase.ps1 — 1 commit
Notable commits
- fix: Fix CS1061: expose DistributedApplication via OnBuilt override and use ResourceNotifications
- fix: Merge pull request #2639 from MarcelMichau/fix/survey-domain-exception-ui-handling
- fix: Revert infra changes from 706797dc
- fix: fix(infra): execute SQL DDL through sp_executesql (#2810)
- fix: fix(infra): reuse Front Door wildcard route (#2814)
- fix: fix(infra): run deployment scripts within the VNet (#2809)
- fix: fix(infra): use Redis Container App name for internal host (#2811)
- fix: fix(tests): address flaky integration tests
- fix: fix: add 'production' label to container app traffic configuration
- fix: fix: correct path for compute module in main.bicep
- fix: fix: enhance frontend test command and add test results publishing
- fix: fix: include infrastructure in API version height (#2812)
- fix: fix: remove unnecessary host and port configuration from Vite server settings
- fix: fix: replace dots with dashes in version for container app revision suffix
- fix: fix: restore host configuration for Playwright integration tests in Vite server settings
- fix: fix: ui version tag variable from stage dependencies bump frontend version.json to align with version in package.json
- fix: fix: update Microsoft.Data.SqlClient to version 7.0.2 and synchronize dependencies across multiple projects
- fix: fix: update README to reflect changes from microservice to distributed application
- fix: fix: update SSL_CERT_DIR for trusting .NET Dev Certs
- fix: fix: update Scalar.AspNetCore dependency from 2.11.7 to 2.11.8 and comment out trust .NET Dev Certs script
- …and 280 more
API surface
- 11 HTTP endpoints (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
MarcelMichau/fake-survey-generator was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 0638ab5c82ca29751469ba2fde84a5326e3b65e1 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.