feat: scaffold .NET backend solution with Clean Architecture #1

Merged
bjoern merged 3 commits from feat/backend-scaffold into main 2026-06-27 23:10:13 +02:00
Member

Summary

Scaffolds the initial .NET backend solution with Clean Architecture / Ports & Adapters structure.

What's included

Solution structure

backend/
├── DoujinManager.slnx
├── dotnet-tools.json          ← dotnet-ef as local tool (v10.0.9)
├── src/
│   ├── DoujinManager.ApplicationCore/   ← domain entities, value objects, use cases, port interfaces (no deps)
│   ├── DoujinManager.RestAdapter/       ← REST endpoints, DTOs, auth boundary → depends on ApplicationCore
│   ├── DoujinManager.Infrastructure/    ← EF Core, SQLite, filesystem, thumbnails, search → depends on ApplicationCore
│   └── DoujinManager.Server/           ← composition root / web host → depends on all
└── tests/
    ├── DoujinManager.ApplicationCore.Tests/
    ├── DoujinManager.RestAdapter.Tests/
    ├── DoujinManager.Infrastructure.Tests/
    └── DoujinManager.IntegrationTests/

Dependency direction (enforced via project references)

ApplicationCore  ←  RestAdapter
ApplicationCore  ←  Infrastructure
ApplicationCore  ←  Server
RestAdapter      ←  Server
Infrastructure   ←  Server

Key details

  • .NET 10 target framework, nullable enabled, implicit usings
  • xUnit test projects with smoke tests verifying project references compile
  • dotnet-ef installed as local tool (reproducible via dotnet tool restore)
  • Server: minimal API with /health endpoint and OpenAPI
  • .gitignore for .NET at repo root

Verification

  • dotnet build 0 errors, 0 warnings
  • dotnet test 4/4 tests pass
  • dotnet ef --version EF Core 10.0.9
## Summary Scaffolds the initial .NET backend solution with Clean Architecture / Ports & Adapters structure. ## What's included ### Solution structure ``` backend/ ├── DoujinManager.slnx ├── dotnet-tools.json ← dotnet-ef as local tool (v10.0.9) ├── src/ │ ├── DoujinManager.ApplicationCore/ ← domain entities, value objects, use cases, port interfaces (no deps) │ ├── DoujinManager.RestAdapter/ ← REST endpoints, DTOs, auth boundary → depends on ApplicationCore │ ├── DoujinManager.Infrastructure/ ← EF Core, SQLite, filesystem, thumbnails, search → depends on ApplicationCore │ └── DoujinManager.Server/ ← composition root / web host → depends on all └── tests/ ├── DoujinManager.ApplicationCore.Tests/ ├── DoujinManager.RestAdapter.Tests/ ├── DoujinManager.Infrastructure.Tests/ └── DoujinManager.IntegrationTests/ ``` ### Dependency direction (enforced via project references) ``` ApplicationCore ← RestAdapter ApplicationCore ← Infrastructure ApplicationCore ← Server RestAdapter ← Server Infrastructure ← Server ``` ### Key details - **.NET 10** target framework, nullable enabled, implicit usings - **xUnit** test projects with smoke tests verifying project references compile - **dotnet-ef** installed as local tool (reproducible via `dotnet tool restore`) - **Server**: minimal API with `/health` endpoint and OpenAPI - **.gitignore** for .NET at repo root ## Verification - `dotnet build` → ✅ 0 errors, 0 warnings - `dotnet test` → ✅ 4/4 tests pass - `dotnet ef --version` → ✅ EF Core 10.0.9 ## Related ADRs - [ADR-0002: Clean Architecture / Ports & Adapters](docs/adr/0002-clean-architecture-ports-and-adapters.md) - [ADR-0012: .NET 10 and SkiaSharp](docs/adr/0012-dotnet-10-and-skiasharp.md)
- Solution with 4 src projects + 4 test projects
- Clean Architecture dependency direction enforced:
  ApplicationCore (no deps) ← RestAdapter, Infrastructure ← Server
- Server: minimal API with /health endpoint, OpenAPI
- dotnet-ef installed as local tool (v10.0.9)
- .NET 10 target, nullable enabled, implicit usings
- xUnit test projects with smoke tests verifying references
- Build and all 4 tests pass
All NuGet package versions now defined in a single Directory.Packages.props
file. Individual .csproj files reference packages without Version attributes.
Transitive pinning enabled.
Author
Member

🤖 Hermes automated review: minor comments

I reviewed the PR diff for the initial backend scaffold. This is a conversation-level review comment; the current Forgejo MCP integration does not support true inline review comments or formal approval/request-changes states.

Minor findings

  • Minor — backend/src/DoujinManager.Server/Program.cs:1 and related server files — CRLF line endings make git diff --check fail
    • git diff --check fd6353c...ce996a1 reports trailing whitespace on every line of several newly-added server files because they are committed with CRLF endings while the rest of the scaffold is LF. Affected files include backend/src/DoujinManager.Server/DoujinManager.Server.csproj, Program.cs, Properties/launchSettings.json, appsettings.Development.json, and appsettings.json.
    • This is not a functional blocker for the scaffold, but it will keep whitespace checks noisy and can hide real whitespace problems.
    • Suggested fix: normalize those files to LF, or add an explicit .gitattributes policy if CRLF is intentional.

Checks

  • Static scan found no hardcoded secrets, shell/eval usage, unsafe deserialization, or SQL-formatting patterns.
  • dotnet build --no-restore backend/DoujinManager.slnx could not run because NuGet assets were not present (project.assets.json missing); no restore/install was performed in this cron job.

Automated daily review. I never merge PRs.

## 🤖 Hermes automated review: minor comments I reviewed the PR diff for the initial backend scaffold. This is a conversation-level review comment; the current Forgejo MCP integration does not support true inline review comments or formal approval/request-changes states. ### Minor findings - **Minor — `backend/src/DoujinManager.Server/Program.cs:1` and related server files — CRLF line endings make `git diff --check` fail** - `git diff --check fd6353c...ce996a1` reports trailing whitespace on every line of several newly-added server files because they are committed with CRLF endings while the rest of the scaffold is LF. Affected files include `backend/src/DoujinManager.Server/DoujinManager.Server.csproj`, `Program.cs`, `Properties/launchSettings.json`, `appsettings.Development.json`, and `appsettings.json`. - This is not a functional blocker for the scaffold, but it will keep whitespace checks noisy and can hide real whitespace problems. - **Suggested fix:** normalize those files to LF, or add an explicit `.gitattributes` policy if CRLF is intentional. ### Checks - Static scan found no hardcoded secrets, shell/eval usage, unsafe deserialization, or SQL-formatting patterns. - `dotnet build --no-restore backend/DoujinManager.slnx` could not run because NuGet assets were not present (`project.assets.json` missing); no restore/install was performed in this cron job. Automated daily review. I never merge PRs.
Template-generated Server files had CRLF line endings while the rest of
the scaffold used LF. Added .gitattributes enforcing LF for all text files
and renormalized the 5 affected files. git diff --check now passes clean.
bjoern merged commit b834aeece8 into main 2026-06-27 23:10:13 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TeamAI/doujin-manager!1
No description provided.