Six layers make an app. Two more guard and watch them all.
Read it from the top down: from what people touch to the machines it runs on. Open a layer to see what is inside, in plain words.
01
Frontend
What people see and touch
CORS, XSS, CSP
Error Tracking
Web Mobile Desktop
Frontend
What people see and touch
Web Mobile Desktop
The screens, buttons and forms. One product can have several fronts that share the same backend.
- Web
- Runs in the browser. Nothing to install, opens from a link, updates the moment we release.
- Mobile
- iOS and Android apps from the stores, with push notifications, camera and offline work.
- Desktop
- Apps for Mac and Windows, for heavy daily work, local files and keyboard-first use.
- CORS, XSS, CSP
- Browser rules that stop other sites and injected scripts from acting as your user.
- Error Tracking & Real User Monitoring
- Every crash and every slow screen on a real device is reported to us, usually before a user writes in.
02
AI
The part that thinks
Prompt Injection, ZDR
AI Tracing
Models Gateway Harness Agents Skills Tools Memory RAG Policies Evals
AI
The part that thinks
Models Gateway Harness Agents Skills Tools Memory RAG Policies Evals
Models are only one piece. The rest is what makes a model useful and safe inside a real product.
- Models
- The LLMs that do the reasoning. Picked per task by quality, speed and price.
- Gateway
- One door to every model provider. Switch models, cap spend, and fall back when one is down.
- Harness
- The loop around a model that lets it take steps, call tools and check its own work.
- Agents
- A model with a goal and a set of tools that works through a task on its own.
- Skills
- Packaged instructions for doing one kind of job well, loaded only when needed.
- Tools
- Actions the AI may take: search, send an email, create an invoice.
- Memory
- What the AI keeps between conversations, so nobody has to explain things twice.
- RAG
- Finds the right pieces of your documents and hands them to the model before it answers.
- Policies
- Rules for what the AI may see, say and do. Enforced outside the model, so it cannot talk its way around them.
- Evals
- Tests for AI answers. They tell us whether a change made things better or worse.
- Prompt Injection, ZDR
- Defences against text that tries to hijack the AI, and zero data retention, so model providers keep nothing you send.
- AI Tracing
- A record of every model call: the prompt, the tools it used, what it cost and how long it took.
03
Backend
The rules of the business
Secrets, Rate Limits
Traces
Database Adapter Storage Adapter Auth RBAC Jobs Server Functions Realtime API MCP
Backend
The rules of the business
Database Adapter Storage Adapter Auth RBAC Jobs Server Functions Realtime API MCP
The server side. It decides who may do what and keeps every front and every AI agent telling the same story.
- Database Adapter
- One way for the code to talk to the database, so the database can change without a rewrite.
- Storage Adapter
- The same idea for files: any S3-compatible storage plugs in.
- Auth
- Who you are. Sign-in, sessions, SSO, one-time codes and magic links.
- RBAC
- What you may do. Roles and permissions, checked on every request.
- Jobs Queues
- Slow work done in the background, in order, with retries when something fails.
- Server Functions
- The business logic itself. It runs on the server, where users cannot tamper with it.
- Realtime
- A change made by one person appears for everyone else at once, with no reload.
- API
- How other systems talk to the app.
- MCP
- How AI assistants talk to the app: a standard connector, so any assistant can use it.
- Secrets, Rate Limits
- Keys and passwords live in a vault, never in the code. Rate limits stop abuse and password guessing.
- Traces
- Follows one request through every service, so we see exactly where the time went.
04
Data
Where everything is kept
RLS, Backups, Encryption
Query Insights
Database Storage Cache Specialized Databases
Data
Where everything is kept
Database Storage Cache Specialized Databases
Different storage for different data: records, special workloads, files, and things that must come back instantly.
- Database Postgres
- Records with relations: customers, orders, invoices. The source of truth.
- Storage S3-compatible
- Files: documents, images, video, exports.
- Cache Redis / KV
- A fast short-term copy of things that are asked for all the time.
- Specialized Databases Vector / Search / Time-series
- Extra databases for jobs Postgres is not the best at: meaning-based search for AI, full-text search, analytics or time-series.
- RLS, Backups, Encryption
- Row-level security so each customer sees only their own rows, encryption at rest and in transit, and backups that are tested by restoring them.
- Query Insights
- Shows which database queries are slow or run too often, so we fix them before users feel it.
05
Containerization
How the app is packed and run
Non-root, Image Scanning
Logs
Docker Kubernetes
Containerization
How the app is packed and run
Docker Kubernetes
The app is packed into sealed boxes that run the same way on a laptop and in production.
- Docker
- Packs the app together with everything it needs, so it runs the same everywhere.
- Kubernetes
- Runs many containers at once, restarts the ones that fail and adds more under load.
- Non-root, Image Scanning
- Containers run without admin rights, and every image is scanned for known vulnerabilities before it ships.
- Logs
- Everything each container wrote down, collected in one searchable place.
06
Infrastructure
The machines underneath
DDoS, Firewall, VPN, WAF
Metrics
AWS Microsoft Azure Google Cloud Custom
Infrastructure
The machines underneath
AWS Microsoft Azure Google Cloud Custom
Servers, networks and disks. Because of the layers above, the choice here is yours and it can change later.
- AWS
- Amazon Web Services.
- Microsoft Azure
- A natural fit when the company already lives in Microsoft.
- Google Cloud
- Google Cloud Platform.
- Custom
- Your own servers or a private cloud, when data must stay inside.
- DDoS, Firewall, VPN, WAF
- The outer wall: protection from traffic floods, closed ports, private access for the team and a filter for malicious requests.
- Metrics
- CPU, memory, disk and network as numbers over time, with alerts when they go wrong.
Security and Observability are the two layers that run across the others. Each layer is protected in its own way and reports in its own way, so little gets in, and when something breaks we know where, why and for whom.
Each layer does one job and can be swapped without touching the others. That is why the product can move clouds, change AI models or add a mobile app without a rewrite.
Watch it. Nine videos, two minutes each.
Most of these have a two-minute video.
Academy







