Aura Platform — Technical SOP

Complete standard operating procedures, system architecture documentation, and numbered revision history for the Aura Domain-to-Business Generator platform.

Document Version: 1.0 Last Updated: Feb 2026 Status: Active

Table of Contents

Revision Log

19
REV-019 — Visual Identity System (Theme Engine) NEW Feb 17, 2026

Complete visual identity system replacing hardcoded site styles. Theme Engine derives CSS custom properties from brand colors, niche, and tone. Five mood profiles (professional, creative, minimal, bold, warm) auto-detected from brand data. Five card variants (glass, elevated, bordered, gradient, minimal) selected per mood. Section backgrounds, SVG dividers, contextual icons, gradient text, accent lines, and decorative elements all driven by theme tokens. Every section in site.html now uses themed components for a hand-crafted appearance.

theme.py site.html main.py
18
REV-018 — Brand Kit Dedup & Asset Resolver FEATURE Feb 17, 2026

SHA-256 file hashing prevents duplicate uploads per brand kit, saving AI credits. classified_at timestamps skip already-processed assets during reprocessing (force override available). Empty/failed docs properly timestamped to prevent infinite reprocess loops. Asset resolver maps classified images to site sections (hero, testimonials, features, etc.) and injects them into template render context. 18 automated tests validate all paths.

brandkit.py main.py models.py test_brandkit_dedup.py
17
REV-017 — Brand Kit Intelligence Layer FEATURE Feb 16, 2026

Automated brand intelligence computed during processing. Brand summary panel (tone, keywords, visual motifs, personality, content strength). Gap analysis with completeness %, letter grade (A–F), categorized missing items (required/recommended/nice-to-have) with actionable tips. Per-asset badges: purple for AI-suggested sections, green for sections where asset was actually used. Image placement suggestions mapped to site section types. All precomputed and persisted in DB for zero-latency UI.

brandkit.py models.py main.py editor.html
16
REV-016 — Brand Kit Upload System FEATURE Feb 16, 2026

Full document & image upload pipeline with AI classification. Users upload brand docs (PDF/DOCX/TXT) and images which are automatically categorized (mission, values, testimonials, team, hero, logo, product, etc.) and injected as priority source material during package generation.

brandkit.py models.py main.py app.js
15
REV-015 — Technical SOP Documentation DOCS Feb 16, 2026

Comprehensive SOP page with Mermaid.js workflow diagrams, color-coded sections, numbered revision history, PDF export capability. Living documentation of all platform systems.

sop.html main.py
14
REV-014 — AI Chat Augments (Job-Based) FEATURE Feb 2026

Augment suggest and generate operations run as background jobs (augment_suggest, augment_generate) with polling instead of blocking HTTP. Prevents browser timeouts on long AI calls. Structured clickable options in chat UI.

main.py editor.html
13
REV-013 — Roadmap & Planning System FEATURE Feb 2026

Interactive roadmap page with prioritized items, voting, status tracking. AI-generated roadmap suggestions based on current platform state.

roadmap.html models.py
12
REV-012 — Legendary Protocol ELITE Feb 2026

Elite-tier generation pipeline: dedicated system prompt with banned clichés, 16 per-section AI instruction overrides, 1.8x content multiplier, Fortune 500 quality standards. Legendary directives for headlines, testimonials, stats, FAQs, pricing.

blueprint.py aura.py
11
REV-011 — Blueprint Engine (16 Section Types) CORE Feb 2026

Structured content generation engine with 16 section types across 6 categories, 4 depth presets (minimal/standard/comprehensive/legendary). Blueprint-to-prompt-spec conversion with field validation.

blueprint.py validators.py
10
REV-010 — 3-Layer Validation Pipeline QUALITY Feb 2026

Normalization, Schema Validation, and Template Safety layers. Auto-repair for AI-generated content: field alias resolution, missing field insertion, type coercion, icon validation.

validators.py
9
REV-009 — Quality Gates System OPS Feb 2026

6 automated architectural invariant checks: state persistence, bounded execution, concurrent isolation, refresh recovery, actionable feedback, job retention. Integrated into architecture page.

main.py architecture.html
8
REV-008 — Domain Valuation Engine FEATURE Feb 2026

