Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
3602ddd
Add unit tests for HostDbContext generation in SimpleModule.Generator…
antosubash Mar 17, 2026
014520f
feat: integrate Aspire service defaults and add OpenTelemetry support
antosubash Mar 17, 2026
ffd49b8
feat: add persistent lifetime to Postgres configuration in AppHost
antosubash Mar 17, 2026
85cd6d1
Add initial product configuration and database migration
antosubash Mar 17, 2026
d8e735a
Add design doc for splitting generator into focused emitters
antosubash Mar 18, 2026
b801688
Add implementation plan for splitting generator into focused emitters
antosubash Mar 18, 2026
c29463d
refactor: extract model types to Discovery/DiscoveryData.cs
antosubash Mar 18, 2026
220f9d6
refactor: extract shared helpers to Helpers/TypeMappingHelpers.cs
antosubash Mar 18, 2026
8b6db1c
refactor: extract symbol discovery to Discovery/SymbolDiscovery.cs
antosubash Mar 18, 2026
3e029c3
refactor: create IEmitter interface for generator emitters
antosubash Mar 18, 2026
30d5862
refactor: extract DiagnosticEmitter
antosubash Mar 18, 2026
90bd275
refactor: extract ModuleExtensionsEmitter
antosubash Mar 18, 2026
a81f2a4
refactor: extract EndpointExtensionsEmitter
antosubash Mar 18, 2026
6b1d4e2
refactor: extract MenuExtensionsEmitter
antosubash Mar 18, 2026
f8cbc1d
refactor: extract RazorComponentExtensionsEmitter
antosubash Mar 18, 2026
bb92bb3
refactor: extract ViewPagesEmitter
antosubash Mar 18, 2026
2a23ed8
refactor: extract JsonResolverEmitter
antosubash Mar 18, 2026
45703bd
refactor: extract TypeScriptDefinitionsEmitter
antosubash Mar 18, 2026
896878d
refactor: extract HostDbContextEmitter
antosubash Mar 18, 2026
1116cdd
refactor: wire up emitter dispatch array and delete empty partial file
antosubash Mar 18, 2026
cc86f65
test: add targeted tests for individual emitters
antosubash Mar 18, 2026
a7eebc5
test: add targeted tests for individual emitters
antosubash Mar 18, 2026
01b9a10
fix: use deterministic dates in order seed data
antosubash Mar 18, 2026
d2d6b0c
feat: add NetEscapades.EnumGenerators for AOT-safe enum utilities
antosubash Mar 18, 2026
da40e80
feat: add Vogen strongly-typed IDs (ProductId, OrderId, UserId) for c…
antosubash Mar 18, 2026
e9077bc
refactor: move strongly-typed IDs to module contracts projects
antosubash Mar 18, 2026
a9a09f9
feat: add ValidationBuilder helper, add Products validation, simplify…
antosubash Mar 18, 2026
7e41dd4
feat: add CrudEndpoints helper to reduce endpoint boilerplate
antosubash Mar 18, 2026
ff632e7
refactor: remove hardcoded module type names from source generator
antosubash Mar 18, 2026
72c8e2c
test: add unit tests for CrudEndpoints, UpdateRequestValidator, and V…
antosubash Mar 18, 2026
81ac350
test: add unit tests for Vogen IDs and enum generator extensions
antosubash Mar 18, 2026
89ea31d
fix: regenerate EF Core migration for Vogen model, use EnsureCreated …
antosubash Mar 18, 2026
e6e1b4a
feat: add error handling for non-Inertia responses and improve toast …
antosubash Mar 18, 2026
30ecda9
docs: add permission system design
antosubash Mar 18, 2026
0743dbb
Merge branch 'feature/ef-core-migrations' of https://github.com/antos…
antosubash Mar 18, 2026
2dfb720
docs: add permission system implementation plan
antosubash Mar 18, 2026
5ea9a40
feat: add permission system core types
antosubash Mar 18, 2026
96f6297
feat: source generator discovers permissions and emits authorization …
antosubash Mar 18, 2026
506fabb
feat: add permission entities, DbContext config, and claims projection
antosubash Mar 18, 2026
39bf28a
feat: add permissions and protect Products/Orders endpoints
antosubash Mar 18, 2026
9ba5c83
feat: mark public endpoints with AllowAnonymous
antosubash Mar 18, 2026
648037e
feat: seed all registered permissions for Admin role on startup
antosubash Mar 18, 2026
7b48923
fix: remove duplicate AddAuthorization, use generator-configured policy
antosubash Mar 18, 2026
22679d2
docs: map existing codebase
antosubash Mar 18, 2026
730c18b
test: add permission system unit tests and update integration tests
antosubash Mar 18, 2026
3de7d91
chore: remove auto-generated planning files
antosubash Mar 18, 2026
e4c9561
feat: refactor authorization to use PermissionRequirement and add fal…
antosubash Mar 18, 2026
f5af5f0
test: add Playwright E2E tests for permission system
antosubash Mar 18, 2026
eaa08cf
fix: Playwright permission tests passing, fix deny-by-default scope
antosubash Mar 18, 2026
4368708
docs: map existing codebase
antosubash Mar 18, 2026
b39e4d5
docs: initialize project
antosubash Mar 18, 2026
5067d2c
chore: add project config
antosubash Mar 18, 2026
493f038
docs: add domain research for release hardening
antosubash Mar 18, 2026
4e9a949
docs: define v1 requirements
antosubash Mar 18, 2026
245275e
docs: create roadmap (9 phases)
antosubash Mar 18, 2026
2be481f
docs(01): smart discuss context
antosubash Mar 18, 2026
f93af28
Remove obsolete planning files and implement release hardening changes
antosubash Mar 18, 2026
c814ee2
docs: add Admin module design for user/role management redesign
antosubash Mar 18, 2026
77a569b
docs: add Admin module implementation plan (16 tasks)
antosubash Mar 18, 2026
50cbfc4
feat(admin): scaffold Admin.Contracts project with constants, permiss…
antosubash Mar 18, 2026
0b59bcc
feat(admin): add Admin module with DbContext, AuditLogEntry entity, a…
antosubash Mar 18, 2026
2414f9d
feat(users): add DeactivatedAt property to ApplicationUser for soft d…
antosubash Mar 18, 2026
fc8b82a
feat(admin): wire Admin module into Host, solution, and test factory
antosubash Mar 18, 2026
5f4d4fc
refactor(users): remove admin UI, endpoints, and menu items — moved t…
antosubash Mar 18, 2026
d2fe0ea
feat(admin): add user view endpoints (list, create, edit with tabs, a…
antosubash Mar 18, 2026
e9e3e0f
feat(admin): add all user action endpoints (CRUD, roles, permissions,…
antosubash Mar 18, 2026
75ccd24
feat(admin): add role view and action endpoints (CRUD, permissions, d…
antosubash Mar 18, 2026
7eded0c
feat(admin): add frontend setup with TabNav, PermissionGroups, and Ac…
antosubash Mar 18, 2026
0cac6e4
feat(admin): add all React pages (Users CRUD, Roles CRUD, tabbed edit…
antosubash Mar 18, 2026
5dda014
test(admin): add integration tests for user and role admin endpoints
antosubash Mar 18, 2026
3f048d6
feat(admin): add EF Core migration for Admin module tables
antosubash Mar 18, 2026
f1fbe61
Update settings.local.json
antosubash Mar 18, 2026
bc09ee5
Refactor migration and code structure
antosubash Mar 18, 2026
11992d6
docs: add OpenIddict & Permissions module split design
antosubash Mar 19, 2026
055d16e
docs: add implementation plan for OpenIddict & Permissions module split
antosubash Mar 19, 2026
e45cbdd
docs: update plan with typed IDs (RoleId, UserId) and comprehensive t…
antosubash Mar 19, 2026
282a363
feat(permissions): add Permissions.Contracts with IPermissionContract…
antosubash Mar 19, 2026
4fe6a0f
feat(permissions): add Permissions module with DbContext, PermissionS…
antosubash Mar 19, 2026
a9d3e20
test(permissions): add unit tests for PermissionService
antosubash Mar 19, 2026
3d354a9
feat(openiddict): add OpenIddict.Contracts with auth constants
antosubash Mar 19, 2026
9348ce2
feat(openiddict): add OpenIddict module with DbContext, endpoints, se…
antosubash Mar 19, 2026
2f192d9
refactor(users): remove OpenIddict and permission concerns, add UserS…
antosubash Mar 19, 2026
e3ed1ae
refactor(admin): use IPermissionContracts instead of direct UsersDbCo…
antosubash Mar 19, 2026
be3eb70
refactor(host): add OpenIddict and Permissions module references, upd…
antosubash Mar 19, 2026
5adbbdb
test: update test infrastructure for OpenIddict and Permissions modules
antosubash Mar 19, 2026
70f15f4
test(openiddict): add integration tests for Connect endpoints
antosubash Mar 19, 2026
8cf9a2a
test(admin): add integration tests for permission operations via IPer…
antosubash Mar 19, 2026
22c1c81
test: remove SM0004 diagnostic tests (diagnostic removed for OpenIddi…
antosubash Mar 19, 2026
2f267c9
fix: regenerate EF migration and make seed services resilient to DB e…
antosubash Mar 19, 2026
93e64f1
fix: restore PostgreSQL connection string in Development config
antosubash Mar 19, 2026
5cf4cdb
fix: update tests for RequireAuthorization on endpoint groups
antosubash Mar 19, 2026
2792f36
docs: add OpenIddict table ownership and client UI design
antosubash Mar 19, 2026
a17e73c
docs: add implementation plan for OpenIddict table prefix fix and cli…
antosubash Mar 19, 2026
6421be1
feat(openiddict): expose OpenIddict entities as DbSets for proper tab…
antosubash Mar 19, 2026
96f5302
feat(openiddict): add ManageClients permission and navbar menu item
antosubash Mar 19, 2026
ad8713e
feat(openiddict): add client management view and action endpoints
antosubash Mar 19, 2026
5e3e37a
feat(openiddict): add React pages for client management UI
antosubash Mar 19, 2026
df2bc6d
fix: rename OpenIddict assembly to OpenIddictModule for static asset …
antosubash Mar 19, 2026
1e942f6
test(openiddict): add integration tests for client management CRUD
antosubash Mar 19, 2026
54cf100
test(e2e): add Playwright tests for OpenIddict client management
antosubash Mar 19, 2026
48b0154
Refactor code for improved readability and consistency
antosubash Mar 19, 2026
a60fece
docs: add admin sidebar layout design
antosubash Mar 19, 2026
4953af8
docs: add admin sidebar layout implementation plan
antosubash Mar 19, 2026
759f17e
feat(core): add AdminSidebar to MenuSection enum
antosubash Mar 19, 2026
7ab2b87
feat(modules): register AdminSidebar menu items in Admin and OpenIddict
antosubash Mar 19, 2026
f3beaff
feat(core): add Inertia shared data and admin sidebar middleware
antosubash Mar 19, 2026
92c6aeb
fix(core): replace reflection with JSON round-trip in MergeProps for …
antosubash Mar 19, 2026
17273dc
feat: add AdminLayout component and wire all admin pages to sidebar l…
antosubash Mar 19, 2026
cae9f06
refactor: consolidate navbar to single Admin link, remove hardcoded a…
antosubash Mar 19, 2026
a072e82
fix: correct biome lint suppression for dangerouslySetInnerHTML in Ad…
antosubash Mar 19, 2026
21aba16
fix(admin): use portal + z-index to overlay Blazor shell, add @source…
antosubash Mar 19, 2026
0d7da5e
fix(admin): add max-w-5xl container to admin layout content area
antosubash Mar 19, 2026
9390c9a
feat: dual layout system with forest green palette
antosubash Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .aspire/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"appHostPath": "../SimpleModule.AppHost/SimpleModule.AppHost.csproj"
}
6 changes: 2 additions & 4 deletions .claude/agents/generator-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ Review source generator code in SimpleModule.Generator for correctness and best
2. **Generator API**: Must use `IIncrementalGenerator`, not `ISourceGenerator` (enforced by `EnforceExtendedAnalyzerRules`)
3. **Symbol comparison**: Always use `SymbolEqualityComparer.Default.Equals()`, never `==` on symbols
4. **Fully qualified names**: Generated code must use `global::Namespace.Type` format from `SymbolDisplayFormat.FullyQualifiedFormat`
5. **No reflection**: Generated code must use direct `new` instantiation, no DI resolution of `IModule`
6. **Cross-assembly discovery**: Generator must scan `compilation.References` for module types, not just syntax in the current project
7. **Nullable handling**: Use `#nullable enable` in generated code or handle nulls explicitly
8. **AOT compliance**: Generated code must not use patterns that require runtime code generation
5. **Cross-assembly discovery**: Generator must scan `compilation.References` for module types, not just syntax in the current project
6. **Nullable handling**: Use `#nullable enable` in generated code or handle nulls explicitly
20 changes: 18 additions & 2 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,23 @@
"mcp__plugin_playwright_playwright__browser_press_key",
"mcp__plugin_playwright_playwright__browser_run_code",
"mcp__plugin_playwright_playwright__browser_network_requests",
"mcp__plugin_playwright_playwright__browser_console_messages"
"mcp__plugin_playwright_playwright__browser_console_messages",
"mcp__aspire__list_apphosts",
"mcp__aspire__select_apphost",
"mcp__aspire__list_resources",
"mcp__aspire__list_console_logs",
"mcp__aspire__execute_resource_command",
"mcp__playwright__browser_navigate",
"mcp__playwright__browser_click",
"mcp__playwright__browser_take_screenshot",
"mcp__playwright__browser_evaluate",
"mcp__playwright__browser_snapshot",
"mcp__playwright__browser_resize"
]
}
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"aspire",
"playwright"
]
}
1 change: 0 additions & 1 deletion .claude/skills/new-module/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public class <Name>Module : IModule
6. Run `dotnet build` to verify the source generator picks up the new module

