Scaffold the Before-M1 repo skeleton
Stand up the modular-monolith skeleton per docs/V1_BUILD_PLAN.md: one .NET 10 solution with web + worker hosts sharing seven interface-bounded module projects, PostgreSQL 17 + pgvector via EF Core 10, a React 19 + Vite SPA built into wwwroot, and Docker Compose for one-command local dev. Skeleton only — no feature code. Architecture - One project per module (OrgBoard, Identity, Skills, Assembler, Governance, Memory, Integrations); each is its own assembly so non-public types (entities, DbContext) are invisible across modules at compile time. - TeamUp.Bootstrap is the only library that references all modules; both hosts reference only Bootstrap. SharedKernel/Infrastructure never reference modules. - IModule seam: Register(...) runs in both hosts; MapEndpoints(...) only in web. - PlatformDbContext owns the pgvector extension + the seven module schemas (InitialPlatform migration); MigrationRunner applies it then any module context. - One image, two roles selected by RUN_MODE at the Docker entrypoint. Verified - dotnet build green (nullable + warnings-as-errors). - ArchitectureTests 8/8 — reflection-based boundary rules (no module -> module, -> Infrastructure, -> Bootstrap, or -> host references). - IntegrationTests 10/10 — Testcontainers boots the host against real pgvector: migration applies, vector extension + 7 schemas exist, /health 200, every /api/<module>/ping 200, /openapi/v1.json served. - client builds clean (Vite 6 — pinned for Node 22.3.0; Vite 8 needs Node >=22.12). Packages and base images route through the Nexus mirror (mirror.soroushasadi.com), reachable from Iran when nuget.org / Docker Hub / MCR are not. CI is intentionally deferred to a later session. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using TeamUp.Modules.Assembler;
|
||||
using TeamUp.Modules.Governance;
|
||||
using TeamUp.Modules.Identity;
|
||||
using TeamUp.Modules.Integrations;
|
||||
using TeamUp.Modules.Memory;
|
||||
using TeamUp.Modules.OrgBoard;
|
||||
using TeamUp.Modules.Skills;
|
||||
using TeamUp.SharedKernel.Modularity;
|
||||
|
||||
namespace TeamUp.Bootstrap;
|
||||
|
||||
/// <summary>
|
||||
/// The explicit, ordered list of modules. Explicit (not assembly-scanned) on purpose:
|
||||
/// deterministic, trim/AOT-safe, reviewable, and order-controlled (Identity first, since other
|
||||
/// modules will depend on its auth services). Adding a module is a one-line change here.
|
||||
/// </summary>
|
||||
public static class ModuleCatalog
|
||||
{
|
||||
public static IReadOnlyList<IModule> All { get; } =
|
||||
[
|
||||
new IdentityModule(),
|
||||
new OrgBoardModule(),
|
||||
new SkillsModule(),
|
||||
new IntegrationsModule(),
|
||||
new MemoryModule(),
|
||||
new AssemblerModule(),
|
||||
new GovernanceModule(),
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<!-- The ONLY composition library that references every module. Both hosts reference Bootstrap
|
||||
(and nothing else of the module graph), so the module list stays DRY across web + worker.
|
||||
Infrastructure and SharedKernel must never reference modules — Bootstrap is where that
|
||||
knowledge is allowed to live. -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\TeamUp.SharedKernel\TeamUp.SharedKernel.csproj" />
|
||||
<ProjectReference Include="..\..\Shared\TeamUp.Infrastructure\TeamUp.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\..\Modules\TeamUp.Modules.Identity\TeamUp.Modules.Identity.csproj" />
|
||||
<ProjectReference Include="..\..\Modules\TeamUp.Modules.OrgBoard\TeamUp.Modules.OrgBoard.csproj" />
|
||||
<ProjectReference Include="..\..\Modules\TeamUp.Modules.Skills\TeamUp.Modules.Skills.csproj" />
|
||||
<ProjectReference Include="..\..\Modules\TeamUp.Modules.Integrations\TeamUp.Modules.Integrations.csproj" />
|
||||
<ProjectReference Include="..\..\Modules\TeamUp.Modules.Memory\TeamUp.Modules.Memory.csproj" />
|
||||
<ProjectReference Include="..\..\Modules\TeamUp.Modules.Assembler\TeamUp.Modules.Assembler.csproj" />
|
||||
<ProjectReference Include="..\..\Modules\TeamUp.Modules.Governance\TeamUp.Modules.Governance.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace TeamUp.Bootstrap;
|
||||
|
||||
public static class TeamUpModuleExtensions
|
||||
{
|
||||
/// <summary>Runs every module's <c>Register</c>. Called by BOTH hosts.</summary>
|
||||
public static IServiceCollection AddTeamUpModules(
|
||||
this IServiceCollection services,
|
||||
IConfiguration configuration)
|
||||
{
|
||||
foreach (var module in ModuleCatalog.All)
|
||||
{
|
||||
module.Register(services, configuration);
|
||||
}
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
/// <summary>Runs every module's <c>MapEndpoints</c>. Called by the WEB host only.</summary>
|
||||
public static IEndpointRouteBuilder MapTeamUpModules(this IEndpointRouteBuilder endpoints)
|
||||
{
|
||||
foreach (var module in ModuleCatalog.All)
|
||||
{
|
||||
module.MapEndpoints(endpoints);
|
||||
}
|
||||
|
||||
return endpoints;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user