PROJECT MASTER PLAN - EastPay v2

Last Updated: January 2026
Current Phase: Phase 1 - Basic Operations
Status: In Development

1. Vision & Mission

What is EastPay?

EastPay v2 is a hybrid AI-driven currency exchange platform (Crypto <-> Fiat) operating primarily via Telegram. It serves clients in Southeast Asia, UAE, and Russia.

Mission

Create an "Uber-like" experience for currency exchange, replacing manual operator work with intelligent AI agents while maintaining strict financial accuracy.

Key Philosophy

"Deterministic Execution, AI Support"

2. Success Metrics

Metric Target Rationale
Zero Calculation Errors 100% Rates are calculated by formula, never by LLM
Admin Control 100% coverage Every deal over threshold must be manually approved
User Speed < 60 seconds From "Start" to "Request Sent"
Operator Efficiency 3x improvement AI handles routine queries

3. Current Development Phase

Phase 1: Basic Operations (CURRENT)

Completed Tasks

In Progress

Blocked/Pending

Phase 2: Advanced Rates & Logic

Phase 3: AI & Automation

Phase 4: Scale & Optimize

4. System Components Overview

┌─────────────────────────────────────────────────────────────────┐
│                        EastPay v2 Architecture                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  [Telegram User]                                                │
│        │                                                        │
│        ▼                                                        │
│  ┌─────────────┐                                                │
│  │   Typebot   │ (Hostinger/Coolify)                           │
│  │ bot.eastpay │ - Collects user input                         │
│  └──────┬──────┘ - Handles KYC flow                            │
│         │                                                       │
│         ▼                                                       │
│  ┌─────────────┐                                                │
│  │    n8n      │ (Hostinger/Coolify)                           │
│  │ Orchestrator│ - Calculates rates                            │
│  └──────┬──────┘ - Creates orders                              │
│         │                                                       │
│         ▼                                                       │
│  ┌─────────────┐                                                │
│  │  Supabase   │ (Cloud)                                       │
│  │  Database   │ - Single Source of Truth                      │
│  └──────┬──────┘ - Auth, RLS, Realtime                         │
│         │                                                       │
│         ▼                                                       │
│  ┌─────────────┐                                                │
│  │   Refine    │ (Netlify)                                     │
│  │ Admin Panel │ - Order management                            │
│  └─────────────┘ - Rate management                             │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

5. Key Decisions Log

Date Decision Rationale
Jan 2026 Use Refine v4 (not v5) Router compatibility with react-router-v6 v4
Jan 2026 Ant Design v5 Stable, enterprise-ready UI
Jan 2026 Self-hosted Typebot Full control, no vendor lock-in
Jan 2026 Supabase for Auth + DB Free tier sufficient, RLS built-in

6. Risk Registry

Risk Probability Impact Mitigation
Rate calculation errors Low Critical Formula-based calc, no LLM
Typebot downtime Medium High Coolify monitoring, backups
Supabase rate limits Low Medium Upgrade plan if needed
Version conflicts (Refine) High Medium Lock versions in package.json

7. Team & Responsibilities

Role Responsibility Tools
Admin Full system access, rate management Admin Panel
City Manager Local rates, cash flow in specific city Admin Panel (limited)
Operator Process deals, check receipts Admin Panel (limited)
Client Exchange currency Telegram Bot

8. AI Agent Instructions

When working on this project:

  1. Always check current phase - Focus on Phase 1 tasks first
  2. Reference docs before implementing:
    • DATABASE_SCHEMA.md - Data structure
    • DOMAIN_MODEL.md - Business logic
    • TECH_STACK.md - Version constraints
  3. No over-engineering - Implement only what's needed for current phase
  4. Test with seeders - Use test data to verify implementations

9. Quick Reference Links