Internal engineering brief · confidential

AI × Nightclub Platform — Engineering Brief

Pre-read for the offshore engineering team · Phases 0–2 · Prepared by EXPLACE Inc. (Japan)

Before you read

01What we are building

The Client operates nightclubs. Today nobody has data on what happens on the floor while guests are inside the venue — what they want to hear, what makes them stay longer, what makes them buy another drink. Ticketing and entry are digitised; the hours in between are not.

Phase 1 builds exactly one thing: a system that captures what guests actually want, as numbers. Audio and video production — the visually impressive part — comes later, and only after the Phase 1 data exists.

The single most important design principle

We do not guess requirements for the audio/video layer. That layer represents roughly half the total build cost and depends heavily on the physical venue (existing DJ gear, LED resolution and input paths, lighting control, acoustics, network). Specifying it with zero guest data would be guesswork. Phase 1 produces the data; Phase 1.5-a then specifies the audio/video work against real numbers.

This also means: the client can stop after any phase. The architecture must support that — no phase may leave the system in a non-functional state.

Deployment starts with one flagship venue, but the system is designed as a multi-tenant group platform from day one. Adding venues later must not require re-architecting. This is a hard requirement, not an aspiration.

02Phase structure

PhaseContentDurationDecision at the end
Phase 0Requirements, screen design, data-item definition, fixed quotation~4 weeksProceed to Phase 1?
Phase 1Data platform, guest survey, voting, admin console, evaluation & verification~8–10 weeks
(incl. 2 weeks evaluation)
Proceed to 1.5-a?
Phase 1.5-aAudio/video requirements definition, based on Phase 1 data plus on-site measurement~2–3 weeksScope and size of 1.5-b
Phase 1.5-bAudio/video implementation~8–10 weeksProceed to Phase 2?
Phase 2On-site PoC, quality verification, minor fixes~4–6 weeksRoll out to more venues?
Phase 3Multi-venue rollout, advanced features, festival adaptationTBD

Target start: late August 2026. Phases 0 and 1 are being proposed as a single decision, because Phase 0 alone produces no guest data and therefore no basis for the next decision.

Numbering warning

An earlier version of this proposal used different phase numbers. If you see older documents: the old “Phase 1” corresponds to today’s Phase 1 + Phase 1.5, and the old “Phase 1.5” corresponds to today’s Phase 2. Always confirm which numbering a document uses before quoting it.

03Phase 1 scope: in and out

In scope

IDFeatureDescriptionStack
F1Guest entryAccess via QR / deep link. Member identification via Partner App token; guests without an account continue anonymouslyNext.js, JWT (RS256)
F2Preference surveyGenre, artists, purpose of visit, group size, expected stay. Questions are editable from the admin consoleReact + API
F3Real-time votingGuests vote on proposed track candidates; results reflect immediatelyWebSocket (Socket.IO)
F4Rule-based track proposalComputes next-track candidates from preferences + votes + time of day, and shows them to the DJ / admin. It does not play anythingPython, rules engine
F5Admin consoleSession start/stop, question editing, live vote status, proposal list, KPI viewNext.js + Admin API
F6Data platformBehavioural log collection (impression, vote, drop-off, dwell), aggregation, CSV/BI exportPostgreSQL + batch
F7Partner App integrationUser info and subscription status lookup; activity log write-backREST (OAuth2 / JWT)
F8Ops dashboardResponses, votes and subscription transitions by venue and dayInside Admin
F9Learning-preparation layerFull candidate-set logging, feature store, offline evaluation (see §6)Python, batch

Out of scope for Phase 1

On-site work in Phase 1 is limited to putting up QR signage and briefing venue staff. We do not touch any audio or video equipment. This is the main reason Phase 1 is short and low-risk — please keep it that way when you design.

04Use cases

IDStoryGoalData produced
U1Guest scans QR and enters preferences and purpose of visitCompletable in under 30 secondsPreference distribution, motivation, demographics
U2Guest votes on candidate tracksResult reflects immediatelyDemand by track/genre per time slot
U3DJ / operator sees the proposal list and decides for themselvesMore information, zero obligationProposal adoption rate
U4Operator manages sessions and questions from the consoleEverything doable on siteActual operational overhead
U5Operator reviews the report the next dayUsable for decisionsVenue KPIs

