Docs/Documentation

Getting Started

The Modern AI Stack

Last updated March 3, 2026

The Blueprint for building scalable, production-ready AI applications.

When building a modern AI application, you need three foundational layers. We call this the "VSC Stack" (Vercel, Supabase/Neon, Cencori) — or effectively: Frontend, Database, Intelligence.

Framework

Next.js


The React framework. Handles UI, routing, and streaming responses.

Deployment

Vercel


The global edge network. Handles caching, serving, scaling and deployment.

Database

Supabase


The source of truth. Handles auth, structured data (SQL), and relational integrity.

AI

Cencori


The cognitive engine. Handles LLM orchestration, vector memory, security, and agents.

Why separate "Intelligence" from "Database"?

A common mistake is trying to stuff embeddings and AI logic into your primary database (e.g., using pgvector for everything).

While powerful, this mixes concerns:

  1. Bloat: Vectors are heavy. Mixing them with transactional data slows down backups and migrations.
  2. Complexity: Managing vector indexes (HNSW/IVFFlat) requires specialized tuning.
  3. Security: AI prompts need different security rules (PII redaction) than SQL rows.

Cencori acts as the specialized "AI Database", sitting alongside your Postgres "App Database".

The Reference Architecture

Here is how the data flows in a production system:

User Request
Step 1
Next.js Frontend
User sends a request via React / Next.js UI
Step 2
Auth — Supabase / Clerk
Session validated, user identity confirmed
Step 3
Database — Neon / Postgres
Structured data fetched (user profile, preferences)
context passed
Steps 4–5
Cencori — Intelligence Layer
Vector Memory / RAG
Security Scan
LLM Routing
Cost Tracking
Audit Logging
Failover
routed
Providers
OpenAI
Anthropic
Google
Mistral
DeepSeek
xAI
streamed
Step 6
Response
Streamed back to the user in real-time
The VSC Stack — Vercel (Frontend) + Supabase (Database) + Cencori (Intelligence)

Capabilities Matrix

FeatureProviderWhy?
RenderingVercelBest-in-class React framework & Edge Network.
Users & AuthSupabaseRobust RLS (Row Level Security) & easy Auth helpers.
TransactionsNeonServerless branching matching Vercel's preview deployments.
Memory/RAGCencoriManaged Vector Store tailored for high-speed retrieval.
SecurityCencoriDedicated PII Redaction & Prompt Injection firewall.
ObservabilityCencoriAI-specific traces (what token caused the error?).

Start Building

Choose your backend integration to get started: