This directory contains all technical documentation for the Kovra B2B cross-border payment platform.
Orthogonal Thinking + Unix Philosophy:
- Modularity: Each document focuses on one concern
- Independence: Documents can be updated independently
- Composition: Cross-references link related concepts
- Clarity: No god documents; each has a single responsibility
New to Kovra? Start here:
- 00_OVERVIEW.md - Project vision, target market, quick links
- 01_ARCHITECTURE.md - High-level system design
Looking for specific info?
- State machines & ledger → 02_COMPONENTS.md
- KYC/AML compliance → 03_COMPLIANCE.md ⭐ (90% OxCaml + 10% Python)
- Deployment & infrastructure → 04_DEPLOYMENT.md
- External integrations → INTEGRATION.md
docs/
├── 00_OVERVIEW.md # Central index
├── 01_ARCHITECTURE.md # High-level system design
├── 02_COMPONENTS.md # State machines, ledger, services
├── 03_COMPLIANCE.md # KYC/AML: 90% OxCaml + 10% Python ⭐
├── 04_DEPLOYMENT.md # Infrastructure, observability
├── README.md # This file
├── INTEGRATION.md # External adapters
├── SECURITY.md # Auth, encryption
├── TIMELINE.md # Roadmap
├── account/ # Account-specific docs
│ └── FBO_NASTRO.md # FBO/Nostro structures
├── archive/ # Legacy docs
│ ├── ARCHITECTURE.md.legacy # Old god document (820 lines)
│ ├── ARCHITECTURE_REFACTOR_ANALYSIS.md # Refactor analysis
│ └── DATABASE.md.legacy # Old god database doc (1015 lines)
├── compliance/ # KYC/AML documentation (consolidated)
│ ├── README.md # Navigation guide
│ └── archive/ # Old compliance docs (reference only)
├── database/ # Database schemas (orthogonal)
│ ├── README.md # DB overview
│ ├── CORE.md # Payment tables
│ ├── COMPLIANCE.md # KYC/AML tables
│ ├── LEDGER.md # TigerBeetle schema
│ └── OPERATIONS.md # Jobs, config, cache
├── fix/ # Design fixes
│ ├── 001-fx-transfer-chain-redesign.md
│ └── 002-why-atomic-settlement-doesnt-fit-fx.md
└── explanation/ # Technical decisions
└── why-uint128-to-uint64.md
| Document | Purpose | Lines |
|---|---|---|
| 00_OVERVIEW.md | Central index, quick navigation | ~100 |
| 01_ARCHITECTURE.md | High-level system design, service topology | ~200 |
| 02_COMPONENTS.md | State machines, ledger, detailed service specs | ~400 |
| Document | Purpose | Lines |
|---|---|---|
| 03_COMPLIANCE.md | KYC/AML Compliance: 90% OxCaml + 10% Python ⭐ | ~1200 |
| 04_DEPLOYMENT.md | Infrastructure, observability, operations | ~400 |
| Document | Purpose | Status |
|---|---|---|
| compliance/archive/03_COMPLIANCE_LEGACY.md | Legacy Python/Mojo compliance | Archived |
| compliance/archive/03A_COMPLIANCE_TECH_STACK.md | Initial OxCaml proposal | Superseded |
| compliance/archive/ROADMAP_OXCAMl.md | 24-month roadmap | Merged into 03_COMPLIANCE |
| compliance/archive/INTEGRATION_GUIDE.md | Integration guide | Merged into 03_COMPLIANCE |
| Document | Purpose |
|---|---|
| INTEGRATION.md | BI-FAST, SEPA, FPS adapter specifications |
| SECURITY.md | Authentication, encryption, audit |
| TIMELINE.md | Development roadmap |
| Document | Purpose | Lines |
|---|---|---|
| database/README.md | Database overview & principles | ~200 |
| database/CORE.md | Payment domain tables | ~400 |
| database/COMPLIANCE.md | KYC/AML tables | ~500 |
| database/LEDGER.md | TigerBeetle schema | ~300 |
| database/OPERATIONS.md | Jobs, config, cache | ~300 |
| Document | Purpose |
|---|---|
| account/FBO_NASTRO.md | Account structure details |
| archive/ARCHITECTURE_REFACTOR_ANALYSIS.md | Why we split the docs |
| Document | Purpose |
|---|---|
| fix/001-fx-transfer-chain-redesign.md | FX implementation redesign |
| fix/002-why-atomic-settlement-doesnt-fit-fx.md | Settlement design rationale |
| explanation/why-uint128-to-uint64.md | Technical decision |
00_OVERVIEW.md (no deps)
│
├─► 01_ARCHITECTURE.md
│ └─► 02_COMPONENTS.md
│
├─► 03_COMPLIANCE.md (orthogonal - no deps)
│
├─► 04_DEPLOYMENT.md
│ └─► References all above
│
└─► INTEGRATION.md
Key Principle: No circular dependencies. Lower-numbered docs don't reference higher-numbered docs.
Payment Core (01_ARCHITECTURE.md, 02_COMPONENTS.md):
- Money movement
- FX conversion
- Wallet management
- State machines
Compliance Core (03_COMPLIANCE.md):
- KYC/AML screening
- Risk scoring
- Audit trail
- Regulatory reporting
Infrastructure (04_DEPLOYMENT.md):
- Deployment
- Monitoring
- Backup/recovery
- Security
These domains communicate via events, not direct coupling. Each can evolve independently.
Kovra works 100% standalone (no external API dependencies):
- Core functionality doesn't require third-party services
- External integrations are optional enhancements
- Can run air-gapped in standalone mode
See 03_COMPLIANCE.md section 0 for details.
- Choose the right document: Follow single responsibility principle
- Add cross-references: Link to related docs
- Update this README: If adding new document types
- Keep docs orthogonal: Don't duplicate content
- One concern per change: Don't mix compliance and deployment updates
- Update cross-references: Check if other docs need updating
- Maintain independence: Ensure orthogonal domains stay decoupled
Old, superseded documents are archived in:
- archive/ - Previous versions, refactor analysis
# Title
One-line description.
For related info, see [OTHER_DOC.md](OTHER_DOC.md).
---
## Section 1- Use relative links:
[doc](doc.md) - Add "See also" sections at end of major sections
- Include "Prev/Next" navigation at document end
- Use fenced blocks with language tags
- Include comments for complex logic
- Show interface contracts for orthogonal boundaries
- Use ASCII art for simple diagrams
- Use Mermaid for complex sequences
- Include text explanation alongside diagrams
| Date | Change |
|---|---|
| 2026-02-17 | SIMPLIFIED - Consolidated to single 03_COMPLIANCE.md (90% OxCaml + 10% Python), removed 03_COMPLIANCE_HYBRID.md |
| 2026-02-17 | ARCHIVED - Moved old compliance docs to compliance/archive/ (03_COMPLIANCE_LEGACY.md, 03A_COMPLIANCE_TECH_STACK.md, dll) |
| 2026-02-17 | NEW TECH STACK - Added OxCaml KYC/AML proposal (03A_COMPLIANCE_TECH_STACK.md) |
| 2026-02-17 | NEW FOLDER - Created compliance/ for KYC/AML-specific documentation |
| 2026-02-17 | NEW ROADMAP - Added ROADMAP_OXCAMl.md (24-month implementation plan) |
| 2026-02-15 | MAJOR REFACTOR - Split ARCHITECTURE.md into 5 focused docs (00-04) |
| 2026-02-15 | MAJOR REFACTOR - Split DATABASE.md (1015 lines) into 4 orthogonal schema docs |
| 2026-02-15 | Renamed COMPLIANCE.md → 03_COMPLIANCE.md for consistency |
| 2026-02-15 | Moved FBO_NASTRO_ACCOUNT.md → account/FBO_NASTRO.md |
| 2026-02-15 | Added comprehensive NOTES to INTEGRATION.md |
| 2026-02-15 | Added independence guarantee section to 03_COMPLIANCE.md |
| 2026-02-15 | Created orthogonal architecture documentation |
| 2026-02-15 | Established folder structure (account/, archive/, database/, fix/, explanation/) |
- Architecture questions? → 01_ARCHITECTURE.md
- Why did we split docs? → archive/ARCHITECTURE_REFACTOR_ANALYSIS.md
- Compliance questions? → 03_COMPLIANCE.md ⭐ (90% OxCaml + 10% Python)
- Deployment questions? → 04_DEPLOYMENT.md
Last Updated: 2026-02-17 (Simplified: single 03_COMPLIANCE.md dengan Hybrid 90/10 approach)