2f0ab18e81
- 4 PostgreSQL adapter stubs (Session, Mission, DecisionCase, Artifact) - Migration 001: Initial schema (sessions, missions, artifacts, decision_cases) - Persistence Independence Test: 6 tests verifying same behavior across InMemory and PostgreSQL implementations - ADR-008: PostgreSQL Adapters for Production - ADR-009: Persistence Independence Architecture Quality Gates: - Domain unchanged - Application unchanged - Only adapter implementation changes - Same test suite runs against both implementations Next: PR-003B — Schema & Migrations, PR-003C — Integration Tests, PR-003D — Unit of Work / Transactions
@landvex/infrastructure
Persistence adapters and infrastructure for LandveX domain.
Architecture
Domain (interfaces) ← Infrastructure (adapters)
- Domain defines repository interfaces (WHAT)
- Infrastructure implements them (HOW)
- Domain never depends on infrastructure
Repository Interfaces
| Interface | Purpose |
|---|---|
FieldSessionRepository |
Store/retrieve field sessions |
MissionRepository |
Store/retrieve missions |
DecisionCaseRepository |
Store/retrieve decision cases |
ArtifactRegistry |
Register/find artifacts |
EventStore |
Append-only event log |
UnitOfWork |
Coordinate multiple repositories |
In-Memory Adapters
For testing and development:
| Adapter | Data Structure |
|---|---|
InMemoryFieldSessionRepository |
Map<string, FieldSession> |
InMemoryMissionRepository |
Map<string, Mission> |
InMemoryDecisionCaseRepository |
Map<string, DecisionCase> |
InMemoryArtifactRegistry |
Map<string, Artifact> |
InMemoryEventStore |
Array |
InMemoryUnitOfWork |
Coordinates all above |
Future Adapters
| Adapter | Technology | Status |
|---|---|---|
| PostgreSQL repositories | PostgreSQL | Planned |
| S3 Artifact Registry | AWS S3 / Cloudflare R2 | Planned |
| Event Store | PostgreSQL / EventStoreDB | Planned |
ADRs
- ADR-006: In-Memory Adapters for Testing
Dependencies
@landvex/domain— repository interfaces depend on domain types