## Important
- Do NOT add `PublishAot` or `EnableAotAnalyzer` to module class libraries
- Always include `<FrameworkReference Include="Microsoft.AspNetCore.App" />`
- Use `[Module("<Name>")]` attribute on the module class
- Use fully qualified ASP.NET Core usings (Builder, Http, Routing, DependencyInjection)
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ dotnet_diagnostic.IDE0072.severity = none
[*.Generated.cs]
generated_code = true

# EF Core migrations (auto-generated — suppress strict analysis)
[**/Migrations/*.cs]
generated_code = true

[*.g.cs]
generated_code = true

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ jobs:
env:
Database__DefaultConnection: "Host=localhost;Database=simplemodule_test;Username=test;Password=test"

- name: Verify migrations are up-to-date
working-directory: template/SimpleModule.Host
env:
Database__DefaultConnection: "Host=localhost;Database=simplemodule_test;Username=test;Password=test"
run: dotnet ef migrations has-pending-model-changes

publish:
runs-on: ubuntu-latest
needs: [test-sqlite, test-postgresql]
Expand All @@ -84,5 +90,5 @@ jobs:
with:
dotnet-version: '10.0.x'

- name: Publish AOT
- name: Publish
run: dotnet publish template/SimpleModule.Host/SimpleModule.Host.csproj -c Release
18 changes: 18 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"mcpServers": {
"aspire": {
"command": "aspire",
"args": [
"mcp",
"start"
]
},
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}
61 changes: 61 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copilot instructions

This repository is set up to use Aspire. Aspire is an orchestrator for the entire application and will take care of configuring dependencies, building, and running the application. The resources that make up the application are defined in `apphost.cs` including application code and external dependencies.

## General recommendations for working with Aspire
1. Before making any changes always run the apphost using `aspire run` and inspect the state of resources to make sure you are building from a known state.
1. Changes to the _apphost.cs_ file will require a restart of the application to take effect.
2. Make changes incrementally and run the aspire application using the `aspire run` command to validate changes.
3. Use the Aspire MCP tools to check the status of resources and debug issues.

## Running the application
To run the application run the following command:

```
aspire run
```

If there is already an instance of the application running it will prompt to stop the existing instance. You only need to restart the application if code in `apphost.cs` is changed, but if you experience problems it can be useful to reset everything to the starting state.

## Checking resources
To check the status of resources defined in the app model use the _list resources_ tool. This will show you the current state of each resource and if there are any issues. If a resource is not running as expected you can use the _execute resource command_ tool to restart it or perform other actions.

## Listing integrations
IMPORTANT! When a user asks you to add a resource to the app model you should first use the _list integrations_ tool to get a list of the current versions of all the available integrations. You should try to use the version of the integration which aligns with the version of the Aspire.AppHost.Sdk. Some integration versions may have a preview suffix. Once you have identified the correct integration you should always use the _get integration docs_ tool to fetch the latest documentation for the integration and follow the links to get additional guidance.

## Debugging issues
IMPORTANT! Aspire is designed to capture rich logs and telemetry for all resources defined in the app model. Use the following diagnostic tools when debugging issues with the application before making changes to make sure you are focusing on the right things.

1. _list structured logs_; use this tool to get details about structured logs.
2. _list console logs_; use this tool to get details about console logs.
3. _list traces_; use this tool to get details about traces.
4. _list trace structured logs_; use this tool to get logs related to a trace

## Other Aspire MCP tools

1. _select apphost_; use this tool if working with multiple app hosts within a workspace.
2. _list apphosts_; use this tool to get details about active app hosts.

## Playwright MCP server

The playwright MCP server has also been configured in this repository and you should use it to perform functional investigations of the resources defined in the app model as you work on the codebase. To get endpoints that can be used for navigation using the playwright MCP server use the list resources tool.

## Updating the app host
The user may request that you update the Aspire apphost. You can do this using the `aspire update` command. This will update the apphost to the latest version and some of the Aspire specific packages in referenced projects, however you may need to manually update other packages in the solution to ensure compatibility. You can consider using the `dotnet-outdated` with the users consent. To install the `dotnet-outdated` tool use the following command:

```
dotnet tool install --global dotnet-outdated-tool
```

## Persistent containers
IMPORTANT! Consider avoiding persistent containers early during development to avoid creating state management issues when restarting the app.

## Aspire workload
IMPORTANT! The aspire workload is obsolete. You should never attempt to install or use the Aspire workload.

## Official documentation
IMPORTANT! Always prefer official documentation when available. The following sites contain the official documentation for Aspire and related components

1. https://aspire.dev
2. https://learn.microsoft.com/dotnet/aspire
3. https://nuget.org (for specific integration package details)
9 changes: 4 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## What This Is

Modular monolith framework for .NET with compile-time module discovery via Roslyn source generators. Fully AOT-compatible — no reflection. Frontend uses React 19 + Inertia.js served via Blazor SSR.
Modular monolith framework for .NET with compile-time module discovery via Roslyn source generators. Frontend uses React 19 + Inertia.js served via Blazor SSR.

## Build & Run

Expand Down Expand Up @@ -40,8 +40,8 @@ Test stack: xUnit.v3, FluentAssertions, Bogus, Microsoft.AspNetCore.Mvc.Testing.
### .NET Backend

- **SimpleModule.Core** — `IModule` interface, `[Module]` attribute, `IEndpoint` interface, `[Dto]` attribute, menu system (`IMenuRegistry`), event bus (`IEventBus`), Inertia integration.
- **SimpleModule.Generator** — Roslyn `IIncrementalGenerator` (netstandard2.0). Scans referenced assemblies for `[Module]` classes, `IEndpoint` implementors, and `[Dto]` types. Generates: `AddModules()`, `MapModuleEndpoints()`, `CollectModuleMenuItems()`, AOT JSON serializers, TypeScript interface definitions, Razor component assembly discovery.
- **SimpleModule.Host** — Host app (net10.0, PublishAot). Calls generated extension methods in `Program.cs`. Custom Inertia middleware bridges Blazor SSR → React.
- **SimpleModule.Generator** — Roslyn `IIncrementalGenerator` (netstandard2.0). Scans referenced assemblies for `[Module]` classes, `IEndpoint` implementors, and `[Dto]` types. Generates: `AddModules()`, `MapModuleEndpoints()`, `CollectModuleMenuItems()`, JSON serializers, TypeScript interface definitions, Razor component assembly discovery.
- **SimpleModule.Host** — Host app (net10.0). Calls generated extension methods in `Program.cs`. Custom Inertia middleware bridges Blazor SSR → React.

### Frontend (React + Inertia.js)

Expand All @@ -58,9 +58,8 @@ Test stack: xUnit.v3, FluentAssertions, Bogus, Microsoft.AspNetCore.Mvc.Testing.

## Key Constraints

- **No reflection** — source generator emits static `new ModuleName()` calls for AOT.
- **Source generator must target netstandard2.0** with `IIncrementalGenerator` (not `ISourceGenerator`).
- **Module class libraries must NOT have `PublishAot`** — only the Host project. Modules need `<FrameworkReference Include="Microsoft.AspNetCore.App" />`.
- Modules need `<FrameworkReference Include="Microsoft.AspNetCore.App" />`.
- **Module Vite builds use library mode** — externalize React, React-DOM, @inertiajs/react. Inline dynamic imports.
- **TreatWarningsAsErrors is enabled** globally via `Directory.Build.props` with `AnalysisLevel=latest-all` and `AnalysisMode=All`. Suppressed rules are listed in `.editorconfig`.

Expand Down
13 changes: 13 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<!-- Aspire -->
<PackageVersion Include="Aspire.Hosting.PostgreSQL" Version="13.1.2" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.1.0" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="10.1.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.14.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0" />
<!-- Analyzers -->
<PackageVersion Include="NetEscapades.EnumGenerators" Version="1.0.0-beta11" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.11" />
<!-- Source Generator -->
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
<!-- EF Core -->
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.3" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.3" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.3" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
Expand All @@ -29,6 +40,8 @@
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="Bogus" Version="35.6.1" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3" />
<!-- Value Objects -->
<PackageVersion Include="Vogen" Version="8.0.5" />
<!-- CLI -->
<PackageVersion Include="Spectre.Console.Cli" Version="0.49.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SimpleModule

A modular monolith framework for .NET with compile-time module discovery via Roslyn source generators. Fully AOT-compatible with no reflection. Frontend uses React 19 + Inertia.js served via Blazor SSR.
A modular monolith framework for .NET with compile-time module discovery via Roslyn source generators. Frontend uses React 19 + Inertia.js served via Blazor SSR.

## Prerequisites

Expand Down
17 changes: 17 additions & 0 deletions SimpleModule.AppHost/AppHost.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var builder = DistributedApplication.CreateBuilder(args);

var postgres = builder
.AddPostgres("postgres")
.WithDataVolume()
.WithPgAdmin()
.WithLifetime(ContainerLifetime.Persistent);

var db = postgres.AddDatabase("simplemoduledb");

builder
.AddProject<Projects.SimpleModule_Host>("simplemodule-host")
.WithExternalHttpEndpoints()
.WithReference(db)
.WaitFor(db);

builder.Build().Run();
31 changes: 31 additions & 0 deletions SimpleModule.AppHost/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17119;http://localhost:15076",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21159",
"ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "https://localhost:23210",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22061"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15076",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19205",
"ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "http://localhost:18194",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20023"
}
}
}
}
15 changes: 15 additions & 0 deletions SimpleModule.AppHost/SimpleModule.AppHost.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Aspire.AppHost.Sdk/13.1.2">
<ItemGroup>
<ProjectReference Include="..\template\SimpleModule.Host\SimpleModule.Host.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting.PostgreSQL" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>c74f53ec-e4b7-4a9e-b41c-d39a4ebc0274</UserSecretsId>
</PropertyGroup>
</Project>
8 changes: 8 additions & 0 deletions SimpleModule.AppHost/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions SimpleModule.AppHost/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
Loading
Loading