U3 is the core of the whole design. In Phase 1 the AI does not replace the DJ. It proposes, and we record whether the proposal was adopted. That adoption rate is the single most important metric for deciding the scope of Phase 1.5.

Design implication: the proposal UI must never block or delay the DJ, and “ignored” must be a first-class, recorded outcome — not a missing row.

05Music data: the three-layer model

This is the part most likely to be challenged by technical reviewers, and the part you need to understand best.

We never try to get music information from a single source. The beat that is playing right now comes from the hardware. Track characteristics come from the DJ’s own library. Guest input only needs search. Three separate paths — if one is unavailable, the system still works.

LayerWhat we getSourceWhy there
L1 — runtimeNow-playing track, BPM, beat / bar positionDJ hardware (PRO DJ LINK)Only the hardware knows what is actually playing. We do not estimate
L2 — candidatesBPM, key, genre, beat grid, cue pointsrekordbox collection XMLThe DJ has already analysed and tagged everything. No new analysis, no paid API
L3 — guest inputFavourite artists / genresCatalog search API (name resolution only)We only need to normalise spelling variants. No audio features required

Layer 1 — runtime data from DJ hardware

Current CDJ hardware publishes now-playing, BPM and beat information on the LAN. The Client’s AV affiliate already owns this equipment and the bridge software, so no new hardware purchase is required; we receive and record only.

Be precise about this — do not overstate it

Fallback chain (must be designed in from the start)

PriorityMethodNotes
(a)Receive now-playing / BPM / beat from PRO DJ LINKRichest data. Requires on-site verification
(b)Tempo sync from the mixer or rekordbox (MIDI clock, Ableton Link)rekordbox supports Ableton Link officially in PERFORMANCE mode. Tempo only — no track title
(c)Beat detection from an audio input, or manual tap by staffLast resort. Track title entered manually in the admin console

(a) gives the richest show; (c) still delivers usable video sync. No single path may be a hard dependency.

Layer 2 — track features from rekordbox XML

rekordbox can export the entire collection as XML. This is an officially documented format, and it already contains everything we need for candidate selection.

ElementFields we use
TRACKArtist, Album, Genre, AverageBpm, Tonality (key), Year, Label, Remixer, Rating, PlayCount, LastPlayed, Comments, Colour, TotalTime
TEMPOInizio (grid start), Bpm, Metro (time signature), Battito (beat number in bar) → the beat grid
POSITION_MARKCue / loop positions (Start, End, Type)
PLAYLISTSPlaylist structure — this encodes how the venue actually sequences a night

What the XML does not contain: there is no field equivalent to energy, mood or danceability. We fill that gap using rekordbox MyTag / colour / comment conventions, or manual tagging. At Phase 1 scale manual tagging is both fastest and most accurate. Custom audio analysis can be added later; we do not build it in Phase 1.

Why we are not using a streaming provider’s audio-features API

In November 2024, Spotify restricted GET /v1/audio-features, GET /v1/audio-analysis, GET /v1/recommendations, related-artists and 30-second previews for applications that did not already hold extended quota. New applications receive 403, and no official replacement endpoint was provided. Search and metadata lookup still work.

Consequence for us: audio features must come from our own sources. The rekordbox route above solves this without any recurring API cost — which is also why this project has no per-month external data spend. Do not reintroduce such a dependency without raising it first.

Layer 3 — guest input

06The irreversible logging layer

Phase 1 does not run any trained model. But several preconditions for Phase 1.5 cannot be recovered retroactively if we fail to build them into Phase 1. If we miss these, Phase 1.5-a ends up with “we have data, but it is unusable” — the worst possible outcome.

Mandatory in Phase 1 (no separate line item — absorbed into the data platform)

