AI App Architecture Example
A complete walkthrough of a real AI app's architecture — every node, every connection, every database table. We use a review reply manager as the example and break down each component so you can apply the pattern to your own idea.
The example app
For this example, we'll use a Review Reply Manager — an app that helps local business owners respond to Google reviews. It fetches new reviews, uses AI to classify sentiment and draft replies, and routes every draft through a human approval gate before posting.
We chose this example because it touches every component of AI app architecture: frontend pages, backend APIs, a database, AI prompts, a human checkpoint, an external service (Google Business API), and a scheduler (cron job for fetching reviews). If you understand this architecture, you can build any AI app.
This is the same app as our Review Reply Manager blueprint. This page breaks down the architecture decisions; the blueprint page has the full Cursor export prompt.
Architecture diagram
11 nodes total: 3 frontend pages, 2 APIs, 2 AI prompts, 1 human checkpoint, 1 database, 1 cron job. This is a typical size for an AI app — small enough to build in a weekend, complex enough to be useful.
Node-by-node breakdown
Frontend pages (3 nodes)
Dashboard
Purpose: Show all recent reviews at a glance
Displays a paginated list of reviews with sentiment badge (green/amber/red), star rating, review text snippet, and reply status (no draft / draft ready / approved / posted). Business owner filters by sentiment, platform, or date. A reply rate metric shows what percentage of reviews have been responded to.
Reply Editor
Purpose: Review and edit AI-drafted replies
Side-by-side view: original review on the left, AI-drafted reply on the right. Business owner can edit the draft text, adjust tone, regenerate with different parameters, or reject entirely. Shows sentiment analysis breakdown so the owner understands why the AI drafted what it did. Approve button posts the reply to Google Business.
Settings
Purpose: Configure the app
Connect Google Business Profile via OAuth. Set business name and industry (used by the AI to personalize replies). Configure reply tone (professional, warm, casual). Set the fetch interval for new reviews. Toggle auto-draft generation for positive reviews (negative reviews always require manual drafting).
Backend APIs (2 nodes)
Reviews API
Endpoints: GET /api/reviews, GET /api/reviews/:id, POST /api/reviews/sync
The Reviews API serves review data to the frontend. GET /api/reviews returns a paginated list with sentiment and reply status. GET /api/reviews/:id returns a single review with full text, sentiment breakdown, and draft if one exists. POST /api/reviews/sync is a manual trigger to fetch new reviews from Google Business API (normally handled by the cron job).
Replies API
Endpoints: POST /api/replies/draft, PATCH /api/replies/:id, POST /api/replies/:id/post, GET /api/replies/stats
The Replies API handles the reply lifecycle. POST /api/replies/draft triggers the Reply Drafter AI for a specific review. PATCH /api/replies/:id edits the draft text, approves it, or rejects it. POST /api/replies/:id/post publishes an approved reply to Google Business. GET /api/replies/stats returns reply rate, average response time, and sentiment distribution.
AI prompts (2 nodes)
Sentiment Analysis
Input: review text + star rating → Output: sentiment label + confidence + topics
This AI prompt classifies each review as positive, neutral, or negative. It takes the review text and star rating as input, and returns a sentiment label, a confidence score (0-1), an array of topics mentioned (service, product, staff, pricing, location), and a one-line summary of the review's core message. The sentiment determines how the reply is drafted — negative reviews get empathetic, resolution-focused replies; positive reviews get thank-you replies.
Reply Drafter
Input: review text + sentiment + topics + business name + tone → Output: draft reply
This AI prompt generates the actual reply. It takes the review text, sentiment classification, extracted topics, business name, industry, and configured tone setting as input. It drafts a personalized reply that addresses the specific points in the review, matches the business's tone, thanks positive reviewers, and offers resolution for negative reviewers. Output is capped at 500 characters (Google Business reply limit).
Human checkpoint (1 node)
Approval Gate
Rule: No reply posts without human review
Every AI-drafted reply must be reviewed by a human in the Reply Editor before posting. The human can edit the text, adjust tone, regenerate the draft, or reject it. No reply is ever posted automatically — even for positive reviews. This protects the business from AI output that might be off-brand, insensitive, or factually incorrect. The checkpoint sits between the Reply Drafter AI and the Replies API's post endpoint.
Database (1 node)
Reviews DB (PostgreSQL)
4 tables: reviews, replies, businesses, users
The database has four tables. reviews stores fetched reviews with sentiment analysis results (id, business_id, platform, reviewer_name, review_text, star_rating, sentiment, sentiment_confidence, topics, fetched_at). replies stores draft and final reply text with approval status (id, review_id, draft_text, final_text, status, approved_by, approved_at, posted_at). businesses stores business settings (id, name, industry, google_business_id, tone_setting). users stores account info (id, email, business_id).
Scheduler (1 node)
Review Fetcher (Cron)
Runs every 2 hours
A cron job that runs every 2 hours. It calls the Google Business Profile API to fetch new reviews since the last sync. For each new review, it triggers the Sentiment Analysis AI, stores the review and analysis in the database, and — if auto-draft is enabled for that sentiment type — triggers the Reply Drafter AI to generate a draft automatically. Negative reviews are never auto-drafted; the business owner must manually trigger drafting.
Data flow walkthrough
Here's what happens when a new 2-star review comes in on Google Business:
The pattern you can reuse
This architecture follows a pattern that applies to most AI apps:
- Fetch data (cron job or user action) — get input from an external source
- Classify with AI (AI prompt) — analyze the input to determine how to handle it
- Store in database — persist the input and AI analysis
- Generate output with AI (AI prompt) — create a response based on the input and classification
- Human review (checkpoint) — let a human approve or edit the AI's output
- Act on the output (API + external service) — post the reply, send the email, publish the post
This same pattern applies to our Social Media Autopilot (fetch trends, classify content, generate caption, human review, schedule post), Newsletter Autopilot (fetch articles, rank relevance, generate draft, human review, send email), and Contract Review Assistant (fetch contract, classify risks, generate summary, human review, flag issues).
Once you understand this pattern, you can map any AI app idea to it. Start from the reusable AI app blueprint template, or browse concrete builds like the AI Support Triage and Habit Coach blueprints. New to the components? Read our app architecture for beginners guide first, then come back here.
Map your own AI app architecture
Describe your app idea in plain English. Bluemoonkey generates the full architecture — nodes, connections, AI prompts, and checkpoints — ready to export as a build prompt.
Open Canvas — Free →FAQ
What is an AI app architecture example?
An AI app architecture example is a concrete walkthrough of how a specific AI application is structured — showing the frontend pages, backend APIs, database tables, AI prompts, and human checkpoints and how they connect. It helps you understand the pattern so you can apply it to your own app idea.
How is an AI app different from a regular app?
An AI app adds two components to a standard app architecture: AI prompts (structured instructions that tell the AI model what input to expect, what task to perform, and what output to produce) and human checkpoints (steps where a human reviews AI output before it goes live). The rest — frontend, backend, database, APIs — is the same.
Why does every AI app need a human checkpoint?
AI models can produce incorrect, off-brand, or insensitive output. A human checkpoint ensures someone reviews AI-generated content before it reaches users or goes live. In the review reply example, this prevents the AI from posting a reply that might damage the business's reputation.
Can I reuse this architecture pattern for my own app?
Yes. The pattern — fetch data, classify with AI, store in database, generate output with AI, human review, act on output — applies to most AI apps. The specific nodes change (review text vs. social media post vs. newsletter article), but the flow is the same. Use Bluemoonkey's canvas to map your version.