Realistic domain value estimation via valuation.py. Domain-only value (TLD, length, hyphens, numbers), developed value, monthly revenue by 6 business models. Fulfillment cost as key margin differentiator.

valuation.py main.py
7
REV-007 — Actionable Health Checks OPS Feb 2026

Per-package breakdown with 5 individual checks (brand identity, site sections, hero image, sales letter, render test). Clickable links to View Site and Edit Package with pass/fail badges.

main.py dashboard.html
6
REV-006 — Job Queue Panel & SSE Streaming CORE Feb 2026

Collapsible Job Queue panel on dashboard. DB-backed persistent job tracking with ThreadPoolExecutor (max 4 workers). Real-time SSE streaming, auto-reconnect, 30-day retention cleanup.

main.py models.py app.js
5
REV-005 — Package Editor (Full CRUD) FEATURE Feb 2026

Comprehensive package editor: content section editing, AI refinement chat, visual asset management, style customization, augments system, project history with revision tracking.

editor.html main.py
4
REV-004 — Discovery Questionnaire UX Feb 2026

4-step discovery modal with adaptive questions based on niche. Collects brand preferences, tone, audience details, competitive positioning. Answers inject into AI prompts for personalized generation.

dashboard.html app.js
3
REV-003 — Site Rendering Engine CORE Feb 2026

Multi-template site rendering (hero, data-dense, comparison, gallery). Layout styles (static-nav, single-scroll). CSS density control. Dynamic Jinja2 rendering from package JSON data.

site_template.html main.py
2
REV-002 — AI Package Generation CORE Feb 2026

OpenAI-powered brand identity generation, website copy, hero image (DALL-E), marketplace sales letter. Niche-aware prompting with monetization strategy integration.

aura.py llm.py
1
REV-001 — Foundation & Domain Analysis INIT Feb 2026

FastAPI + PostgreSQL + SQLAlchemy foundation. Domain analysis pipeline: AI-powered niche identification, competitor landscape, affiliate program discovery, monetization modeling. Dashboard UI with dark mode.

main.py models.py database.py aura.py

System Overview

Aura is a monolithic FastAPI application with Jinja2 server-side rendering. All AI operations run via background jobs tracked in PostgreSQL, with real-time progress delivered via Server-Sent Events (SSE).

16
Section Types
4
Depth Presets
6
Business Models
6
Quality Gates
graph LR A["User Dashboard"] -->|"Analyze"| B["Domain Analysis"] B -->|"Select Niche"| C["Discovery Modal"] C -->|"Upload"| BK["Brand Kit AI"] C -->|"Build"| D["Package Generator"] BK -->|"Context"| D D -->|"Validate"| E["3-Layer Validator"] E -->|"Render"| F["Site Template"] D -->|"Edit"| G["Package Editor"] G -->|"Refine"| H["AI Chat"] G -->|"Augment"| I["Augment Jobs"] style A fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style B fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style C fill:#1e1b4b,stroke:#F59E0B,color:#e5e7eb style BK fill:#1e1b4b,stroke:#EC4899,color:#e5e7eb style D fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style E fill:#1e1b4b,stroke:#10B981,color:#e5e7eb style F fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style G fill:#1e1b4b,stroke:#F59E0B,color:#e5e7eb style H fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style I fill:#1e1b4b,stroke:#EC4899,color:#e5e7eb

Technology Stack

Backend Python 3.11 + FastAPI + Uvicorn
Database PostgreSQL (Neon) + SQLAlchemy ORM
Frontend Jinja2 + Tailwind CSS CDN + Vanilla JS
AI OpenAI GPT-4o + DALL-E 3 (via Replit Integrations)
Streaming Server-Sent Events (SSE) for real-time progress
Jobs ThreadPoolExecutor (max 4) + DB persistence

SOP-003: Domain Analysis Pipeline

Purpose Analyze any domain name to identify profitable niches with affiliate monetization opportunities.
Inputs Domain name (string)
Outputs Niches array + analysis JSON
graph LR A["POST /api/analyze"] -->|"Create Job"| B["Job: analysis"] B -->|"Step 1"| C["AI: Niche Discovery"] C -->|"Step 2"| D["AI: Competitor Scan"] D -->|"Step 3"| E["AI: Affiliate Programs"] E -->|"Step 4"| F["AI: Monetization Model"] F -->|"Step 5"| G["Save to DB"] G --> H["SSE: Complete"] style A fill:#064e3b,stroke:#10B981,color:#e5e7eb style B fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style C fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style D fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style E fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style F fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style G fill:#064e3b,stroke:#10B981,color:#e5e7eb style H fill:#064e3b,stroke:#10B981,color:#e5e7eb
Key files: app/services/aura.py: analyze_domain() app/main.py: run_analysis_job()

