Files
rick 212f19ac19 Add v6-rewrite OpenSpec: proposal, design, specs, and tasks
Complete specification for rewriting Swarmops v5 as using.cash v6:
- Proposal: scope buckets (Working Rewrite / First Beyond Working / Maybe),
  non-goals (governance, geography, memberships permanently cut)
- Design: 18 architectural decisions including preserved patterns
  (Basic/Logic, stored procs, credential split), new patterns (repository
  classes, chain abstraction, rate providers), and operational concerns
  (Galera awareness, continuation transactions, VAT booking, OOD
  denormalization)
- Specs: 17 capability specifications with SHALL/MUST requirements and
  WHEN/THEN scenarios, covering accounting core, AP/AR, crypto treasury,
  exchange rates, organizations, users/auth, documents, comms, dashboard,
  end-of-month, backend worker, event bus, data migration, API layer,
  frontend app, and CI/packaging
- Tasks: 145 implementation tasks grouped by subsystem, ordered by
  dependency (migration gates API/frontend work)

Two rounds of adversarial review incorporated.

Made-with: Cursor
2026-04-08 16:02:58 +02:00

2.6 KiB

ADDED Requirements

Requirement: Gitea Actions CI pipeline

The system SHALL have a CI pipeline running on Gitea Actions (git.falkvinge.net) that builds, tests, and packages the application on every push and pull request.

Scenario: Push triggers CI

  • WHEN a developer pushes to any branch
  • THEN the CI pipeline runs build, test, and lint stages

Scenario: Build failure blocks merge

  • WHEN a CI build fails on a pull request
  • THEN the PR is not mergeable until the build passes

Requirement: Docker image build

The CI pipeline SHALL produce a Docker image as the deployment artifact. The image uses a multi-stage build: build stage compiles the .NET backend and builds the React frontend; runtime stage contains only the .NET runtime, compiled backend, and built frontend static assets.

Scenario: Multi-stage Docker build

  • WHEN the CI pipeline reaches the packaging stage
  • THEN a Docker image is built containing the backend runtime and frontend static assets

Scenario: Image pushed to registry

  • WHEN the Docker build succeeds on the main branch
  • THEN the image is tagged and pushed to the configured container registry

Requirement: Automated testing and linting in CI

The CI pipeline SHALL run: .NET unit/integration tests (dotnet test), .NET analyzers/linting, frontend tests (npm test) if present, and frontend linting (npm run lint). Test or lint failures fail the pipeline.

Scenario: Backend tests run

  • WHEN the CI test stage executes
  • THEN all .NET test projects are discovered and run

Scenario: Test failure

  • WHEN any test fails
  • THEN the pipeline fails and reports which tests failed

Scenario: Lint failure

  • WHEN .NET analyzers or frontend ESLint report errors
  • THEN the pipeline fails and reports the violations

Requirement: Solution structure

The .NET solution SHALL use SDK-style project files targeting .NET 8+. Project structure: UsingCash.Common, UsingCash.Basic, UsingCash.Database, UsingCash.Logic, UsingCash.Api (web host + API endpoints), UsingCash.Backend (hosted service, may be in-process with Api), UsingCash.Migration (ETL tool), UsingCash.Tests (references Common, Basic, Database, Logic, Api, Migration for integration tests).

Scenario: Solution builds

  • WHEN a developer runs dotnet build on the solution
  • THEN all projects compile without errors targeting .NET 8+

Scenario: NuGet dependencies

  • WHEN the solution restores dependencies
  • THEN all external libraries (MySqlConnector, NBitcoin, etc.) are resolved from NuGet — no checked-in DLLs