Architecture Overview
Client → API → AI services → contracts. Minimal onchain writes, quick feedback.
Flow, end to end
You speak. The client streams audio to our API with a session token.
AI services transcribe, score pronunciation, and generate targeted feedback.
The backend verifies lesson criteria, then commits a minimal completion record on chain.
Rewards are computed and claimed, subject to caps and hourly budgets.
You spend YAP in app. Contracts burn 50 percent and route 50 percent to the treasury.
Key pieces
Clients: Mobile and web, wallet abstracted so sign-up works with email or phone.
Backend API: Node service with strict rate limits, idempotent endpoints, and signed requests.
AI layer: Stateless workers handle speech, phrasing, and scoring with low latency.
Data: Postgres for app state, object storage for short-lived audio, Redis for queues and caches.
Chain access: RPC through managed providers, event indexer for real-time dashboards and audits.
Observability: Central logs, metrics, and traces, with alerting on error rate, latency, and oracle health.
Security: TLS everywhere, HSTS, key management with HSMs, least-privilege roles, regular backups and drills.
Onchain vs offchain Onchain: completion proofs, reward routing, burns, treasury splits, locks, and caps. Offchain: AI inference, user PII, raw audio, personalization data, KYC artifacts.
Last updated