SOP-004: Package Build Pipeline

Purpose Generate a complete business-in-a-box package: brand identity, website copy, hero image, sales letter.
Inputs Domain Niche Discovery + Brand Kit
Outputs Full Package JSON + Images
graph TD A["POST /api/build"] -->|"Create Job"| B["run_build_job()"] B -->|"Load"| BK{"Brand Kit exists?"} BK -->|"Yes"| BKC["Inject brandkit_context"] BK -->|"No"| BP["build_package()"] BKC --> BP BP -->|"Step 1"| C["AI: Brand Identity\n(3 options)"] C -->|"Step 2"| D["AI: Site Copy\n(Blueprint sections)"] D -->|"Step 3"| V["3-Layer Validation"] V -->|"Step 4"| E["AI: Hero Image\n(DALL-E 3)"] E -->|"Step 5"| F["AI: Sales Letter"] F -->|"Step 6"| G["Save Package to DB"] G --> H["SSE: Complete"] style A fill:#064e3b,stroke:#10B981,color:#e5e7eb style B fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style BK fill:#78350f,stroke:#F59E0B,color:#e5e7eb style BKC fill:#831843,stroke:#EC4899,color:#e5e7eb style BP fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style C fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style D fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style V fill:#064e3b,stroke:#10B981,color:#e5e7eb style E fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style F fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style G fill:#064e3b,stroke:#10B981,color:#e5e7eb style H fill:#064e3b,stroke:#10B981,color:#e5e7eb
Key files: aura.py: build_package() blueprint.py: blueprint_to_prompt_spec() validators.py: validate_and_repair()

SOP-005: Brand Kit Upload System

Purpose Allow users to upload their own brand documents and images. AI classifies content and uses it as primary source material during package generation.
Supported Files PDF/DOCX/TXT/MD JPG/PNG/GIF/WebP
AI Classifications 11 image categories, 10+ text content types
graph TD A["Upload Files"] -->|"POST /api/brandkit/upload"| B["Save to Disk"] B --> C["Create BrandKitAsset Records"] C -->|"POST /api/brandkit/process"| D["Job: brandkit_process"] D -->|"Step 1"| E["Extract Text\n(PyPDF2/python-docx)"] E -->|"Step 2"| F["AI: Classify Text\n(mission/values/team...)"] F -->|"Step 3"| G["AI: Classify Images\n(Vision API - 11 categories)"] G -->|"Step 4"| H["Save Classifications"] H -->|"Step 5"| INT["Intelligence Layer"] INT --> INT1["Brand Summary\n(tone/keywords/motifs)"] INT --> INT2["Gap Analysis\n(completeness/grade)"] INT --> INT3["Image Suggestions\n(section mapping)"] INT1 --> I["BrandKit status = ready"] INT2 --> I INT3 --> I I -->|"On Build"| J["build_brandkit_context()"] J -->|"Inject"| K["Priority source in AI prompt"] J -->|"Track"| L["used_in_sections\n(per asset)"] style A fill:#831843,stroke:#EC4899,color:#e5e7eb style B fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style C fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style D fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style E fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style F fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style G fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style H fill:#064e3b,stroke:#10B981,color:#e5e7eb style INT fill:#4a1d96,stroke:#8B5CF6,color:#e5e7eb style INT1 fill:#4a1d96,stroke:#8B5CF6,color:#e5e7eb style INT2 fill:#4a1d96,stroke:#8B5CF6,color:#e5e7eb style INT3 fill:#4a1d96,stroke:#8B5CF6,color:#e5e7eb style I fill:#064e3b,stroke:#10B981,color:#e5e7eb style J fill:#831843,stroke:#EC4899,color:#e5e7eb style K fill:#831843,stroke:#EC4899,color:#e5e7eb style L fill:#831843,stroke:#EC4899,color:#e5e7eb

Image Classification Categories (11)

