AviaPOS is a lightweight, modular, offline-capable merchant operating system designed for African SMEs. The platform focuses on four core merchant needs: secure payment collection, inventory management, debt and credit tracking, and business visibility.
# AviaPOS Architecture
## What AviaPOS Is
AviaPOS is a Merchant Operating System designed for African SMEs.
It is intentionally not an ERP.
The platform focuses on four core merchant activities:
1. Sales
2. Inventory
3. Expenses
4. Receivables
These four domains provide the majority of operational visibility required by small and medium businesses.
---
## Architectural Principles
### Event-First
Business actions generate immutable events.
Examples:
- Sale Created
- Inventory Received
- Expense Recorded
- Debt Created
Events become the source of truth.
---
### PostgreSQL as System of Record
PostgreSQL stores:
- Event Store
- Snapshots
- Projections
- Merchant Metadata
The database is the authoritative ledger.
---
### Redis as Event Transport
Redis Streams distribute events to workers.
This enables:
- Asynchronous projections
- Background processing
- Future RailOne integration
- Horizontal scaling
---
### Offline First
AviaPOS is designed to operate in environments with unreliable connectivity.
Future mobile clients maintain a local event store and synchronize business events when connectivity becomes available.
Synchronization is event-based rather than state-based.
---
### Snapshot-Based Recovery
Aggregates are periodically snapshotted.
Recovery flow:
Snapshot
→ Load State
→ Replay Remaining Events
instead of replaying the entire event history.
---
### RailOne Compatibility
AviaPOS is designed to integrate with RailOne without custody of customer funds.
AviaPOS produces business events.
RailOne handles routing, settlement, liquidity visibility, and payment orchestration.
## Core Business Domains
AviaPOS intentionally focuses on four merchant domains:
### Sales
Tracks money entering the business.
### Inventory
Tracks stock movement and inventory valuation.
### Expenses
Tracks money leaving the business.
### Receivables
Tracks money owed to the business.
Together these provide a complete operational picture for most …