Pre-read for the offshore engineering team · Phases 0–2 · Prepared by EXPLACE Inc. (Japan)
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.
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.
| Phase | Content | Duration | Decision at the end |
|---|---|---|---|
| Phase 0 | Requirements, screen design, data-item definition, fixed quotation | ~4 weeks | Proceed to Phase 1? |
| Phase 1 | Data platform, guest survey, voting, admin console, evaluation & verification | ~8–10 weeks (incl. 2 weeks evaluation) | Proceed to 1.5-a? |
| Phase 1.5-a | Audio/video requirements definition, based on Phase 1 data plus on-site measurement | ~2–3 weeks | Scope and size of 1.5-b |
| Phase 1.5-b | Audio/video implementation | ~8–10 weeks | Proceed to Phase 2? |
| Phase 2 | On-site PoC, quality verification, minor fixes | ~4–6 weeks | Roll out to more venues? |
| Phase 3 | Multi-venue rollout, advanced features, festival adaptation | TBD | — |
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.
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.
| ID | Feature | Description | Stack |
|---|---|---|---|
| F1 | Guest entry | Access via QR / deep link. Member identification via Partner App token; guests without an account continue anonymously | Next.js, JWT (RS256) |
| F2 | Preference survey | Genre, artists, purpose of visit, group size, expected stay. Questions are editable from the admin console | React + API |
| F3 | Real-time voting | Guests vote on proposed track candidates; results reflect immediately | WebSocket (Socket.IO) |
| F4 | Rule-based track proposal | Computes next-track candidates from preferences + votes + time of day, and shows them to the DJ / admin. It does not play anything | Python, rules engine |
| F5 | Admin console | Session start/stop, question editing, live vote status, proposal list, KPI view | Next.js + Admin API |
| F6 | Data platform | Behavioural log collection (impression, vote, drop-off, dwell), aggregation, CSV/BI export | PostgreSQL + batch |
| F7 | Partner App integration | User info and subscription status lookup; activity log write-back | REST (OAuth2 / JWT) |
| F8 | Ops dashboard | Responses, votes and subscription transitions by venue and day | Inside Admin |
| F9 | Learning-preparation layer | Full candidate-set logging, feature store, offline evaluation (see §6) | Python, batch |
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.
| ID | Story | Goal | Data produced |
|---|---|---|---|
| U1 | Guest scans QR and enters preferences and purpose of visit | Completable in under 30 seconds | Preference distribution, motivation, demographics |
| U2 | Guest votes on candidate tracks | Result reflects immediately | Demand by track/genre per time slot |
| U3 | DJ / operator sees the proposal list and decides for themselves | More information, zero obligation | Proposal adoption rate |
| U4 | Operator manages sessions and questions from the console | Everything doable on site | Actual operational overhead |
| U5 | Operator reviews the report the next day | Usable for decisions | Venue 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.
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.
| Layer | What we get | Source | Why there |
|---|---|---|---|
| L1 — runtime | Now-playing track, BPM, beat / bar position | DJ hardware (PRO DJ LINK) | Only the hardware knows what is actually playing. We do not estimate |
| L2 — candidates | BPM, key, genre, beat grid, cue points | rekordbox collection XML | The DJ has already analysed and tagged everything. No new analysis, no paid API |
| L3 — guest input | Favourite artists / genres | Catalog search API (name resolution only) | We only need to normalise spelling variants. No audio features required |
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.
beat-link project and the associated DJ Link ecosystem analysis). “Unofficial but proven” is the accurate description.| Priority | Method | Notes |
|---|---|---|
| (a) | Receive now-playing / BPM / beat from PRO DJ LINK | Richest 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 staff | Last 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.
rekordbox can export the entire collection as XML. This is an officially documented format, and it already contains everything we need for candidate selection.
| Element | Fields we use |
|---|---|
TRACK | Artist, Album, Genre, AverageBpm, Tonality (key), Year, Label, Remixer, Rating, PlayCount, LastPlayed, Comments, Colour, TotalTime |
TEMPO | Inizio (grid start), Bpm, Metro (time signature), Battito (beat number in bar) → the beat grid |
POSITION_MARK | Cue / loop positions (Start, End, Type) |
PLAYLISTS | Playlist 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.
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.
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.
| # | Item | Why it cannot be added later |
|---|---|---|
| L1 | Full candidate-set logging | We must log the entire proposed set, not just the adopted track. With only one side, algorithms cannot be compared. Not reconstructable afterwards |
| L2 | Impressions and negative signals | “Shown but not voted for” carries as much information as a vote. If it is not recorded, it never existed |
| L3 | Context capture | Weekday, time slot, event type, crowd level, weather. Cannot be attached retroactively |
| L4 | Consent scope and retention design | If 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.
| # | Item | Content |
|---|---|---|
| L5 | Track feature store | Own catalog holding BPM, key, energy, genre tags, era. Buildable without any guest data |
| L6 | Offline evaluation harness | Replays accumulated logs to compare multiple algorithms |
| L7 | Shadow execution | Runs candidate algorithms in parallel and records only “what would have been recommended”. Never shown to guests |
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.
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.
anon_id) and a reference token only. Names, contact details and similar personal data stay inside the Partner App.| Category | Content | Retention |
|---|---|---|
| Potentially personal | Behavioural logs carrying anon_id | 3 months, with a deletion API |
| Anonymous / aggregate | Statistics with anon_id stripped, track features, shadow-run results | No 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.
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.
Required from Phase 1. This is a known schedule risk: it depends on the Client’s own app team.
| Endpoint | Purpose |
|---|---|
GET /external/user/info | user_id, nickname, membership_status |
GET /external/subscription/status | Subscription state (controls perks) |
GET /external/event/list | Current and upcoming events |
POST /external/user/preferences | Preference sync |
POST /external/activity/log | Write back vote and visit activity |
/v1/… prefixed endpoints; breaking changes require advance noticeDesign 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.
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.
| Content | Why 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 |
| Metric | Target | Meaning |
|---|---|---|
| Session start rate from QR | ≥ 15% of guests | Is the entry path working? |
| Survey completion rate | ≥ 70% of starters | Are the questions too heavy? |
| Vote participation rate | ≥ 50% of starters | Does participation actually feel worthwhile? |
| Proposal adoption rate | No target. Capturing it at all is the goal | The basis for the Phase 1.5 investment decision |
| Extra operational time | ≤ 15 min per business day | Can the venue actually run it? |
| Metric | Target |
|---|---|
| Vote → video reflection latency | ≤ 2 s |
| Video / BPM sync error | ≤ ±1.5 s |
| DJ adoption rate of proposals | Improvement over the Phase 1 measured value |
| Interruptions caused by on-site trouble | 0 per business day |
| Risk | Cause | Mitigation |
|---|---|---|
| Partner App changes are late | Contact person undecided, in-house capacity | Fix the contact and timeline in Phase 0. Design so guest-only mode runs standalone |
| Low survey response rate | Too many questions, poor entry path | Questions editable from admin; A/B on site. Start with 3 questions or fewer |
| Token verification failure | JWT expiry, key rotation | Refresh handling + fallback to anonymous guest |
| Missing consent coverage | Policy revision not completed | Policy revision draft is a Phase 0 deliverable; allow time for legal review |
| Venue staff cannot operate it | Insufficient onboarding | Admin must complete a night with two operations: session start and session stop. Checklist provided |
| Accumulated data unusable in Phase 1.5 | Candidate sets / impressions not logged; consent lacks analysis purpose; 3-month retention deletes everything | Make L1–L4 completion criteria for Phase 1 (§6). The only genuinely unrecoverable group |
| Track features unavailable | Streaming audio-features APIs closed to new apps since Nov 2024 | Build own catalog starting from rekordbox XML plus manual tagging (§5) |
| Risk | Mitigation |
|---|---|
| Music licensing — consumer streaming does not permit commercial playback in venues | Playback 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 venue | On-site measurement per venue in 1.5-a; separate common core from venue-specific modules |
| Overlap with the Client’s AV affiliate | Hardware, 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 |
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.
| Phase | Deliverables |
|---|---|
| Phase 0 | Requirements document, screen design (Figma), data-item definition, ER diagram, fixed quotation, privacy policy revision draft, responsibility-split agreement |
| Phase 1 | Running web app (guest + admin), data platform, API specification, operations manual, Phase 1 data report |
| Phase 1.5-a | Audio control spec, video production spec, connection-method spec, asset procurement plan, fixed quotation for 1.5-b |
| Phase 1.5-b | Audio control module, video control module, /stage and /visual screens, on-site test manual |
| Phase 2 | PoC 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.
Phase 1: no additional hardware. It runs on guests’ own smartphones and the venue’s existing network and PC.
| Category | Configuration | Procurement |
|---|---|---|
| Output PC | Core i7 or better / 16 GB RAM / NVIDIA GPU | Need and cost split fixed in 1.5-a |
| Audio interface | Standard pro-audio interface | Same — may become unnecessary since playback stays on DJ hardware |
| LED output | HDMI 4K / NDI / OBS | Use existing installation |
| Network | Wired LAN required | Venue confirms whether cabling is needed |
| Term | Meaning |
|---|---|
| rekordbox | DJ 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 LINK | The LAN protocol used between professional DJ players. Carries now-playing, BPM and beat position. No official public SDK |
| CDJ | Professional DJ player hardware used in clubs. The current generation is networked |
| Beat grid | Per-track map of where each beat and bar falls. Required for anything that must stay in time with the music |
| MyTag | rekordbox’s user-defined tagging feature. Used to fill the “energy / mood” gap the XML does not cover |
| Ableton Link | Tempo synchronisation protocol over LAN. Officially supported by rekordbox in PERFORMANCE mode. Tempo only, no track identity |
| Show-control system | Software that drives lighting, video and effects from a single timeline. The Client’s AV affiliate already operates one |
| NDI | Network Device Interface — video transport over IP, an alternative to HDMI cabling |
| Shadow execution | Running candidate algorithms in parallel with the live one and recording only their outputs. Never shown to users |
| Impression | A record that a candidate was displayed to a guest. “Displayed but not voted for” is a meaningful signal |