System Architecture
Full platform architecture — React/Next.js frontend, GraphQL gateway, Neo4j Scene Graph, AI pipeline, CineCore integration, and multi-database data layer.
Architecture Overview
Scenery is built as a modern web platform with a React/Next.js frontend, a GraphQL API layer for flexible scene graph queries, and a set of backend microservices handling the scene graph, AI pipeline, and commerce operations. CineCore is treated as an external infrastructure dependency accessed via REST API.
Scene Graph — Technical Design
2.1 Why Neo4j
The Scene Graph is inherently a connected data structure: films link to scenes, scenes link to timestamps, timestamps link to elements (products, songs), elements link to brands and stores. A graph database (Neo4j) enables efficient traversal queries such as "find all products in the car chase scene of Drive" or "show all films where this brand appears" without expensive relational joins.
2.2 Graph Schema
| Node Type | Key Properties |
|---|---|
Film | film_id, title, year, synopsis, poster_url, status |
Scene | scene_id, film_id, title, start_ts, end_ts, thumbnail_url |
Timestamp | ts_id, scene_id, position_seconds |
Product | product_id, name, brand_id, category, image_url, price_eur, purchase_url |
Song | song_id, title, artist_id, album, isrc, duration_sec |
Artist | artist_id, name, genre, spotify_id, deezer_id |
Brand | brand_id, name, logo_url, official_site, is_verified |
Store | store_id, name, type (online/local), address, lat, lng |
User | user_id, username, reputation_score, contribution_count |
Tag | tag_id, ts_id, element_id, element_type, source, confidence, status |
2.3 Key Graph Relationships
AI Tagging Pipeline
The AI pipeline is event-driven. When a new film is registered, an ingestion event is published. The pipeline processes the film asynchronously in five stages:
Commerce Layer Architecture
4.1 Product Placement Flow
POST /shops and submits product catalogueRevenueSplit record4.2 Affiliate & Revenue Tracking
- Every outbound product/music/watch link is wrapped in a Scenery affiliate redirect
- Click events logged with
film_id, scene_id, timestamp, element_id, user_id - Conversion events received via retailer webhook or affiliate network callback
- Revenue dashboard aggregates earnings by film, scene, product category, and period
Frontend Architecture
5.1 Key Pages & Components
| Route | Page | Key Components |
|---|---|---|
| / | Home / Discovery | Trending films, editorial picks, search bar |
| /film/:id | Film Page | Metadata, cast, watch options, scene timeline, product/music panels |
| /film/:id?t=:timestamp | Film Page (deep link) | Timeline pre-scrolled to timestamp; elements panel pre-loaded |
| /product/:id | Product Page | Product info, brand, purchase options, related scenes |
| /shop/onboard | Shop Onboarding | Retailer registration, product catalogue import, curation tutorial |
| /filmmaker/register | Filmmaker Portal | Film registration, self-tagging, IP licensing activation |
| /admin | Admin Dashboard | Tag moderation queue, analytics, dispute management |
5.2 Scene Timeline Component
The timeline is the platform's primary UX innovation. It renders as a horizontal scrubber with scene markers. As the user moves the scrubber position, a GraphQL subscription query updates the active scene's product and music panels in real time. Scenes with high element density are visually highlighted to encourage exploration.