Hero/Banner Logo Team/Headshot Product Lifestyle Testimonial Infographic Social Proof Background Icon/Graphic Other

Intelligence Layer (REV-017)

Brand Summary Tone detection, keyword extraction, visual motif identification, brand personality narrative, content strength rating (minimal/moderate/strong/comprehensive).
Gap Analysis Hybrid static checklist. Completeness % + letter grade (A–F). Items categorized: required (red), recommended (amber), nice-to-have (blue). Each missing item has actionable tip.
Asset Tracking Per-asset badges: purple = AI-suggested sections, green = actually used in build. Image placement suggestions mapped to 16 section types. Persisted in DB for historical traceability.

Dedup & Asset Resolver (REV-018)

File Deduplication SHA-256 hash computed on upload. Duplicate content detected per brand_kit_id. Skipped with user feedback message — saves AI classification credits. file_hash column on BrandKitAsset.
Classification Skip Logic Assets with classified_at timestamps are skipped during reprocessing. Empty/unreadable docs and failed classifications still get timestamped to prevent infinite retry loops. Force mode overrides all skips.
Asset Resolver resolve_assets_for_sections() maps classified images to site sections via CLASSIFICATION_TO_SECTIONS lookup. Populates used_in_sections during classification. Outputs section_assets dict injected into template render context.
Key files: app/services/brandkit.py app/models.py: BrandKit, BrandKitAsset tests/test_brandkit_dedup.py (18 tests)

SOP-006: Job Queue & SSE Streaming

All long-running AI operations (analysis, build, augment, brand kit processing) are executed as background jobs tracked in PostgreSQL. The Job model stores: status, progress_pct, current_step_key, steps_detail (JSON), and timing metadata. Real-time progress is streamed via SSE.

sequenceDiagram participant U as User Browser participant API as FastAPI participant DB as PostgreSQL participant W as Worker Thread participant AI as OpenAI U->>API: POST /api/build (start job) API->>DB: INSERT Job (status=pending) API->>W: Submit to ThreadPoolExecutor API-->>U: 200 { job_id } U->>API: GET /api/stream/{job_id} (SSE) loop Every Step W->>AI: Generate content AI-->>W: Response W->>DB: UPDATE Job (progress, step) API->>DB: Poll job state API-->>U: SSE event (progress) end W->>DB: UPDATE Job (status=completed) API-->>U: SSE event (complete)
Job Types analysis, build, augment_suggest, augment_generate, brandkit_process
Workers ThreadPoolExecutor, max 4 concurrent
Retention 30-day cleanup for completed jobs
Recovery SSE auto-reconnect, DB-backed state

SOP-007: Discovery Questionnaire

4-step guided questionnaire that adapts questions based on chosen niche. Answers are structured into discovery_context and injected directly into AI prompts to personalize every aspect of the generated package.

graph LR A["Step 1:\nBrand Preferences"] --> B["Step 2:\nAudience & Tone"] B --> C["Step 3:\nCompetitive Position"] C --> D["Step 4:\nBrand Kit Upload"] D --> E["Build Package\n(w/ context)"] style A fill:#78350f,stroke:#F59E0B,color:#e5e7eb style B fill:#78350f,stroke:#F59E0B,color:#e5e7eb style C fill:#78350f,stroke:#F59E0B,color:#e5e7eb style D fill:#831843,stroke:#EC4899,color:#e5e7eb style E fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb
Context injection: discovery_answers → _build_discovery_section() → brand_prompt

SOP-008: Domain Valuation Engine

Estimates domain value and monthly revenue potential across 6 business models. Fulfillment cost percentage is the key differentiator between models. Physical fulfillment models (dropship, own inventory) show margin destruction at low traffic volumes.

graph LR A["Domain Input"] --> B["Base Value\n(TLD + Length + Hyphens)"] B --> C["Developed Value\n(Niche multiplier)"] C --> D["Revenue Models"] D --> E1["Affiliate 0%"] D --> E2["Digital 3%"] D --> E3["SaaS 10%"] D --> E4["Dropship 35%"] D --> E5["Own Inventory 50%"] D --> E6["Services 45%"] style A fill:#064e3b,stroke:#10B981,color:#e5e7eb style B fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style C fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style D fill:#78350f,stroke:#F59E0B,color:#e5e7eb style E1 fill:#064e3b,stroke:#10B981,color:#e5e7eb style E2 fill:#064e3b,stroke:#10B981,color:#e5e7eb style E3 fill:#064e3b,stroke:#10B981,color:#e5e7eb style E4 fill:#7f1d1d,stroke:#EF4444,color:#e5e7eb style E5 fill:#7f1d1d,stroke:#EF4444,color:#e5e7eb style E6 fill:#78350f,stroke:#F59E0B,color:#e5e7eb

