Skip to content
@Sapliy

Sapliy

Event-driven automation & policy platform for fintech and business flows.

Sapliy Fintech Architecture

Event-driven automation & policy platform for fintech and business flows

A self-hosted alternative to Stripe + Zapier, focused on finance + operations.


Core Mental Model

Everything in Sapliy reduces to 4 core concepts:

graph TD
subgraph Organization["🔑 Organization"]
direction TB
subgraph ZoneProd["🧩 Zone: Production"]
direction TB
P_Events[⚡ Events]
P_Flows[🔄 Flows]
P_Events --> P_Flows
end
subgraph ZoneStaging["🧩 Zone: Staging"]
direction TB
S_Events[🧪 Events]
S_Flows[🔄 Flows]
S_Events --> S_Flows
end
end
subgraph FlowEngine["⚙️ Execution Engine"]
Logic{Logic & Rules}
Approval[👤 Approval]
Audit[📝 Audit]
end
subgraph Outputs["📤 Actions & Ledger"]
Ledger[(💰 Ledger)]
Webhook[🌐 Webhook]
Notify[✉️ Notify]
end
P_Flows --> Logic
S_Flows --> Logic
Logic --> Approval
Approval --> Audit
Audit --> Webhook
Audit --> Notify
Audit --> Ledger
classDef zone fill:#f9f9f9,stroke:#333,stroke-width:1px;
class ZoneProd,ZoneStaging zone;
Loading

🔑 Organization

  • Owns everything
  • Has users, teams, policies
  • Root of all access control

🧩 Zone

The key abstraction. A zone is an isolated automation space combining:

  • sapliy_secret_key (server-side)
  • sapliy_publishable_key (client-side)
  • Mode: test | live
  • Flows, Events, Logs

Think: Stripe Account + Webhook Endpoint combined

⚡ Event

Everything is an event:

  • From SDK (sapliy.emit("checkout.clicked", {...}))
  • From UI interactions
  • From external providers (Stripe, payment gateways)
  • From the gateway itself

No event → nothing happens.

🔄 Flow (Automation)

Flows listen to:

  • Event type
  • Zone

Then execute:

  • Logic (conditions, filters, approvals)
  • Actions (webhooks, notifications, audit logs)
  • Policy checks

This is the core value proposition.


Repository Responsibility Matrix

RepositoryPurposeTalks ToDoes NOT
fintech-ecosystemThe brain: auth, orgs, zones, keys, events, flows, ledger, policy enginePostgreSQL, Kafka, Redis, RabbitMQCare about UI, SDK language
fintech-sdk-nodeNode.js SDK: emit events, verify signatures, retry, test/live modefintech-ecosystem APIContain business logic or flow execution
fintech-sdk-goGo SDK: same as Nodefintech-ecosystem APIContain business logic or flow execution
fintech-sdk-pythonPython SDK: same as Nodefintech-ecosystem APIContain business logic or flow execution
fintech-uiReact components: checkout, payment forms, dashboardsUses publishable_key onlyExecute logic, hold secrets, admin actions
fintech-automationFlow Builder UI: visual automation editorfintech-ecosystem onlyExecute logic, talk directly to SDK users
sapliy-cliDeveloper CLI: login, listen, trigger, debugfintech-ecosystem WebSocketHold state, execute production logic
fintech-docsDocumentation siteStatic content

System Architecture

graph TB
subgraph "Developer Experience"
SDK[SDK: Node/Go/Python]
CLI[Sapliy CLI]
UI[Fintech UI Components]
end
subgraph "Automation Layer"
FlowBuilder[Flow Builder UI]
end
subgraph "Core Platform - fintech-ecosystem"
Gateway[API Gateway :8080]
Auth[Auth Service :8081]
Payments[Payments :8082]
Ledger[Ledger :8083]
Zones[Zone Manager]
FlowEngine[Flow Engine]
Events[Event Bus]
end
subgraph "Infrastructure"
PG[(PostgreSQL)]
Kafka[(Kafka/Redpanda)]
Redis[(Redis)]
RMQ[(RabbitMQ)]
end
SDK --> Gateway
CLI --> Gateway
UI --> Gateway
FlowBuilder --> Gateway
Gateway --> Auth
Gateway --> Zones
Gateway --> Payments
Gateway --> Ledger
Payments --> Events
Events --> FlowEngine
FlowEngine --> Kafka
FlowEngine --> RMQ
Auth --> PG
Payments --> PG
Ledger --> PG
Zones --> PG
Loading

Zone & Key Model

Every zone operates in two modes with separate isolation:

Test ModeLive Mode
Secret Keysk_test_...sk_live_...
Publishable Keypk_test_...pk_live_...
LogsSeparateSeparate
FlowsCan be shared or separateCan be shared or separate
EventsTest events onlyProduction events

This reduces fear for companies to experiment without risking production.


Security Model

Webhook Security

All webhooks include:

  • Signature header: HMAC-SHA256
  • Event ID: Idempotency
  • Zone ID: Context
  • Timestamp: Replay protection
POST /webhook HTTP/1.1X-Sapliy-Signature: sha256=abc123...X-Sapliy-Event-ID: evt_123X-Sapliy-Zone-ID: zone_456X-Sapliy-Timestamp: 1706972400

API Key Scopes

Keys can be scoped to specific operations:

  • events:emit — Send events
  • flows:read — View flows
  • flows:write — Create/edit flows
  • admin:* — Full access

Policy-Based Access Control (PBAC)

Phase 1: Hardcoded Policies (Current)

- "Who can create zones" → Admin only
- "Who can deploy live flows" → Admin + Finance

Phase 2: Simple JSON Policies

{
"allow": ["flow.deploy"],
"when": { "role": "admin" }
}

Phase 3: Full Policy Engine (Future)

OPA-style policy language for complex rules.


Monetization Strategy

TierFeaturesPrice
Free1 zone, 1K events/month$0
Starter3 zones, 10K events$29/mo
ProUnlimited zones, 100K events$99/mo
EnterpriseCustom, SLA, complianceContact

Revenue drivers:

  • Zone count
  • Event volume
  • Notifications (WhatsApp, SMS)
  • Third-party plugins
  • Hosted execution
  • SLA guarantees

Getting Started

  1. Run the ecosystem: docker-compose up -d in fintech-ecosystem
  2. Create a zone: Use the API or Flow Builder UI
  3. Install SDK: npm install @sapliyio/fintech
  4. Emit events: sapliy.emit("checkout.completed", { amount: 100 })
  5. Build flows: Use the Flow Builder to react to events

Related Repositories


License

MIT © Sapliy

Popular repositories Loading

  1. fintech-ecosystem fintech-ecosystemPublic

    First microservice for financial operations, featuring a secure API Gateway, distributed services, and a Stripe-inspired CLI for seamless local development.

    Go 4 1

  2. fintech-sdk-node fintech-sdk-nodePublic

    Official Node.js SDK (npm:@sapliyio/fintech)

    TypeScript 1

  3. fintech-sdk-go fintech-sdk-goPublic

    Official Go SDK module

    Go 1

  4. sapliy-cli sapliy-cliPublic

    Enhanced CLI tool for developers

    HTML 1

  5. fintech-automation fintech-automationPublic

    Automation flow for all payments and transitions

    TypeScript 1

  6. fintech-sdk-python fintech-sdk-pythonPublic

    Official Python SDK (PyPl: sapliyio-fintech)

    Python

Repositories

Showing 10 of 12 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…