Skip to content

CM-70 CM-77 CM-80 Refactoring: messaging, ui, docs - #79

Open
adedw wants to merge 24 commits into
masterfrom
adedw/CM-74
Open

CM-70 CM-77 CM-80 Refactoring: messaging, ui, docs#79
adedw wants to merge 24 commits into
masterfrom
adedw/CM-74

Conversation

@adedw

@adedw adedw commented Aug 8, 2026

Copy link
Copy Markdown
Owner

closes #70
closes #77
closes #80

adedw added 13 commits August 2, 2026 21:37
Upgrade the AppHost to Aspire 13.4.6 and TargetFramework net10.0; rename Program.cs to AppHost.cs. Bump Aspire package refs and dotnet tools (dotnet-ef -> 10.0.10, add aspire.cli). Update RabbitMQ and Postgres images (postgis/postgis 18-3.6, pgAdmin 9.17) and switch Mailhog -> MailPit (v1.30) with new MailPit package. Add aspire.config.json and nuget.config, provide development parameter defaults, rename some data volumes, and remove legacy Docker Compose, Dockerfile, launchSettings and dockerignore artifacts.
Upgrade projects to target .NET 10 (Mvc, EmailSender, Shared), refresh .gitattributes and .gitignore, and update several package versions. Add a new CommentMap.ServiceDefaults project with reusable Extensions (OpenTelemetry, health checks, service discovery, resilience) and wire project references to it. Replace the old .sln with a simple .slnx manifest, remove some Docker props from the MVC csproj, and add a clear.ps1 helper to remove bin/obj folders.
Migrate messaging from MassTransit to Wolverine (add Wolverine/Wolverine.RabbitMQ packages, enable static codegen and RunJasperFxCommands). Update EmailSender and Mvc programs to use Wolverine/RabbitMQ, publish/listen to Send*Email queues, and remove MassTransit consumers. Refactor email services: replace MailpitServiceOptions with MailpitClientSettings (config moved to Aspire:Mailpit), change DI extension signature, add ISmtpClientFactory, SmtpClientFactory, SmtpEmailSender (rename ISmtpEmailSender), MessageSenderHandler, SendMessageConsumer, and generated Wolverine handler registry/handlers. Remove legacy SmtpEmailSenderService, consumer and development appsettings.
Restructure solution: add CommentMap.Application and CommentMap.Infrastructure projects and move entities, DTOs and the ICommentMapDbContext abstraction into the Application layer. Move EF DbContext, configurations and migrations into Infrastructure. Implement CQRS-like features (commands/queries) for comments, countries and Identity flows as message handlers/handlers results and add generated Wolverine handlers. Replace many in-MVC services with IMessageBus invocations and remove now-redundant service classes. Update DI via InfrastructureServiceCollectionExtensions and Program to use Wolverine and new projects, plus Identity mapping and new DTO models.
Introduce CommentMap.MigrationService worker project to run EF Core database migrations at startup. Adds Migrator BackgroundService (uses execution strategy, logs progress, then stops host) plus Program, launchSettings, and appsettings. AppHost updated to add the migration service project and wait for its completion before starting the MVC project; AppHost csproj references the new project. This ensures DB migrations are applied before the application serves requests.
Switch client-side validation from jquery-validation(+unobtrusive) to aspnet-client-validation.
Register roslyn-language-server in dotnet-tools.json (version 5.11.0-1.26379.6, rollForward: false) and add opencode.json LSP config to launch it for C# (.cs, .csx, .razor, .cshtml) via "dotnet roslyn-language-server --stdio --autoLoadProjects". Enables editor/LSP tooling for C# projects.
Reorganize repository: move all project folders under src/ and update CommentMap.slnx, aspire.config.json and workflow paths. Add AGENTS.md and register an Aspire MCP agent in opencode.json. Update CI Docker build context to src/CommentMap.Mvc. Modernize MVC frontend: replace legacy scripts/styles with Tailwind + daisyUI, add esbuild/postcss build (src/CommentMap.Mvc/build/build.js), new package.json/tsconfig/package-lock, TypeScript pages and site scripts, and a BuildJS MSBuild target. Remove old frontend artifacts. Bump LICENSE year to 2026.
Add a new daisyUI agent skill (v5.7.x) with comprehensive per-component docs, install/config/usage guides under .agents/skills/daisyui. Add a pr-review skill and report template for auditing daisyUI PRs. Add skills-lock.json mapping included skills and update CommentMap.slnx to include skills-lock.json.
Replace the legacy SignInPanel view/component with a new AccountMenu (view component, view model and cshtml). Update _Layout to use details/summary dropdowns, adjust navbar markup, and swap the view component invocation. Change default theme to "corporate" and add a second daisyUI theme "business"; update site.ts to persist the new theme names. Add Razor runtime compilation for development (PackageReference added). Remove obsolete SignInPanel files.
Replace string-based status messages with a strongly-typed StatusMessage record that includes Type (Info/Success/Error) and Message fields. Introduce TempDataExtensions for JSON serialization and a StatusAlertViewComponent for centralized rendering. Refactor all Identity pages to use the new pattern. Remove the old _StatusMessage.cshtml partial and simplify site.ts by removing alert dismissal code.
Added a comprehensive .editorconfig file with C# coding standards, formatting rules, and naming conventions. Expanded README.md with project description, features, tech stack, prerequisites, getting started guide, Google OAuth setup, and project structure documentation.
@adedw adedw self-assigned this Aug 8, 2026
@adedw adedw added documentation Improvements or additions to documentation view infra labels Aug 8, 2026
@adedw adedw changed the title CM-70 CM-74 CM-77 Refactoring: messaging, ui, docs, aspire [WIP] CM-70 CM-74 CM-77 Refactoring: messaging, ui, docs, aspire Aug 8, 2026
@adedw adedw removed the infra label Aug 8, 2026
@adedw adedw changed the title [WIP] CM-70 CM-74 CM-77 Refactoring: messaging, ui, docs, aspire [WIP] CM-70 CM-74 CM-77 Refactoring: messaging, ui, docs Aug 8, 2026
adedw added 7 commits August 8, 2026 21:40
Replace Order enum with CommentSort and update ListComments to accept CommentSort (CreatedAt now orders descending). Add CommentSort cookie-based persistence and remove the SelectedOrder query plumbing. Replace LocationViewModel with explicit Longitude/Latitude on AddNewCommentInput and CommentCardViewModel (adds CoordinatesJson helper). Update views, partials, page models, JS, and handlers to use the new shape. Misc: remove legacy Order.cs and several agent skill docs, and perform using/import cleanups and minor formatting fixes across projects.
Move all NuGet package versions from individual project files to a new Directory.Packages.props file. This enables central version management across the solution, making it easier to update dependencies consistently across all projects.
Introduce a comprehensive set of Aspire agent skills and their reference docs: aspire, aspire-init, aspireify, aspire-orchestration, aspire-deployment, and aspire-monitoring. Adds rich target/reference content (azure, aws, kubernetes, docker-compose, cicd, javascript, apphost wiring, TS/C# authoring, validation, etc.) plus new .NET-focused skills (configuring-opentelemetry-dotnet, dotnet-webapi, minimal-api-file-upload). Update skills-lock.json to register the new skills. Enables agent-guided AppHost init, wiring, orchestration, deployment, and monitoring workflows.
Adds the engineering-focused `.agents/skills` library, including routing, triage, architecture, domain, testing, and writing workflows. Updates the local .NET Aspire and Roslyn tool versions to keep the repo aligned with the new agent setup.
Large refactor and feature additions:

- Identity: split and reorganized identity features into many focused message handlers (2FA, authenticator setup, recovery codes, enable/disable/reset authenticator, external login flows, password/set-password, sign-in after registration, link/remove external logins, etc.). Removed monolithic TwoFactor/ExternalLogin files and moved helpers into small files.
- EmailSender: replaced MailPit-specific config with generic SMTP (SmtpSettings), updated ServiceCollectionExtensions and SmtpEmailSender to use SecureSocketOptions, removed SendMessageConsumer, and updated generated Wolverine handlers to call MessageSenderHandler. Updated appsettings accordingly.
- CI/docs: simplified GitHub workflow to use dotnet publish /t:PublishContainer and added setup-dotnet step; updated AGENTS.md with aspire usage, health endpoints and CI notes.
- Misc: added Humanizer package and updated aspire CLI tool version; removed dev Parameters from AppHost dev settings; added Lockout and Comment Edit pages and page model; small MVC fixes (script path casing, cookie options factory, removed unused logger in ErrorModel), and MapDefaultEndpoints() call in Program.cs.

These changes reorganize identity flows, switch email delivery to SMTP, and streamline container publishing.
Refactor messaging to a thin CQRS-style in-process model and add a lightweight EventBus.

- Add ICommand/IQuery markers and ICommandHandler/IQueryHandler abstractions; convert feature messages into Commands/Queries and instance handler classes (DI-friendly).
- Replace Wolverine codegen usage: remove generated handlers and inline handler registrations via AddMessageHandlers.
- Introduce CommentMap.EventBus with RabbitMQEventBus, subscription builder, and IntegrationEvent base; wire Mvc/EmailSender to IEventBus and DI subscriptions.
- Update Identity result model, authenticator options, packages, appsettings, and small MVC handler call sites.
Document the repo's agent conventions, triage labels, and domain documentation workflow. This adds guidance for GitHub issue handling and the expected CONTEXT.md/ADR usage so future agent tasks follow the same process.
@adedw adedw changed the title [WIP] CM-70 CM-74 CM-77 Refactoring: messaging, ui, docs CM-70 CM-77 CM-80 Refactoring: messaging, ui, docs Aug 29, 2026
adedw added 2 commits August 29, 2026 23:20
Add ManageNavPages helper and set ActivePage in account/manage pages; replace the custom AnchorTagHelper with ManageNavPages.NavClass and simplify _ManageNav.cshtml. Rename EnableAuthenticatorResultDto to EnableAuthenticatorResultDTO and update the handler and page model usages. Refresh _CommentCardPartial.cshtml markup/styles and SVG attributes. Remove unused MigrationService appsettings and the TagHelpers import. These changes centralize nav active-state logic, remove a fragile tag helper, and apply small UI/CR refactors.
Refactor account management UI and improve recovery codes UX. Change navigation from a sidebar menu to tab-styled links (ManageNavPages.NavClass + _ManageNav), simplify the Manage layout, and adjust heading sizes. Revamp ShowRecoveryCodes page: clearer explanatory copy, updated SVG markup, grid listing of codes, a Download button and a new client script (ShowRecoveryCodes.cshtml.ts) wired into the build. Remove redundant XML doc comments from ShowRecoveryCodes page model and tweak comment card styling (remove fixed width, add shadow). Update build.js to bundle the new recovery-codes script.
adedw added 2 commits August 30, 2026 20:44
This update streamlines the Country entity to use Shape and LocalName instead of the old region metadata and renames the DTO to CountryDTO. It updates the matching query, EF Core configuration, and adds the corresponding migration for the schema change.

It also bumps the project to .NET 10.0.11 package/tool versions, adds the Countries page to the main nav, refreshes validation-summary styling, and improves 2FA/authenticator inputs with OTP-friendly markup and validation constraints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation view

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean architecture Modernize frontend Readme

1 participant