Color Key for Business Models

Green = High margin (0-10% fulfillment) Amber = Moderate (35-45% fulfillment) Red = Margin risk (50%+ fulfillment)

SOP-009: Quality Gates

6 automated architectural invariant checks that validate system health. Accessible at /api/quality-gates and integrated into the Architecture page.

Gate 1 State Persistence All job state in DB, not in-memory
Gate 2 Bounded Execution ThreadPoolExecutor max 4 workers
Gate 3 Concurrent Isolation Jobs use separate DB sessions
Gate 4 Refresh Recovery SSE reconnects, DB state survives
Gate 5 Actionable Feedback All errors produce user-facing messages
Gate 6 Job Retention 30-day retention, auto-cleanup

SOP-010: AI Chat & Augments

Post-generation AI refinement system in the Package Editor. Users can chat with AI to refine sections, and the augment system provides structured suggestions and one-click generation of new content elements (widgets, forms, calculators).

graph TD A["Editor: AI Tab"] --> B{"Action Type"} B -->|"Chat"| C["Direct AI Refinement"] B -->|"Suggest"| D["Job: augment_suggest"] B -->|"Generate"| E["Job: augment_generate"] D -->|"Poll"| F["Structured Options\n(clickable cards)"] E -->|"Poll"| G["New Content Element"] C --> H["Update Package JSON"] F -->|"User Click"| E G --> H style A fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style B fill:#78350f,stroke:#F59E0B,color:#e5e7eb style C fill:#1e1b4b,stroke:#3B82F6,color:#e5e7eb style D fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style E fill:#1e1b4b,stroke:#7C3AED,color:#e5e7eb style F fill:#831843,stroke:#EC4899,color:#e5e7eb style G fill:#064e3b,stroke:#10B981,color:#e5e7eb style H fill:#064e3b,stroke:#10B981,color:#e5e7eb

SOP-011: Legendary Protocol

Elite-tier generation mode that activates $50K+ agency-quality content generation. This is the highest quality preset, designed to produce output indistinguishable from top-tier agencies.

Activation Conditions

  • Blueprint depth preset = "legendary"
  • Content multiplier: 1.8x (vs 1.0x standard)
  • Dedicated system prompt with banned clichés
  • 16 per-section AI instruction overrides

Quality Mandates

  • No generic phrases or placeholder text
  • Odd numbers for statistics (3, 7, 13...)
  • Competitor-aware pricing positioning
  • Hard FAQ questions (not softballs)
  • Fortune 500 tone and specificity
graph LR A["depth = legendary"] --> B["SYSTEM_PROMPT_BUILDER_LEGENDARY"] B --> C["16 Section Overrides"] C --> D["1.8x Content Multiplier"] D --> E["Legendary Directives"] E --> F["Premium Output"] style A fill:#78350f,stroke:#F59E0B,color:#e5e7eb style B fill:#78350f,stroke:#F59E0B,color:#e5e7eb style C fill:#78350f,stroke:#F59E0B,color:#e5e7eb style D fill:#78350f,stroke:#F59E0B,color:#e5e7eb style E fill:#78350f,stroke:#F59E0B,color:#e5e7eb style F fill:#064e3b,stroke:#10B981,color:#e5e7eb
Editable at: /prompts All legendary prompts and 16 overrides are visible and editable in the Prompt Lab.

SOP-012: Blueprint Engine

Structured content generation engine that defines exactly what sections and fields the AI must produce. 16 section types organized across 6 categories, with 4 depth presets controlling content volume and quality.

Identity hero, about, team
Engagement features, benefits, how_it_works
Trust testimonials, social_proof, stats
Conversion pricing, cta, comparison
Support faq, contact, resources
Special newsletter, custom
Minimal 1.0x • 5 sections
Standard 1.0x • 8 sections
Comprehensive 1.3x • 12 sections
Legendary 1.8x • 16 sections