#ItemWhy it cannot be added later
L1Full candidate-set loggingWe must log the entire proposed set, not just the adopted track. With only one side, algorithms cannot be compared. Not reconstructable afterwards
L2Impressions and negative signals“Shown but not voted for” carries as much information as a vote. If it is not recorded, it never existed
L3Context captureWeekday, time slot, event type, crowd level, weather. Cannot be attached retroactively
L4Consent scope and retention designIf the consent wording does not cover future analysis and model improvement, the accumulated data cannot be used in Phase 1.5. Retroactive consent is effectively impossible. Handled in Phase 0 legal review

L1–L3 are a schema-design problem, not a feature. They cost almost nothing if designed in from the beginning and are impossible to recover afterwards. Treat them as completion criteria for Phase 1, not as nice-to-haves.

Valuable to pull forward — see §11

#ItemContent
L5Track feature storeOwn catalog holding BPM, key, energy, genre tags, era. Buildable without any guest data
L6Offline evaluation harnessReplays accumulated logs to compare multiple algorithms
L7Shadow executionRuns candidate algorithms in parallel and records only “what would have been recommended”. Never shown to guests

Be honest about what Phase 1 is

Expected Phase 1 data volume for a single venue over 6–8 weeks: roughly 2,000 guests, ~10,000 vote events, 500–1,000 proposal decisions. At that scale, a trained model will not beat a popularity + time-slot baseline. So Phase 1 does not do learning — it makes learning possible.

Use this wording consistently: not “the AI is learning in the background”, but “we are building logs that will survive rigorous comparison later”. The deliverable of shadow execution is not a good model — it is a measured comparison of which approach is promising. “Rule-based is sufficient, no learned model needed” is a perfectly good and cost-saving result.

Longer term: a single venue is too small for learned models, but pooling data across the group’s venues makes it viable. If the feature store and behaviour-log schemas are shared, each additional venue lowers the per-venue data requirement (cold start gets cheaper). This is the technical argument for the multi-tenant design.

07Data model

Phase 1 tables. Names are indicative; final naming is fixed in Phase 0.

users_ref        : anon_id, partner_user_id (reference only), membership_status, created_at
sessions         : id, venue_id, event_id, started_at, ended_at, operator_id
survey_questions : id, session_id/venue_id, type, body, options, is_active, order
survey_answers   : id, session_id, anon_id, question_id, value, answered_at
votes            : id, session_id, anon_id, candidate_track_id, voted_at
track_candidates : id, session_id, track_ref, source, score, rank, proposed_at
proposal_results : id, candidate_id, adopted(bool), adopted_at    <- key input for 1.5-a
activity_logs    : id, session_id, anon_id, event_type, payload(jsonb), occurred_at
venues           : id, name, partner_venue_id, timezone, config(jsonb)

-- learning-preparation layer (see section 06) --
track_catalog    : id, title, artist, isrc, source, added_at
track_features   : track_id, bpm, key, energy, genre_tags, era, source, confidence
impressions      : id, session_id, anon_id, candidate_id, shown_at, position   <- L2
session_context  : session_id, weekday, time_slot, event_type, headcount_band, weather
shadow_runs      : id, session_id, algo_name, algo_version, output(jsonb), ran_at <- never displayed

-- defined now, activated in Phase 1.5 --
output_devices     : id, venue_id, type(audio/video), status, connected_at
session_output_map : session_id, audio_device_id, video_device_id
visual_assets      : id, name, path, genre_tags, bpm_range, rights_note

The output-layer tables are defined but not implemented in Phase 1. Keep the connection points in the schema; do not build the functionality behind them yet.

08Privacy and retention

CategoryContentRetention
Potentially personalBehavioural logs carrying anon_id3 months, with a deletion API
Anonymous / aggregateStatistics with anon_id stripped, track features, shadow-run resultsNo time limit (this is the asset that carries into Phase 1.5)

Applying a flat 3-month retention to everything would delete the data before Phase 1.5 can use it. The two-tier split must be reflected in the schema, the deletion job and the consent wording. This is a Phase 0 deliverable and goes through the Client’s legal review.

