Base repo for new portfolio projects: fork / "Use this template", then rename
AppTemplate to the new project's name.
Backend: ASP.NET Core (.NET 10), Clean Architecture, PostgreSQL.
Frontend (later): Angular PWA in web/.
# 1. On GitHub: "Use this template" -> Create a new repository
# 2. Clone the new repo locally, then from its root:
powershell -ExecutionPolicy Bypass -File .\rename-template.ps1 -NewName Slicice
# This renames "AppTemplate" -> "Slicice" (and "apptemplate" -> "slicice") in both
# file contents and file/folder names (namespaces, csproj, sln, docker-compose, README...).
# 3. Delete rename-template.ps1 (no longer needed in the new project), then commit.# 1. Start local infrastructure
docker compose up -d
# 2. Secrets (NOT committed to git)
cd src/AppTemplate.Api
dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:Db" "Host=localhost;Database=apptemplate;Username=postgres;Password=dev"
dotnet user-secrets set "Jwt:Key" "dev-secret-at-least-32-chars-long-1234567890"
cd ../..
# 3. Run
dotnet run --project src/AppTemplate.Api.
├─ src/
│ ├─ AppTemplate.Domain/ entities, invariants, value objects (no dependencies)
│ ├─ AppTemplate.Application/ use cases, validators, ports (-> Domain)
│ ├─ AppTemplate.Infrastructure/ EF Core, repositories, adapters (-> Application)
│ └─ AppTemplate.Api/ endpoints, auth, composition root (-> App + Infra)
├─ tests/
│ ├─ AppTemplate.Domain.Tests/ unit
│ ├─ AppTemplate.Application.Tests/ unit (fake ports)
│ ├─ AppTemplate.Integration.Tests/ Testcontainers + real database
│ └─ AppTemplate.Architecture.Tests/ layer boundaries (NetArchTest)
├─ web/ Angular (coming later)
├─ infra/ Bicep (coming later)
├─ .github/workflows/ CI
├─ .githooks/ commit-msg, pre-push
├─ Directory.Build.props shared MSBuild settings
└─ Directory.Packages.props package versions in one place (CPM)
Dependency direction is a rule, not a suggestion: Domain depends on nothing; Api is the only project that knows about Infrastructure (for DI registration). Architecture tests verify this at build time.
- Branches:
<type>/<task-id>-<description>→feat/fe-033-rapid-numpadTypes:feat fix hotfix refactor perf test docs chore ci infra - Commits: Conventional Commits →
feat(inventory): add rapid numpad entry - No direct commits to
main— branch + pull request + squash merge. - Hooks live in
.githooks/and are activated withgit config core.hooksPath .githooks.commit-msg→ message formatpre-push→ branch name, blocks push tomain, fast unit tests
Unfinished work goes into main behind a feature flag, not on a long-lived branch.
| Workflow | When it runs |
|---|---|
backend-ci |
PR / push to main with changes in src/ or tests/ |
web-ci |
same, for web/ |
pr-title |
on every PR (PR title = commit on main due to squash merge) |
After the first push to GitHub, enable branch protection for main:
Require PR + required status checks (build-test, lint), without "Require approvals"
(a solo dev can't approve their own PR).