ADR 0002 — Solution layout#
Status: Accepted (Phase 0, 2026-07-03)
Context#
The repo inherited an older layout with a mix of net8.0 and .NET Framework 4.8 projects in src/, plus a parallel legacy tree in manexcloud/. Manex.Web.csproj was targeting net8.0 while pulling ASP.NET Core 2.2 packages, so the solution could not build.
Decision#
Modular monolith, layered — not microservices for Phase 0. The bounded-context split (one service per domain, API gateway, Refit clients) is out of scope until the domain seams are clear; today they aren’t.
src/Manex.Contracts library, no dependencies
src/Manex.Data library, references EF Core + Contracts
src/Manex.Web asp.net core 8 host, references Data + ContractsLegacy projects (src/Manex.BLL, src/Manex.DAL, manexcloud/**) stay on disk for reference but are excluded from cube2-backend.sln so they cannot poison builds.
Directory.Build.props enforces globally:
TargetFramework = net8.0Nullable = enableTreatWarningsAsErrors = trueLangVersion = latest
Consequences#
- Any new project must target net8.0 and inherit props automatically.
- To reintroduce a legacy project, its
.csprojmust first be modernized (SDK style, net8.0). - Cross-cutting code (auth, logging, error handling) lives in
Manex.Webfor now; it will move to aManex.Sharedor similar library once a second host (Worker, second API) exists.