Data location: personal data handling and storage region are governed by the agreed policy for this project. Confirm with the Japan-side PM before selecting any region, managed service or third-party processor. Do not assume the default region of your cloud account is acceptable.

09System architecture (Phase 1)

Guest smartphone ──(QR / deep link)──▶  Web (Next.js)
                                          │
                                          ▼
                                Backend API (Node.js / Python)
                                  ├── auth: Partner App token verification (RS256)
                                  ├── preference / vote / behaviour logging
                                  └── rule-based track proposal
                                          │
                        ┌─────────────────┼─────────────────┐
                        ▼                 ▼                 ▼
                 Admin console      Data platform      Partner App API
                (shows proposals)   (DB / aggregation)  (member & log sync)
                                    (BI / CSV export)

  * Audio output, LED output and DJ-hardware integration are Phase 1.5.
    Connection points are designed now; nothing is wired in this phase.

10Partner App integration

Required from Phase 1. This is a known schedule risk: it depends on the Client’s own app team.

EndpointPurpose
GET /external/user/infouser_id, nickname, membership_status
GET /external/subscription/statusSubscription state (controls perks)
GET /external/event/listCurrent and upcoming events
POST /external/user/preferencesPreference sync
POST /external/activity/logWrite back vote and visit activity

Design assumption: the integration may not be ready. Phase 1 must run standalone in guest-only mode and connect to the Partner App later without a rewrite. Treat the integration as an optional adapter, not a core dependency.

11Optional parallel workstreams

Two workstreams are offered as optional and run in parallel with Phase 1. They are optional commercially, but if they are ordered, they must start with Phase 1 — not after it.

ContentWhy it must be simultaneous
Option A
Learning preparation
Track feature store (L5), offline evaluation harness (L6), shadow execution (L7) Shadow execution records what each algorithm would have recommended. Run later, the original candidates, time slots and crowd levels no longer exist, so no comparison is possible
Option B
Playback logging
Record actually-played tracks, BPM and timestamps from the DJ hardware (Layer 1) during Phase 1 What was played on a given night cannot be reconstructed afterwards. Votes (demand) and playback logs (supply) are only meaningful when captured on the same night at the same timestamps

Engineering notes

12KPI targets

Phase 1 — does data capture and operation work?

MetricTargetMeaning
Session start rate from QR≥ 15% of guestsIs the entry path working?
Survey completion rate≥ 70% of startersAre the questions too heavy?
Vote participation rate≥ 50% of startersDoes participation actually feel worthwhile?
Proposal adoption rateNo target. Capturing it at all is the goalThe basis for the Phase 1.5 investment decision
Extra operational time≤ 15 min per business dayCan the venue actually run it?

Phase 1.5-b / Phase 2 — show quality

MetricTarget
Vote → video reflection latency≤ 2 s
Video / BPM sync error≤ ±1.5 s
DJ adoption rate of proposalsImprovement over the Phase 1 measured value
Interruptions caused by on-site trouble0 per business day

13Risks and fallbacks

Phase 1

RiskCauseMitigation
Partner App changes are lateContact person undecided, in-house capacityFix the contact and timeline in Phase 0. Design so guest-only mode runs standalone
Low survey response rateToo many questions, poor entry pathQuestions editable from admin; A/B on site. Start with 3 questions or fewer
Token verification failureJWT expiry, key rotationRefresh handling + fallback to anonymous guest
Missing consent coveragePolicy revision not completedPolicy revision draft is a Phase 0 deliverable; allow time for legal review
Venue staff cannot operate itInsufficient onboardingAdmin must complete a night with two operations: session start and session stop. Checklist provided
Accumulated data unusable in Phase 1.5Candidate sets / impressions not logged; consent lacks analysis purpose; 3-month retention deletes everythingMake L1–L4 completion criteria for Phase 1 (§6). The only genuinely unrecoverable group
Track features unavailableStreaming audio-features APIs closed to new apps since Nov 2024Build own catalog starting from rekordbox XML plus manual tagging (§5)

Phase 1.5 and later

