Skip to main content

SalesArck Documentation

Version 2.0 · Multi-Vendor Loyalty & Rewards Platform

What is SalesArck?

SalesArck is a multi-tenant loyalty SaaS that ingests POS transaction data from Square and Clover, computes rewards using SalesArck-owned business logic, and delivers earn/redeem experiences for consumers across many merchants — all with strict tenant isolation and a financial-grade audit trail.


Quick Navigation


Platform at a Glance

PropertyValue
Tenancy ModelMulti-tenant, software-level isolation
POS ProvidersSquare (Payments API + Webhooks), Clover (REST + Webhooks)
Auth MethodSupabase Auth OTP (mobile + email), no passwords
Reward ModelPoints-per-spend, configurable per tenant
Transaction IngestionWebhook-first ≤ 60s, poll fallback ≤ 5min
Ledger PatternAppend-only, double-entry inspired
Accuracy Target≥ 99.99% reward calculation accuracy
Primary StackNode.js / TypeScript, Hono, React, Supabase Postgres, Drizzle ORM
DeploymentRender (API) + Vercel (Web) + scheduler-driven poll fallback
Environmentslocal · dev · staging · prod

Three User Roles

Consumer ─── Earns and redeems points across merchant wallets
Client ─── Merchant operator: configures rules, views analytics, manages POS
Admin ─── SalesArck platform operator: global access, fraud controls, support

Non-Negotiable Guardrails

Security rules that must never be broken
  1. Never trust tenant identity from the client UI — always derive server-side from JWT
  2. Critical mutation and ingest paths must be idempotent — enforce dedup keys + DB constraints
  3. Reward events are append-only — never mutate historical ledger entries
  4. All admin actions generate immutable audit logs with actor, reason, before/after state
  5. No cross-tenant data leakage — tenant middleware enforced on every query

TL;DR for Developers

Build a strict multi-tenant loyalty platform where POS is a read-only data source. Treat reward and wallet state like financial data: append-only ledger + full auditability. Prioritize idempotency, tenant isolation, and observability before feature breadth. Use enterprise-capable managed services with free starter tiers, and plan for Supabase OTP/SMS delivery cost.

Written byDhruv Doshi