A .NET 9 + PostgreSQL document builder with real-time collaboration (YJS), inline comments and @mentions, full version history, dynamic-table data binding, artifact sharing, and Playwright-based PDF export.
Backend-first. A minimal test UI is included to exercise every feature end-to-end.
Prerequisites: Docker Desktop, .NET 9 SDK, EF Core CLI (dotnet tool install -g dotnet-ef)
First-run (three commands):
# 1. Start Postgres
docker compose up -d
# 2. Apply migrations
dotnet ef database update --project src/DocumentBuilder.Infrastructure --startup-project src/DocumentBuilder.Api
# 3. Run the API
dotnet run --project src/DocumentBuilder.ApiThen verify: GET http://localhost:5000/health should return {"status":"ok","db":"ok"} (HTTP 200).
Connection string — appsettings.Development.json points to localhost:5432 with user/password postgres/postgres. For production or team environments, override via environment variable:
export ConnectionStrings__Default="Host=...;Port=5432;Database=documentbuilder;Username=...;Password=..."Or use .NET User Secrets:
cd src/DocumentBuilder.Api
dotnet user-secrets set "ConnectionStrings:Default" "Host=localhost;Port=5432;Database=documentbuilder;Username=postgres;Password=<your-password>"Tear down:
docker compose down # stop containers (data volume preserved)
docker compose down -v # stop + delete volume (fresh state)Install Playwright browsers (one-time after first build):
# Build first so the playwright.ps1 bootstrap script is available
dotnet build src/DocumentBuilder.Api
# Install headless Chromium
pwsh src/DocumentBuilder.Api/bin/Debug/net9.0/playwright.ps1 install chromiumFor Release builds:
dotnet build src/DocumentBuilder.Api --configuration Release
pwsh src/DocumentBuilder.Api/bin/Release/net9.0/playwright.ps1 install chromium| Scenario | Target | Notes |
|---|---|---|
| Warm (browser already launched, new context) | ≤ 5 s | NewContextAsync + NewPageAsync + GotoAsync("about:blank") |
| Cold (first request after app start) | ≤ 30 s | Includes Playwright.CreateAsync() + Chromium.LaunchAsync() |
Verify with the smoke endpoint after startup:
curl http://localhost:5000/api/debug/pdf-smoke
# → {"status":"ok","launchMs":412}launchMs measures only the context/page/navigate round trip (warm path). The first call will be slower (cold browser launch); subsequent calls should be well within the 5 s warm budget.
In CI the browsers directory (~/.cache/ms-playwright) is cached via actions/cache keyed on the Infrastructure .csproj hash, so Chromium is downloaded only when the Playwright version changes.
Pre-scaffolding. See plan.md for the delivery plan, waves, and per-milestone ticket breakdown.
Linear project: Document Builder · target 2026-09-30
- .NET 9 (ASP.NET Core Web API)
- PostgreSQL (EF Core, JSONB for document state)
- Y.js CRDT via WebSocket for real-time collaboration
- Playwright (headless Chromium) for PDF export
- React + Vite test UI
src/
DocumentBuilder.Api/ # ASP.NET Core host
DocumentBuilder.Core/ # Domain, controls registry, contracts
DocumentBuilder.Infrastructure/ # EF Core, Postgres, providers
tests/
DocumentBuilder.UnitTests/
DocumentBuilder.IntegrationTests/
ui/ # React test UI (M8)
scripts/ # validate-obj-NNN.ps1 per ticket
validation/ # captured DB + API evidence per ticket
- Branch per ticket from
mainusing Linear'sgitBranchName - One PR per ticket, base branch
main, squash-merge - No ticket merges without both a DB check and a live-API check captured under
validation/ - See
plan.mdfor the full per-ticket workflow and CI gates