RiskMitigation
Music licensing — consumer streaming does not permit commercial playback in venuesPlayback stays on the DJ hardware. Our system only proposes tracks and distributes sync signals. Licensing responsibility is unchanged from today
Video asset rights (AI-generated material, likeness rights)Rights classification fixed in 1.5-a; only commercially licensed material
LED video drift (HDMI / NDI latency)Sync signal over WebSocket + latency compensation on the video side
Unstable network (Wi-Fi interference)Wired LAN required + cached playback as failsafe
Equipment differs per venueOn-site measurement per venue in 1.5-a; separate common core from venue-specific modules
Overlap with the Client’s AV affiliateHardware, installation and on-site operation = the affiliate. Software, AI and data = us. Agreed in writing in Phase 0
Emergency stop needed/admin/emergency_stop — halt playback control and display a still image

Demo constraint you will hit immediately

For the same licensing reason, our demos cannot play real commercial tracks. Demo builds use waveform animation plus click/metronome audio, or royalty-free material. This is consistent with the proposal itself, so it is explained openly rather than hidden.

14Deliverables

PhaseDeliverables
Phase 0Requirements document, screen design (Figma), data-item definition, ER diagram, fixed quotation, privacy policy revision draft, responsibility-split agreement
Phase 1Running web app (guest + admin), data platform, API specification, operations manual, Phase 1 data report
Phase 1.5-aAudio control spec, video production spec, connection-method spec, asset procurement plan, fixed quotation for 1.5-b
Phase 1.5-bAudio control module, video control module, /stage and /visual screens, on-site test manual
Phase 2PoC verification report, rollout decision material, improvement backlog

Source code and design assets are delivered to the Client. Write code and documentation on the assumption that another team may take it over.

15Hardware

Phase 1: no additional hardware. It runs on guests’ own smartphones and the venue’s existing network and PC.

CategoryConfigurationProcurement
Output PCCore i7 or better / 16 GB RAM / NVIDIA GPUNeed and cost split fixed in 1.5-a
Audio interfaceStandard pro-audio interfaceSame — may become unnecessary since playback stays on DJ hardware
LED outputHDMI 4K / NDI / OBSUse existing installation
NetworkWired LAN requiredVenue confirms whether cabling is needed

16Open questions (to be fixed in Phase 0)

17Glossary

TermMeaning
rekordboxDJ library management software. DJs analyse and tag their tracks here; the collection can be exported as XML. Our primary source of track features
PRO DJ LINKThe LAN protocol used between professional DJ players. Carries now-playing, BPM and beat position. No official public SDK
CDJProfessional DJ player hardware used in clubs. The current generation is networked
Beat gridPer-track map of where each beat and bar falls. Required for anything that must stay in time with the music
MyTagrekordbox’s user-defined tagging feature. Used to fill the “energy / mood” gap the XML does not cover
Ableton LinkTempo synchronisation protocol over LAN. Officially supported by rekordbox in PERFORMANCE mode. Tempo only, no track identity
Show-control systemSoftware that drives lighting, video and effects from a single timeline. The Client’s AV affiliate already operates one
NDINetwork Device Interface — video transport over IP, an alternative to HDMI cabling
Shadow executionRunning candidate algorithms in parallel with the live one and recording only their outputs. Never shown to users
ImpressionA record that a candidate was displayed to a guest. “Displayed but not voted for” is a meaningful signal

18How to work with this brief

  1. Read §5 and §6 carefully. Those two sections contain the decisions that are expensive or impossible to reverse. Everything else can be adjusted later.
  2. Do not add external service dependencies (music analysis APIs, paid data feeds, anything with recurring per-request cost) without raising it with the Japan-side PM first. Avoiding recurring cost is an explicit selling point of this proposal.
  3. Never make a hard dependency out of the DJ-hardware protocol. Assume fallback (b) or (c) may be the reality at this venue.
  4. Assume every phase may be the last one. Each phase must leave a working system and a usable deliverable.
  5. Questions about scope, schedule or anything commercial go to the Japan-side PM — not to the Client.