StellarSplit is a mobile-first crypto bill splitting app powered by:
- Frontend: React + Vite
- Backend: NestJS (Standalone Package)
- Blockchain: Stellar Network
- AI: Receipt OCR + LLM Parsing
- Database: PostgreSQL
- Cache: Redis
- Storage: S3-compatible storage
- Auth: JWT + Refresh Tokens
┌──────────────────┐
│ Mobile Web UI │
│ (React + Vite) │
└─────────┬────────┘
│
▼
┌──────────────────┐
│ API Gateway │
│ (NestJS) │
└─────────┬────────┘
│
┌────────────┬─────────────┬───────────────┐
▼ ▼ ▼ ▼
Auth Module Receipt Module Split Module Payment Module │ │ │ │ ▼ ▼ ▼ ▼ PostgreSQL AI Service Business Logic Stellar SDK
- JWT issuance
- Refresh tokens
- Role-based access
- Wallet linking
- Image upload
- OCR parsing
- AI structuring
- Confidence scoring
- Participant allocation
- Equal/custom split
- Debt tracking
- Stellar SDK integration
- XLM / USDC transfer
- Transaction confirmation
- Webhook verification
Users
- id
- passwordHash
- stellarPublicKey
Receipts
- id
- userId
- imageUrl
- parsedData (JSONB)
Splits
- id
- receiptId
- status
SplitParticipants
- id
- splitId
- userId
- amountOwed
- status
Payments
- id
- splitId
- transactionHash
- asset
- network
- User selects asset (XLM / USDC)
- Backend generates transaction payload
- Frontend signs via wallet
- Transaction submitted to Stellar
- Webhook confirms finality
- Split marked as completed
- Image upload
- OCR extraction
- LLM structuring
- Item detection
- Total verification
- Stored as structured JSON
- Password hashing (bcrypt)
- JWT Access + Refresh strategy
- Rate limiting
- Input validation (class-validator)
- Signed transaction verification
- Webhook signature validation
Production:
- Dockerized React + Vite frontend
- Dockerized NestJS API
- PostgreSQL (Managed)
- Redis (Managed)
- Stellar Mainnet
Test:
- Stellar Testnet
- Separate database instance
- Horizontal scaling (stateless API)
- Redis caching for split lookups
- Background workers for AI processing
- Webhook queue processing
End of Architecture Guide