System Architecture

From QR scan to generated campaign asset.

The platform combines a guest-facing web layer with a control plane for prompt generation, rights checks, job dispatch, output polling, export packaging, and remote provider integration.

Guest Flow

Fan-side request path

QR / direct entry
User lands on the guest web launcher or a specific mode URL.
Mode route render
Next.js loads the mode view and query context such as language and zone.
Concierge response
Next.js API route returns next step, nearby POIs, sponsor card, reward, confidence.
Demo-ready UI
SVG route layer, premium sponsor surfaces, and persistent help controls make the story credible in-room.
Generation Flow

Operator-side media path

Campaign brief
Structured request defines asset types, languages, quality mode, and Tap FIFA fields.
Prompt engine
Prompt templates and style presets build the positive and negative prompt pair.
Rights guard
Prompts are classified, flagged, and sanitized if needed.
Workflow engine
ComfyUI receives image jobs, Blender handles 3D scenes, FFmpeg handles encoding.
Exports
Outputs are converted into delivery profiles and packaged into ZIP downloads.
Infrastructure Layers

Control plane summary

LayerImplementationResponsibility
Presentationapps/web/appFan-facing mode routes and launch surfaces
APIapps/orchestrator/main.pyPrompt, campaign, export, provider, and registry endpoints
Promptingpackages/promptsStyle presets, asset templates, workflow hints
Policypackages/rightsRights classification, flagged terms, sanitization
Generationpackages/workflows + packages/renderingComfyUI job dispatch, Blender render, output polling
Media processingpackages/mediaResize, export profiles, metadata sidecars, video encode
Remote providerpackages/providers/cloudflare_workers.pyWorkers AI verification and binary/json model runs