Platform & API

How the marketplace is put together

A responsive web application, two self-service portals, one operator console, an AI creative service, a location-based inventory layer and a device network. Everything hangs off one structured inventory record — the same record the advertiser books and the device plays.

1. Platform structure

Each request travels the same path as a media buy: inventory → creative → approval → payment → scheduling → playback → proof → settlement.

Advertiser portalCampaign, creative, payment
Landlord portalInventory, approvals, earnings
Marketplace & pricingAvailability, floor price, SOV
AI creative serviceCopy, video, hologram spec
Approval, payment, schedulingModeration, gateway, CMS
Device networkPlayers, heartbeat, play log
Proof of play & reportingVerified, modelled, engaged

Components

    Suggested stack

      Non-functional requirements

        2. Data model

        An advertising opportunity is structured inventory, never a free-text listing. Six tables carry the transaction.

        Inventory record (location × device)

        3. API surface

        One REST surface for the portals, the device players and future DSP/SSP connections. Booking is a single idempotent call so a retried payment can never double-book a loop.

        Booking request

        POST /v1/bookings
        {
          "advertiser_id": "adv_10231",
          "campaign": { "objective": "coupon", "start": "2026-10-01", "days": 14 },
          "lines": [
            { "location_id": "LC-1042", "device_ids": ["DV-1042-A"], "sov": 50 },
            { "location_id": "LC-5104", "device_ids": ["DV-5104-A"], "sov": 50 }
          ],
          "creative": { "asset_id": "as_9f21", "form": "hologram", "languages": ["zh-HK", "en"] },
          "ai_studio": { "enabled": true, "hologram_conversion": true },
          "payment": { "provider": "stripe", "method": "card" },
          "idempotency_key": "bk_8f2c1a"
        }
        → 201 { "booking_id": "BK-7F21", "status": "in_review",
                "total": 11900, "approvals": ["AP-3001"], "invoice": "INV-2026-1042" }

        Proof of play is exposed per device and per campaign, with a signed export for agencies, and the DOOH fields map onto the OpenRTB DOOH representation when the platform is ready for programmatic buyers.

        4. The AI creative service (DeepSeek)

        The studio is a thin orchestration layer over a hosted LLM plus an image/video pipeline. In this build the studio runs in demo mode by default; switch LG_CONFIG.ai.mode to proxy and run the bundled server to use a real DeepSeek API key.

        Getting a DeepSeek API key

        1. Register at the DeepSeek platform

          Create an account at platform.deepseek.com (the API platform, not the chat app). Sign in with email or phone.

        2. Verify and open the API keys page

          Complete any identity checks the platform requests, then create a key under API keys. Copy it once — it is shown in full only at creation.

        3. Top up the balance — yes, the API is paid

          The API is pay-as-you-go against a prepaid balance. Usage is deducted from the topped-up balance, and from any granted promotional balance first when both exist. There is no permanently free production tier, so budget a small top-up to test.

        4. Call the API

          OpenAI-compatible base URL api.deepseek.com; Anthropic-format base URL api.deepseek.com/anthropic. Keep the key server-side.

        5. Watch spend, prefer off-peak

          Off-peak rates are half of peak rates. Peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday, excluding Chinese public holidays.

        Models and list prices

        Prices are per 1M tokens and were correct at the time of writing — always confirm on the official pricing page, which also lists context length, concurrency limits and current model names. Charges = tokens × price.

        How the studio uses it

        Server-side proxy (never ship a key to the browser)

        // server/deepseek-proxy.mjs  —  node server/deepseek-proxy.mjs
        // export DEEPSEEK_API_KEY=sk-...  then set LG_CONFIG.ai.mode = 'proxy'
        // in assets/js/config.js
        
        const upstream = await fetch('https://api.deepseek.com/chat/completions', {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
            Authorization: `Bearer ${process.env.DEEPSEEK_API_KEY}`
          },
          body: JSON.stringify({
            model: 'deepseek-flash',            // or 'deepseek-v4-pro'
            messages: [
              { role: 'system', content: 'You are a Hong Kong OOH creative director. Reply with JSON only.' },
              { role: 'user', content: prompt }
            ],
            response_format: { type: 'json_object' },
            temperature: 1.0,
            max_tokens: 1400
          })
        });
        const data = await upstream.json();
        Cost control: cap tokens per brief, cache generated variants per brief and language pair, keep a per-advertiser monthly AI budget, and show AI spend beside media spend in the operator console — which is exactly how the revenue split separates the AI production fee from the media fee.

        5. Measurement framework

        Three tiers, always labelled. This structure follows the IAB DOOH measurement guidance: delivery facts are separated from audience estimates, and modelled numbers are never relabelled as plays.

        Never promise exact "views" without sensors or verified third-party data. If computer-vision counting is added later, it must process on-device, retain no identifying data, and be disclosed on the creative and in the venue.

        6. Playback, devices and hologram rules

        What every player reports

          Hologram-specific checks

            Rotating LED fans are pseudo-volumetric: black pixels emit no light, so a black background is what produces the floating image. Small text will not resolve, white backgrounds destroy the illusion, and the fan needs 8–10 hours of running followed by roughly 30 minutes of rest with at least 30 cm of clearance.

            7. Roadmap and scope discipline

            8. Compliance, privacy and content policy

            9. Location-based services and availability

            Inventory is geospatial: every location carries WGS-84 coordinates, so the marketplace can answer the two questions a rate card cannot — what is near my shop, and what is actually free for my dates.

            Availability states

              Proximity search

                Privacy and resilience

                  LBS = Location-Based Services

                  How the position is established

                    Pull and push, in practice

                      10. Payments and settlement

                      Four rails, one invoice. The advertiser pays in HKD; the provider fee is charged on top of media value and is never taken out of the landlord share.

                      Payment flow

                        Rules that keep it safe

                          Crypto is quoted in coin units with a short rate lock and a volatility buffer, then settled to HKD on confirmation so landlord payouts stay in one currency. Card data never reaches 3dNakedEye servers: Stripe collects it and returns a PaymentIntent.

                          11. Explainer video and localisation

                          The explainer is an animated, chaptered player with narration and subtitles in every built-in language, so one asset serves an advertiser pitch, a landlord pitch and a sales deck. It can be replaced by your own footage without touching the rest of the site.

                          Publishing your own video

                            Three built-in languages, plus Google Translate

                              Machine translation

                              • Machine translationja · ko · vi · ไทย · 100+
                              • Quick machine translation
                              • Show original language ?gt=ja · ?gt=ko

                              Messaging channels

                              • WhatsApp+852 9739 8018
                              • LINE—
                              • WeChat ID—
                              // assets/js/config.js — three ways to publish the explainer
                              video: {
                                mode: 'builtin',                  // animated four-language player in video.html
                                // mode: 'file',    src: 'assets/video/3dNakedEye-explainer.mp4', poster: 'assets/img/poster.jpg',
                                // mode: 'youtube', youtubeId: 'XXXXXXXXXXX',
                                durationSec: 146,
                                voiceOver: true,                  // browser speech narration; 繁體中文 always uses a Cantonese voice
                                references: [ /* curated third-party DSP / DOOH videos */ ]
                              }

                              12. Markets and coverage

                              Two markets run on one platform today: Hong Kong and Thailand. Each market carries its own districts, landmarks, map projection bounds and settlement currency, while inventory, pricing and proof of play use a single data model.

                              13. Advertiser console and email automation

                              The advertiser console borrows the column logic advertisers already know from Meta Ads Manager and Google Ads — delivery state, budget, spend, verified plays, modelled impressions, QR clicks, CTR, CPM, conversions, cost per conversion and a comparison against the platform benchmark — while the notification engine turns every handover into an email in the recipient language.

                              Ads Manager

                                Automation

                                  14. Accounts, membership and the two dashboards

                                  Advertisers and landlords share one sign-in and each lands on their own dashboard.

                                  Sign-in roles

                                  • Sign-in rolesadvertiser · landlord · operator
                                  • Session storagebrowser → server
                                  • Membership tiersfour tiers
                                  • Dashboard guardrole-gated

                                  15. FAQ, enquiry and the AI assistant

                                  The FAQ corpus is also the assistant's knowledge base.

                                  FAQ corpus

                                  • FAQ corpus—
                                  • Assistantknowledge base + DeepSeek
                                  • Enquiry pipelinebrowser → server .eml → WhatsApp
                                  • Contact channelscommercialisation.ai@gmail.com

                                  16. WhatsApp Business and contact channels

                                  One place configures every channel: config.js.

                                  • Business number+852 9739 8018
                                  • Cloud API versionv21.0
                                  • Enquiry endpointPOST /api/enquiry
                                  • Assistant endpointPOST /api/chat

                                  Handles are placeholders.

                                  17. Creative preview and the upload pipeline

                                  preview.html accepts any file the advertiser has, and decodes it in the browser.

                                  • Accepted inputimage · video · SVG · GIF · PDF
                                  • Where decoding happensbrowser, object URL
                                  • Device simulation5 devices · angle · light · overlays
                                  • Loop planningshare of voice per file

                                  18. Catalogue, dimensions and the cloud walkthrough

                                  The catalogue, the calculator and the cloud walkthrough are transcribed from the supplier’s own documents. Nothing is estimated: where a document is silent the page says so.

                                  • Product catalogue25 models · 5 series · matrix builds · accessories
                                  • Dimension calculatorspacing 0.400–0.710 m · power +20% headroom
                                  • Cloud walkthrough11 sections · 49 operations · the manual’s own menu order
                                  • Sourcing rulecatalogue values as published — a dash where the supplier is silent

                                  See the transaction end to end

                                  Book a location, generate the creative, pay in the simulated gateway and read the proof-of-play report.