Architecture Designed for Hard Isolation & Zero Data Leakage
Unlike generic wrapper tools, Aesthetic AI is built on deterministic database constraints, transactional tenant contexts, and dual-layer caching.
PostgreSQL Row-Level Security (RLS)
Enforced at the engine layer
Every tenant query executes inside a transaction-local session setting: SET LOCAL app.current_tenant_id = $1.
PostgreSQL policies evaluate FORCE ROW LEVEL SECURITY on every table. If tenant context is omitted, the query fails closed immediately.
Zero-Credit Semantic Cache (L1 + L2)
Never pay twice for the same question
L1 Exact Match: Sub-millisecond Redis cache keyed by SHA-256 hash of normalized questions and tenant knowledge versions.
L2 Semantic Match: pgvector cosine distance retrieval over previously answered queries. If similarity exceeds 0.95, cached answers return for 0 credits.
Multilingual Cross-Query RAG
True cross-lingual factual grounding
International patients ask in Russian, German, Arabic, or English. Our embedding space maps semantic intent directly against Turkish source documents.
The response is synthesized strictly in the visitor's requested language while citing grounded factual evidence. Unverified claims are rejected without hallucination.
Cloudflare Workers & V8 Isolates
Sub-50ms TTFB across 300+ edge cities
Both the public API and marketing site run on Cloudflare Workers isolates without Node.js container spin-up delays or cold starts.
Zero native C++ binary dependencies: All hashing and cryptographic signatures leverage the standardized W3C Web Crypto API.
Enterprise Governance & Auditability
Every sensitive action — tenant creation, team invitations, role changes, credit grants, and document uploads — is recorded in an immutable append-only audit log with IP, actor ID, and cryptographic timestamp.