NexGate Live: revamp requirements
Version: 0.11 · Started: 2026-11-23 · Status: being discussed with the owner, nothing built from this yet
How live streaming should work after the revamp: what NexGate takes from TikTok, Instagram, YouTube, Twitch and Whatnot, and what is new to NexGate. This is a living document. Every topic we discuss is added here.
The current technical spec is VP_LIVE_SPEC.md (repo root). Where this document disagrees with it, this document
wins and the spec is updated when we build.
Marks used
| Mark | Meaning |
|---|---|
| ✅ | Agreed with the owner |
| 🟡 | Proposed, waiting for the owner's answer |
| ⬜ | Not discussed yet |
| ❌ | Decided against |
Rules that apply everywhere
- The backend decides, the app shows. Lists, order, reasons, which buttons and pills appear all come from the backend. The app never decides.
- A person is identified only by accountId.
- Never reshape an existing response. Something new gets a new endpoint or an added optional field.
- Never reorder a list under the user's thumb. A new order comes on refresh; a card that changes is changed in place.
- Every live endpoint needs a signed-in account (owner 2026-11-23). Today this already holds for the API (only
the SRS hooks are open, checked by a shared secret). The video itself is not protected yet: anyone with the
HLS / FLV address can watch. After the revamp, watching needs a short-lived play token from the backend
(bound to the account and phone), checked by SRS / the edges when playback starts. The same token gives "one phone
per ticket" (§7.10).
- Juma taps a live → the backend checks signed in, not blocked, valid ticket if needed → address with a play token (a few minutes to start, bound to his account and phone) → the edge asks the backend once when playback starts.
- Ali copies the address to his laptop ❌: wrong phone, expired.
- Comments: every request reaches the backend (no shared CDN copy); the list is built once every 2 s and served from memory; checking the token needs no database. Fine for 1,000s; more backend copies at 10,000+.
- Shared links: someone not signed in sees a preview (title, cover, host, "Sign in to watch"), like any shared post; watching needs signing in.
1. What exists today (2026-11-23)
| Area | What is there |
|---|---|
| Kinds | Video live and audio radio (radio has a 32 kbps version for slow networks). Spaces moved to chat. |
| Going live | Host creates a stream, gets a secret key, sends video to our media server (SRS). The stream only becomes LIVE when the media server says video arrived. |
| Who can go live | Account at least 3 days old, 18 years or older. No follower minimum. |
| Watching | HLS through the CDN. Delay about 4–10 seconds. |
| Comments | Kept in Redis for 6 hours, never chat messages. App reads them every 2 s; every viewer gets the same list. Host can mute a person and turn on slow mode. 1 comment every 2 s. |
| Selling | Attach products, tickets etc.; pin one; tap → normal product page → normal checkout. Taps counted. Orders are not linked to the stream. |
| Scheduling | Book a time; followers told at booking and at start; Remind me; abandoned bookings closed after 24 h. No edit, no cancel, no lists. |
| Recording / replay | Every stream recorded; File Thunder makes a replay; pins replay at the right second. No list of replays anywhere. |
| Discovery (built 2026-11-21, unpushed) | Viewer counts by heartbeat, GET /live/now ranked per person with reasons, cards pop in / out on the feed live channel, author.live ring on posts and clips. |
| Missing | Report a stream, reactions, gifts, guests / co-hosts, battles, moderators chosen by the host, word filter, polls, sales numbers, shop live, never tested on a real phone. |
2. Recording and replay
✅ No recording at all. A live exists only while it is on air.
- Remove the recording from SRS, the File Thunder replay handoff, and the states PROCESSING, REPLAY_READY and FAILED. A stream goes LIVE → ENDED and stops there.
- Why: no disk, no processing load on the box, and nobody could find replays anyway.
- Cost accepted: a report can only be acted on while the live is on, and seller disputes have no video proof. Automatic pause on reports (§10) becomes more important.
- ✅ When someone reports a stream, keep the last 5 minutes of comments and one picture from the video with the report (§10, S1).
3. Where lives appear
3.1 Lives have their own feeds
✅ The post feed stays posts only. No live cards mixed between posts. Lives get their own feeds:
| Live feed | What it is | Like | Backend |
|---|---|---|---|
| Live feed (list) | Who is live, ranked for you with a reason on each card; a "Later today" section at the bottom | TikTok LIVE tab | GET /live/now (exists) |
| Live swipe | Full screen; one live plays; swipe up and the next one plays at once | TikTok LIVE swipe | new GET /live/swipe, gives the next few in order so the app preloads |
| Live shopping | Only shop lives that are selling, each with its product strip | TikTok Shop LIVE, Taobao Live | a kind=SHOP filter on the two above, same engine |
All three use the same ranking (§3.3), the same live events (pop in, ended, counts) and the same rules.
✅ Live row above the home feed: a few circles of who is live now, above the feed list (like Instagram's stories row). Tapping one opens the live swipe. Only lives that are on now, never scheduled ones.
3.2 Lives in the post feed only through real posts
✅ A live reaches the post feed only as a real post that the host writes, with the live attached. The post feed treats it like any post.
✅ A live is an attachment type, not a post type (owner 2026-11-23). Posts today have two types (REGULAR, POLL) and
many attachments (products, shops, events, buy-together groups, instalment plans, links). The live joins the
attachments, stored like events (post_events → a post_streams row: postId + streamId).
- The post stays a normal post: text, photos, products and the live together.
- One live per post.
- ✅ Anyone can attach anyone's live (owner 2026-11-23), the same rule as products: anyone shows.
- Mama Yoyo attaches her own live, or her shop's live ✅
- Juma attaches Mama Yoyo's live: "Don't miss this Friday!" ✅. Remind me on his post joins the same list.
- Only a scheduled or live stream can be attached, never an ended or cancelled one.
- A private booking (§4.1, "Let people get reminded" off) can't be attached by anyone until it starts.
- Not when either side blocked the other.
- The attachment's state (scheduled / live / ended / cancelled) is read from the live system when the post is served, never copied into the post.
- ✅ Two ways a live post is made (owner 2026-11-24):
- Booking with "Let people get reminded" on (§4.1): the backend makes the post at booking time. It is a normal post: the caption from the booking form is the post text (may be empty), the live is attached.
- Going live now, or attaching someone's live: "Share to my post" is an app shortcut that opens the composer with the live attached; the normal create-post call accepts the live attachment.
- ✅ The card's content comes from the live, not the post (owner 2026-11-24): banner image (the live's cover),
title and description are fields of the live (
coverMediaId,title,description, already onCreateStreamRequestandStreamEntity) and show inside the attachment card. The post caption is separate and sits above the card like any post text.
The attachment changes by itself:
| When | The attachment shows | Tap |
|---|---|---|
| Before (scheduled) | banner · title · description · 📅 Friday 8 pm · 🔔 Remind me · "Juma, Neema + 118 waiting" | joins the same remind-me list |
| During | 🔴 LIVE now · 340 watching | opens the live |
| After | "Live ended" (+ "Next: Saturday 8 pm" if another is booked) | opens the host's profile or shop |
| Cancelled | "This live was cancelled" | profile or shop |
- ✅ "Your friends are waiting" on the scheduled card, like "friends are watching" (§3.2a): up to 2 names of connected people who tapped Remind me, then the number. The number follows §4.1 (hidden under 10 for viewers).
- ✅ "Share to my post" when going live now (not scheduled): an app shortcut that opens the composer with the live attached (see above). Off unless the host taps it. The app decides where the button sits.
- ✅ After the live ends the post stays, shows "Live ended", and the feed ranks it lower.
3.2a "Your friends are watching" on every live card
✅ Owner 2026-11-23. Every live card (the live attached to a post, Live feed, live row, swipe, profile / shop, Live now) can carry who you know is watching right now.
Example. Juma scrolls and sees Mama Yoyo's post with her live attached:
🔴 LIVE · Mama Yoyo · 👀 410 · Josh, Eli and 3 friends are watching
- Josh and Eli are Juma's friends and are watching now ✅ → named (at most 2 names, then "and N friends").
- Rose is his friend but turned off "Show when I join a live" (§8.3) ❌ → never named, not counted.
- Josh is on screen as a guest → "Josh is on screen" wins over "watching".
- Neema (a stranger to Juma) watching → not shown to him.
- Josh leaves → the card changes in place within seconds (Centrifugo / the feed live channel), never reordered.
Rules (backend decides)
- "Friends" = the existing friends rule of the people engine; the backend sends the names already chosen (accountId, name, photo) + a count. The app only shows them.
- Watching now = the existing heartbeats in Redis, matched with the viewer's friends (cheap set match, no database).
- Also a ranking reason: friends watching raises the live in Live now (like "following").
3.3 Who gets a live recommended
✅ Built 2026-11-21 for people (weights out of 100): you follow the host 100 · people you may know 70 · trending up to 60 (15 × log10(1 + watching)) · just started (< 10 min) 10 · selling live 5. Never: your own live, hosts blocked either way.
✅ Shop lives add:
| Reason | Card says | Weight |
|---|---|---|
| You follow the shop | "Duka la Mama is live" | 100 |
| You bought from this shop before | "You bought here before" | 80 |
| It sells things you looked at | "Kangas, like you looked at" | 50 |
| Friends follow or buy here | "Juma + 2 friends follow this shop" | 40 |
| Near you, delivers to you | "Near you · delivery today" | 30 |
| Never | shops you blocked or hid, shops that don't deliver to you, a shop's live on its own owner's or staff's list | — |
3.4 The live ring
- Mama Yoyo (owner) live as her shop → her own posts get the ring too, and tapping opens the shop's live.
- Neema (staff) live from the shop terminal → no ring on Neema's personal posts. The terminal never touches her personal account.
⬜ Ring on more places (profile, comments, chat lists, contacts, requests, people you may know) and a "🔴 live now: selling this" badge on product, shop and event pages.
4. Scheduling
4.1 Rules
✅ All agreed 2026-11-23, booking switch changed 2026-11-24:
- ✅ Switch "Let people get reminded", on by default (owner 2026-11-24; replaces "no private bookings"):
- On: the backend makes a normal post (caption + the live attached, §3.2). People see it in the feed and can tap Remind me. No push at booking time: the post is the announcement; pushes go only to remind-me people.
- Off: private booking. No post, no public Remind me, not on "Upcoming" or "Later today". Only the host gets "starts in 15 min · get ready". The booking still counts toward the 5-waiting and 2-hours-apart rules.
- A line under the switch says what it does:
- On: "A post goes to the feed. People can tap Remind me and get told before you start."
- Off: "Only you get reminded. Nobody sees this live until you start."
- Change after booking: off → on ✅ makes the post at that moment. On → off ✅ only while nobody has tapped Remind me yet (then the post is deleted); after that ❌, so nobody waiting is dropped silently.
- The host may delete the post like any post: the booking stays and the remind-me list is kept.
- ✅ "Josh is live" push at the start (now, private booking or public booking, owner 2026-11-24): followers + mutual friends get the push (a shop live: the shop's followers, §5). Recommended people get no push; they find it in the Live feed (§3.3). Remind-me people get their "is live now" once (never twice).
- Book from 15 minutes to 30 days ahead.
- At most 5 bookings waiting, counted separately for the person and for each shop (Mama Yoyo 5, Duka la Mama 5).
- At least 2 hours apart for the same person or the same shop.
- A person can't be booked as herself and as her shop at the same time. A shop has one live at a time, staff bookings included.
- Edit: time, title, cover, description. Time changes lock 30 minutes before the start.
- The time can move more than once. Each move sends one message to remind-me people only: "Juma moved his live to Saturday 8 pm". A title or cover change sends nothing.
- Cancel: the post's attachment shows "cancelled", and remind-me people are told. Followers who didn't tap Remind me are not told.
- Reminders to remind-me people: 24 hours before and 15 minutes before, and "is live now" at the start. A person is notified at most once per event, however many places they tapped Remind me.
- ✅ The viewer picks when to be reminded, from a fixed list (owner 2026-11-23). A fixed enum, never a free time,
so each reminder is one small row and one job query per choice.
- ✅ Choices
ReminderLead:DAY_BEFORE(24 h) ·HOUR_BEFORE(1 h) ·MINUTES_15·AT_START. - ✅ A viewer can tick more than one. Default when tapping Remind me: 24 h + 15 min, and
AT_STARTis always on ("is live now" is the point of Remind me). - Stored on the existing reminder row as a small set of these values. Times are counted from the stream's current start time, so when the host moves the live, every reminder moves with it.
- The host's own "get ready" stays fixed at 15 min.
- Example: Juma taps Remind me → pills [ 24 h ✓ ] [ 1 h ] [ 15 min ✓ ] · "and when it starts". He untaps 24 h → he gets only the 15-minute reminder and "is live now".
- ✅ Choices
- The host always gets "Your live starts in 15 min · get ready".
- 30 minutes late: cards show "starting soon…". 24 hours with no live: closed quietly (as today).
- The host sees who tapped Remind me ("120 waiting: Juma, Neema…"). Viewers see only the number, hidden under 10.
- Share: Share link (WhatsApp and others) and share into NexGate chats.
- No repeating schedules. After a live ends, one tap: "Book again next Friday 8 pm?".
- Lists: "My lives" for the host; "Upcoming" on profile and shop pages; "Later today" on the Live feed (tomorrow's at most 3).
4.2 The journey
The form (owner 2026-11-24)
- Taps 🔴 Go live.
- Top of the form: her profile with a dropdown [ Mama Yoyo ▾ ] → switch to 🛍 Duka la Mama (only if she has a shop).
- [ 🔴 Now ] [ 📅 Later ]
- The live's own fields: title · banner image · description · [ 🎥 Video ] [ 🎙 Audio ]. These show inside the live card (§3.2).
- Now → she goes live at once. Followers + mutual friends get "Mama Yoyo is live". No post unless she taps Share to my post.
- Later → When [ Today 8 pm ] [ Tomorrow 8 pm ] [ 🗓 Custom ] (quick pills follow her habit) → Let people get reminded [ ON ] + the line saying what it does → caption box ("Say something about your live…", shown only while the switch is on, may stay empty) → Book.
Done: "✅ Booked · Friday 8 pm" with [ 🔗 Share link ] [ ✏️ Edit ] (+ [ 📝 Post it ] for a private booking, which turns the switch on).
Example: Mama Yoyo books with the switch ON, caption "Kanga sale Friday, come!"
| When | What |
|---|---|
| Straight away | The backend posts "Kanga sale Friday, come!" + the live card (banner, title, 📅 Friday 8 pm, 🔔 Remind me). No push. "Upcoming" on her profile or shop |
| Thursday 8 pm | Remind-me people: "Mama Yoyo goes live tomorrow at 8 pm" |
| Friday 7:45 pm | Mama Yoyo: "starts in 15 min · get ready" (opens the device check with her setup filled in). Remind-me people: "goes live in 15 min" |
| Friday 8:00 pm | She taps Start. Remind-me people: "is live now"; her other followers + mutual friends: "Mama Yoyo is live". The post shows 🔴 LIVE |
| Friday 9:00 pm | She ends. The post shows "Live ended". She gets "Book again next Friday 8 pm?" |
Juma (follower): sees the post on Monday, card says "Neema + 40 waiting" → taps 🔔 Remind me → gets the 24-hour and 15-minute reminders → gets "is live now" → taps → watches.
Example: Josh books Saturday 6 pm with the switch OFF (private)
- No post, nobody sees it, no Remind me ✅
- 5:45 pm: only Josh gets "starts in 15 min · get ready" ✅
- 6:00 pm: he starts → followers + mutual friends get "Josh is live" ✅. No post unless he taps Share to my post.
- Wednesday he changes his mind → [ 📝 Post it ] → switch on, post made then ✅
My lives (profile → Lives): each booking with [ ✏️ Edit ] [ 📝 Post it ] [ ✖ Cancel ]. "Post it" on a public booking and "Share to my post" are app shortcuts to the composer with the live attached; a live can be posted more than once, by anyone.
From the post composer: [ + Live ] → pick a booking or make one (same When pills) → attached.
4.3 Learned from others
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| Book ahead | 1 h – 90 days | 1 h – ~10 days | any | 15 min – 30 days |
| Followers find out | feed post, story sticker | countdown on profile, share in messages | "Upcoming" in subscriptions | post with the live attached (made at booking), Upcoming, Later today; or private (switch off) |
| Reminders | 24 h + 15 min | when about to start | when live | 24 h + 15 min + live now |
| Edit lock | 45 min before | — | — | 30 min before |
| Host sees who registered | — | yes | — | yes |
5. Shop live
✅ "Go live as": Me or my shop. A shop live shows the shop's name and logo; the shop's followers are told; the shop page shows 🔴 LIVE; coupon drops, pins and sales count for the shop.
- A shop can't hold a phone: a person always presses Go live and talks.
- ✅ Mama Yoyo's personal followers are not notified when she goes live as the shop. They see her ring if they come across her posts.
5.1 Who can go live for the shop
✅ The owner, from her own phone, always.
✅ Staff, only from a shop terminal, never from their personal phone (the team rule: staff work only on shop devices).
- Staff need both keys: the right "Go live for the shop" given by the owner, and the terminal permission "Go live" set when the device was linked (rights ∩ terminal permissions, as for chat and calls).
- Viewers see "Duka la Mama · live" with "hosted by Neema" small underneath. Neema is known from who unlocked the terminal (face or PIN); the activity log records it.
- Staff can always go live as themselves from their personal phone: a person's live, no shop, no shop tools.
✅ The app: a separate "NexGate Shop" Android app (the planned Android terminal app, brought forward). Linked by QR, staff unlock with face or PIN. Its first feature is go live; orders, chat and alerts come later.
✅ External camera lives (OBS, YoloBox, GoPro, DJI): §8B. Open now for owners and personal accounts; staff streaming from a shop computer waits for the desktop terminal.
5.2 What staff can do while live
✅
| Neema live for Duka la Mama from the shop tablet | |
|---|---|
| Pin and show products | ✅ |
| Drop a coupon the owner prepared ("Live drops: 2,000 off, 20 people, budget 100,000") | ✅ |
| Create a new coupon or change a discount | ❌ owner only |
| Start a group buy at the product's group price | ✅ |
| Lower the group price, "give everyone the group price" | ❌ owner only |
| Mute people, slow mode | ✅ |
| Hand over to Ali without ending the live (shift change) | ✅ if Ali is also allowed |
Separate right "Use prepared live drops", so a staff member can host without dropping coupons. The owner can step in from her own phone while staff are live: drop or create coupons, pin products, without being on camera.
5.3 One at a time
✅ One live per person, one live per shop, at the same time.
| Case | |
|---|---|
| Mama Yoyo live as herself and as Duka la Mama at once | ❌ |
| Mama Yoyo live as herself, Neema live as Duka la Mama | ✅ |
| Neema and Ali both live as Duka la Mama | ❌ "Duka la Mama is already live (Neema)" |
| Branches live at once (Kariakoo + Mwenge) | ❌ for now |
5.4 Why the shop must own its live
In China, more than half of Taobao Live's sales now come from store-run lives (the shop's own hosts in turns), because brands that relied on star hosts lost their audience when the star left. Lesson: the shop owns the device, the audience and the live, whoever holds the phone.
6. Showing and selling products
✅ Anyone shows, only the shop sells.
| Who | Product | Show it (pin, tap → product page → normal checkout) | Live tools (coupon drop, group buy, auction, bargain) |
|---|---|---|---|
| Juma (no shop) | Mama Yoyo's kanga | ✅ card says "from Duka la Mama" | ❌ |
| Mama Yoyo (co-host) | her own kanga | ✅ | ✅ from her side of the live |
| Juma | Neema's shoes | ✅ "from Neema Shoes" | ❌ |
- Showing = discovery, as for posts today. The buyer pays the normal price; the shop gets a normal sale.
- Live tools = money promises: only that shop's owner (or allowed staff, §5.2) while in the live as host or co-host.
- A co-host brings their own shop and its tools. That is how several sellers share one live.
- Every pinned product that isn't the host's own says "from
" . - ✅ Shop setting "Others can pin my products in their lives", on by default.
- ❌ Affiliate share (a host without a shop earns a % of another shop's sale): not now. Later only if the shop turns it on.
7. Money and selling tools
The owner likes all nine first ideas (✅ 2026-11-23). On 2026-11-23 the list was widened to every money tool, to be checked one after another. Data saver moved to §9 (speed): it is not a money tool. Shop live is §5.
✅ Every tool works for both products and event tickets (owner 2026-11-23), except instalments: products only. Free delivery has no meaning for a ticket (nothing is delivered), so it is products only too (✅ confirmed, §7.4).
| # | Tool | What it is | Products | Event tickets | Builds on | Status |
|---|---|---|---|---|---|---|
| M1 | Live coupon drop | first N watching grab a coupon | ✅ | ✅ organiser drops ticket coupons | coupons | ✅ §7.1 |
| M2 | Live group buy | "6 of 10", price drops when full | ✅ | ✅ group tickets | group purchase, ticket groups | ✅ §7.2 (tickets included) |
| M3 | Sales numbers after the live | "You sold 14 kangas, 230,000 TZS" / "You sold 40 tickets" | ✅ | ✅ | orders, tickets | ✅ §7.3 |
| M4 | Free delivery during the live | "Free delivery on orders from this live" | ✅ | ➖ nothing to deliver | shipping campaigns | ✅ §7.4 |
| M5 | Flash price | the price drops for N minutes, for people watching | ✅ | ✅ | products, ticket types | ✅ §7.5 |
| M6 | Bargain live | a viewer sends an offer, the host accepts it on screen | ✅ | ✅ | chat offers | ✅ §7.6 |
| M7 | Live auction | bids with a countdown, the winner's money held in the wallet | ✅ | ✅ (e.g. a VIP table) | wallet, escrow | ✅ §7.8 |
| M8 | Instalments on the live | "Pay in 3" pinned next to the product | ✅ | ❌ products only | instalment plans | ✅ §7.7 |
| M9 | Live gifts | viewers send animated gifts that land in the host's gift balance | host, not a product | host, not a ticket | wallet, ledger | ✅ §7.9 |
| M11 | Ticket live | sell event tickets during a live; a paid-only stream for ticket holders | ➖ | ✅ | event tickets | ✅ §7.10 |
| M12 | Paid live | pay to watch (a class, a show) for people without an event | ➖ | ➖ | wallet | ❌ not needed (owner 2026-11-23); an online event with NexGate Live (§7.10) covers it |
❌ Not now (owner 2026-11-23): M10 paid comments, M13 fan subscriptions, M14 giveaway.
Note: the existing "no commission" rule is about riders only. Live gifts: no platform cut for now (§7.9).
7.1 Live coupon drop
✅ Agreed 2026-11-23.
Example. Mama Yoyo is live, 300 watching.
- She taps Drop coupon: "2,000 off · 20 people · 60 seconds" (a coupon she made before, or a new one on the spot).
- Everyone watching sees "🎟️ 2,000 off · 20 left · 0:59", counting down live.
- Juma taps Grab ✅ → it lands in My coupons.
- Neema taps after all 20 are gone ❌ "All taken. Stay for the next drop!"
- Ali has the code from a WhatsApp screenshot but isn't watching ❌.
Rules
- First N to grab (not to buy).
- How long a grabbed coupon can be used: the shop owner picks at drop time from a fixed list 1 h · 6 h · 24 h (default) · 3 days · 7 days, counted from the grab, never past the coupon's own end date (ticket coupons never past the end of ticket sales). Grabbed coupons are never shortened; a new drop can use a new time.
- One reminder before a grabbed coupon ends: "Your 2,000 off ends in 1 hour" (15 min for a 1 h coupon).
- The host chooses what it covers; default the whole shop.
- Who drops: the shop owner (staff only prepared drops, §5.2). For events, the organiser drops ticket coupons. A host with no shop can't drop.
- Who can grab: accounts at least 3 days old that have watched for at least 30 seconds.
- The shop pays, from its spending limit, as shop coupons do today.
- Switch "Only people watching can grab", on by default, on the coupon itself and at drop time. Off = a normal coupon announced live (the code works anywhere).
- New in coupons: a limit on how many can grab (today coupons only limit uses), the drop card, the countdown, "only people watching".
Editing a drop
| While it runs | |
|---|---|
| Add more people (20 → 30) | ✅ |
| Add more time | ✅ |
| Stop early (grabbed coupons stay) | ✅ |
| Lower the discount | ❌ |
| Change what it covers or the minimum order | ❌ |
| Go below the number already grabbed | ❌ |
| After it ends | |
|---|---|
| Restart the same drop | ❌ drop a new one (one tap, last settings filled in) |
| Take back or shorten grabbed coupons | ❌ |
7.2 Live group buy
✅ Agreed 2026-11-23.
Today: a product can have group buying on (group price, number of people, time limit in hours). A buyer starts a group; others join by paying at checkout (money waits in escrow); full → orders created; time out → everyone refunded. One price only.
Example. Mama Yoyo is live with a kanga: 25,000 normally, 20,000 in a group of 10.
- She taps Start group buy on the pinned kanga.
- Everyone watching sees "👥 Group 20,000 · 6 of 10 · 0:09:59".
- Juma taps Join → normal checkout → 7 of 10 for everyone; "Juma joined 🎉" shows briefly.
- 10 reached → "Group done!", orders made. Time out at 8 of 10 → refunds (as today), unless the host gives it through.
Rules
- The host starts it (one group for the whole live, not many small ones).
- The host picks the time (5, 10, 30 min); it can stay open at most 30 minutes after the live ends.
- Switch "Only people watching can join", on by default.
- "Give everyone the group price": the host completes it early with fewer people.
- One price, no steps ("5 people → 22,000, 10 → 20,000") for now.
- While running: add time ✅, lower the price ✅, give it through early ✅; raise the price ❌, raise the number of people ❌.
Tickets (✅ agreed 2026-11-23): ticket types already have groups (a buyer starts one, seats, per-seat escrow, refund on time out). In the live, the same rules as products, with seats:
- DJ Mike starts "👥 VIP 40,000 · 3 of 10 seats · 9:59" on the pinned VIP ticket; the organiser starts it without buying a seat; full → all get VIP tickets; time out → refunds, unless he gives it through.
- Never after the event starts or ticket sales close: the group ends at that moment.
- One group per ticket type per live; one deal per ticket type at a time; no coupon on top.
- One person can buy several seats, up to the ticket type's "max per person".
- (Products too: in a live the host starts the group without buying.)
7.3 Sales numbers after the live
✅ Agreed 2026-11-23.
Today: an order's "source" says how it was bought (buy now, cart, instalment, group, chat offer), not where it was found. No order or ticket knows about a live.
How a purchase is linked to a live (example)
- Mama Yoyo is live. Juma taps the pinned kanga → the product page opens carrying "from Mama Yoyo's live".
- He buys now ✅, tonight from his cart ✅, tomorrow morning ✅: counted, within 24 hours of his tap.
- He buys 3 days later ❌: no longer the live's sale.
- He taps the kanga in Mama Yoyo's live, then in Neema's live, and buys ✅: counted for Neema's (the last live tapped wins).
- A coupon grabbed in the live or a group buy started in the live ✅: always linked, no tap needed.
- Tickets the same: Juma taps the pinned ticket and buys → counted for the live.
What the host sees
- Right after ending (end screen + a notification): length, peak watching, people who watched, new followers, orders and money paid, coupon drop (grabbed → used), group buy (joined of needed), best product (taps → orders).
- Later in My lives → that live: the same, plus refunds subtracted once they happen ("2 refunded, 200,000 net").
- Money is counted when paid, at once; the net after refunds follows later.
- During the live, the host only: "5 orders so far" (counts, no money).
Who sees what
| Case | Sees |
|---|---|
| Juma pins Mama Yoyo's kanga in his live | Juma: "30 taps → 4 orders", no money (not his sale) |
| Same | Mama Yoyo: "4 orders came from Juma's live" in her shop reports |
| Neema hosts the shop live from the terminal | Owner: everything, money included. Neema: counts only, no money (team rule) |
7.4 Free delivery during the live
✅ Agreed 2026-11-23. Products only (tickets have nothing to deliver).
Today: a shop can run a delivery campaign (free / percentage / fixed off, a cap per order, areas, paid from its spending limit). M4 is that campaign tied to one live.
Example. Mama Yoyo is live.
- She taps Free delivery: free or half off, a cap (up to 5,000 per order), areas (Dar only or everywhere).
- Everyone watching sees "🚚 Free delivery on orders from this live".
- Juma taps the kanga in the live and buys ✅ → free delivery.
- Ali opens her shop the normal way and buys ❌ → normal delivery.
- Juma buys tomorrow morning, within 24 h of his tap ✅ (the same "from live" link as §7.3).
Rules
- Only orders from the live (§7.3 link), not the whole shop.
- The owner starts it; staff only start ones the owner prepared (as coupon drops).
- For people who tapped, it lasts 24 h after their tap, like the sale link, even after the live ends.
- The shop pays, within the cap and its spending limit, as campaigns today.
7.5 Flash price
✅ Agreed 2026-11-23. Products and ticket types.
Example. Mama Yoyo pins the kanga (25,000).
- She taps Flash price: 18,000 for 5 minutes, only 10 pieces at that price.
- Everyone watching sees "⚡ 18,000 (was 25,000) · 7 left · 4:59".
- Juma taps Buy at 4:30, pays at 4:45 ✅ 18,000.
- Neema starts checkout at 4:58, pays at 5:20 ✅ 18,000 (10 minutes to pay once checkout started).
- Ali taps after the 10 are gone ❌ "Sold out at flash price, still 25,000."
- Timer ends → back to 25,000 for everyone.
- Tickets the same: the organiser sets "VIP 50,000 → 40,000 for 5 min, 20 tickets".
Rules
- Time from a fixed list: 1 · 3 · 5 · 10 minutes; piece limit optional.
- Switch "Only people watching can buy", on by default, set when starting it (as the coupon drop and group buy). Off = the flash price works for anyone during those minutes (shop page, product page), announced in the live.
- No coupon on top of a flash price.
- One deal per product at a time (no flash price and group buy together on the same product).
- Starting checkout holds the piece for 10 minutes; not paid → it goes back to the flash pieces.
- While it runs: lower the price more ✅, add pieces ✅, stop early ✅; raise the price ❌.
- The owner starts it; staff only start ones the owner prepared.
Sizes and colours (today a product has one stock number for all; colours may have a price difference; sizes are only details; each ticket type has its own price and count)
- The flash price takes the same amount off every colour: kanga 25,000 → 18,000 (7,000 off); gold (+2,000) 27,000 → 20,000.
- The piece limit counts all sizes and colours together (red M and gold L both count in the same 10).
- A flash price on one colour only ❌ not now (needs stock per colour / size first).
- Tickets: one flash price per ticket type (VIP 40,000 doesn't touch Regular); one deal at a time per type.
- The buyer picks size and colour at checkout as usual; the 10-minute hold keeps one flash piece whatever they pick.
7.6 Bargain live
✅ Agreed 2026-11-23. Products; ticket types too (off by default).
Today: chat offers: a seller sends one person a special price in chat, it's paid at checkout and expires by itself. In the live it goes the other way: the viewer offers, the host answers on screen; an accepted price becomes the same kind of personal offer, so checkout already works.
Example. Mama Yoyo pins a handbag (60,000) and turns on Bargain.
- Juma taps Make an offer: 45,000.
- Her screen lists: "Juma 45,000 · Neema 50,000 · Ali 30,000".
- Everyone watching briefly sees "💬 Juma offered 45,000".
- She taps Counter 52,000 → Juma sees [Accept] [No]; he accepts → 15 minutes to pay, for him only ✅.
- She accepts Neema's 50,000 ✅ → 15 minutes to pay.
- She says No to Ali's 30,000 ❌ → "Not this time".
- The live ends with offers unanswered → closed quietly.
Rules
- Optional lowest price, hidden ("never below 40,000"): lower offers refused at once.
- No auto-accept for now; the host decides live.
- Everyone watching sees offers; refused ones without the amount.
- One open offer per person per product; at most 3 tries per product per live; account 3 days old and watched 30 s.
- 15 minutes to pay after accepting, then it closes and the piece goes back.
- One piece per offer for now.
- Sizes and colours as in the flash price: the buyer picks at checkout; a dearer colour keeps its difference.
- Tickets: the organiser can turn bargaining on per ticket type, off by default.
- Only the owner turns it on; no coupon on top; one deal per product at a time.
7.7 Instalments on the live
✅ Agreed 2026-11-23. Products only.
Today: a shop attaches instalment plans to a product (number of payments, weekly / monthly, optional interest, minimum down payment, ship after the first payment or only after the last).
Example. Mama Yoyo pins a sofa (300,000) with a "Pay in 3 months" plan.
- The pinned card shows by itself "300,000 · or Pay in 3 · 100,000 now".
- Juma taps Pay in 3 → the normal instalment checkout ✅, counted as a sale from the live (§7.3).
- The kanga has no plan → no "Pay in 3".
Rules
- The card shows the product's existing plans; no new live tool.
- A live-only special (0% interest, lower down payment) ❌ later.
- Flash or bargain price in instalments ❌ for now (one deal at a time; the flash card shows no "Pay in 3").
- Group buy with instalments ❌ (group buys pay in full, as today).
- Sales numbers show both: "2 on instalments: 200,000 paid now of 600,000".
- Check first: a cancelled instalment order really puts the stock back (open backlog item).
7.8 Live auction
✅ Agreed 2026-11-23. Products and tickets.
Today: wallet payments and escrow exist; there is no "hold" on a wallet, so the current top bid waits in escrow and goes back the moment someone bids higher.
Example. Mama Yoyo pins a vintage watch: start 20,000, steps of 1,000, 60 seconds.
- Everyone watching sees "🔨 Watch · 20,000 · 0:59 · [Bid 21,000]".
- Juma bids 21,000 → the backend checks his wallet and puts 21,000 in escrow ✅.
- Neema bids 22,000 → hers in escrow, Juma's 21,000 back to his wallet at once ✅.
- Ali has 10,000 → "Top up to bid" ❌.
- Juma bids 25,000 with 5 s left → the timer goes back to 10 s.
- Time ends → "Juma wins at 25,000 🎉" → his order is made from the held money; he picks delivery or pickup.
Rules
- Only the top bid is held; outbid = money back at once.
- Optional hidden lowest price; not reached → no winner, money back; viewers see "lowest price not reached yet".
- Times from a fixed list 30 s · 1 · 3 · 5 min; a bid in the last 10 s puts the timer back to 10 s.
- Steps from a fixed list 500 · 1,000 · 5,000 · 10,000; one-tap bid buttons, no typing.
- Switch "Only people watching can bid", on by default; account 3 days old and watched 30 s.
- One piece per auction.
- Tickets: the winner gets a ticket ("VIP table for 10").
- No backing out after winning; the host can cancel before the end (all money back); after the end it is a normal paid order with normal refund rules.
- The live ends mid-auction → the auction finishes on its own timer, the winner still wins.
- Only the owner starts it; no coupon on top; one deal per product at a time.
7.9 Live gifts
✅ Agreed 2026-11-23. Called just gifts in the app (the earlier idea "Shangwe" dropped); in the backend its own type (live gift), never mixed up with gift cards.
Example. Juma is singing live.
- Neema taps 🎁 → 🔥 Fire · 1,000 TZS, paid from her wallet in one tap.
- Everyone watching sees the fire animation and "Neema sent 🔥".
- Juma's gift balance goes up 1,000 ✅ ("Neema sent you a gift → in your gift balance").
- Next week he buys a kanga for 25,000: 1,000 from gift balance, 24,000 from his wallet ✅ (as gift cards today).
- He tries to withdraw the 1,000 to M-Pesa ❌: gift balance never goes out.
- Neema tries to pay a gift from her gift balance ❌: "gift balance can't buy gifts" (existing rule).
- Top of the screen: "Top fans: Neema 6,000 · Ali 2,000"; after the live: "38 gifts · 54,000 TZS".
Rules
- Paid from the wallet only, in TZS, no coins.
- Lands in the host's gift balance (spend only, never withdrawn, never transferred, never expires).
- Later, if creators ask: hosts who verify their identity can move gift earnings into their wallet, with a waiting period against fraud.
- No platform cut for now: 100% to the host (or to the speaker or co-host picked, §8A.5). ⚠️ Before building, check the current Apple and Google store rules.
- Personal live → the host's gift balance. Shop live → the shop (owner); staff never see the money. Off for shop lives by default, the owner can turn it on.
- Giver's account at least 3 days old; daily giving limit 100,000 TZS; never given back once sent.
The gift list is made by admin, only for lives:
- Each item: key (fixed, e.g.
fire), name, icon, price, order on the list, on / off. - The live event carries the key; the app plays the animation for that key.
- A key the app doesn't know yet (admin added
drum, the phone has an old app): the event also carries the icon, the app shows a simple fly-up of it. Admin can add gifts any time without an app release. - Never deleted, only turned off; each send keeps the price paid at that moment.
7.10 Ticket live
✅ Agreed 2026-11-23.
Today: events are in person, online or hybrid; an online event only holds a typed meeting link (Zoom etc.); ticket types can be marked online; tickets already have group buying.
A. Selling tickets in a live (already covered): the organiser pins a ticket type and can use flash price, bargain, auction, coupon drop and group buy on it. DJ Mike pins "VIP · 50,000" two days before his show, runs "VIP 40,000 for 5 min", Juma buys → counted for the live (§7.3).
B. A live only ticket holders can watch (new): for online and hybrid events NexGate Live replaces the meeting link.
Example. Neema runs an online "Business class: selling on Instagram", 10,000, Saturday 10:00.
- On the event she picks "Stream on NexGate Live" instead of a meeting link → a live is booked automatically for Saturday 10:00 (as her or her shop).
- Juma buys an online ticket → 09:45 "Your class starts in 15 min" ✅ (the ticket counts as Remind me).
- 10:00 he opens it and watches ✅ → counted as his check-in.
- Ali has no ticket → 🔒 in the live feeds, "Buy ticket to watch" → buys → in within seconds ✅.
- Juma's brother logs in on another phone ❌ "Already playing on another device" (one phone per ticket).
- Comments and gifts only from ticket holders.
- Watch later ❌: no recording; the ticket says "Live only, no replay".
Rules
- "Stream on NexGate Live" is a choice on online / hybrid events next to the meeting link; the live is booked from the event time.
- Watching = check-in for online tickets.
- No free preview: lock + "Buy ticket to watch".
- One phone at a time per ticket.
- Shown in the live feeds with the lock; only ticket holders can open it.
- Event moved or cancelled → the live moves or is cancelled with it (ticket holders get the existing messages).
- Hybrid: only online tickets can watch the stream.
7.11 Live goals
✅ Agreed 2026-11-24. A target shown to everyone as a progress bar; viewers push it together; when it's reached there's a small celebration and the reward fires by itself.
How others do it (2026-11-24): YouTube Gift goals show progress, target and time left, all gift money to the creator; many TikTok creators use overlay tools (e.g. TikOps) for gift or like goals with a progress bar; TikTok's own rules not confirmed. NexGate adds sales goals, which only a shopping app can do.
Goal types
| Type | Viewers see | Host sees |
|---|---|---|
| 🧾 Orders (any product from this live) | "14 / 20 orders" | the same |
| 📦 Pieces of one product | "14 / 20 red kangas sold" | the same |
| 💰 Revenue | only the % bar ("72%") | owner: TZS ("720,000 / 1,000,000"); staff host: % only |
| ➕ New followers | "38 / 50 new followers" | the same |
| 👀 People watching | "420 / 500 watching" | the same |
| 🎁 Gifts | "12 / 20 Lions" (count, never money) | the same |
- ❌ No reaction goal: reactions are free and fast (15 a second per person), so a few people could fill any target in a minute and the reward would be given away too easily.
- Revenue only as % to viewers: money stays with the owner (§7.3); competitors watch too.
- Counting: paid orders only; a refund after the live doesn't pull the bar back during the live (§7.3).
Rules
- Up to 2 goals at the same time (owner 2026-11-24: e.g. orders and revenue side by side). Each has its own
bar, target, optional timer and reward, and ends on its own; when one ends the host can add another.
- Never two of the same type (two "orders" goals ❌).
- Two bars stacked, thin; the one closest to done sits on top. Audio lock screen: the one closest to done.
- Both reach their target from the same order → both 🎉 and both rewards fire.
- Only inside the live: set in the create form (starts at Go live) or during the live; it ends when it's reached, when the host cancels it (any time), when its timer runs out, or when the live ends.
- Timer optional (owner 2026-11-24), for a goal that covers one part of the live ("the next 15 minutes are the shoe segment"): [ Until the live ends ✓ ] [ 5 min ] [ 10 min ] [ 15 min ] [ 30 min ]. Viewers see the time left on the bar.
- Time's up before the target: viewers see "⏳ Time's up…"; the host gets [ ➕ 5 more min ] [ 🎁 Give the reward anyway ] [ End ]; no answer in 1 minute → ends without the reward.
- Reward (optional): only the shop's own tools (coupon drop, flash price, free delivery, prepared beforehand), fired by the backend at the moment the bar fills. A personal live can promise only non-money things ("I'll sing a song"), written as text.
- The host can lower the target (the bar may fill at once → 🎉), never raise it (unfair to people who helped; same idea as group buy).
- Cancel: the host is asked "Give the reward anyway?" [ Yes ] [ No ]. Yes → the reward fires (like group buy's "give everyone the group price early").
- Not reached when the live ends: ends quietly, no reward. Viewers never see "failed"; a cancel without reward shows "So close! 38 / 50 💪" for a few seconds.
- Nothing is taken back: gifts stay with whoever got them (§7.9), orders are normal orders, followers stay.
- Summary (§11): "Goal: 50 followers · reached 38 (76%)" or "reached at 8:20".
- Audio: a ding + lock-screen line "🎯 Goal reached · 🎟 30% off" (§8A.10).
┌──────────────────────────────────────────┐
│ 🎯 50 new followers → 🎟 30% off all │
│ ███████████████░░░░░ 38 / 50 ⏱ 4:10 │
└──────────────────────────────────────────┘
↓ reaches 50
🎉 Goal reached! 🎟 30% coupon dropped · [Grab]
Two goals at once:
┌──────────────────────────────────────────┐
│ 🎯 Orders → 🚚 free delivery │
│ ████████████████░░░░ 16 / 20 │
│ 🎯 Sales → ⚡ flash price on shoes │
│ ███████████░░░░░░░░░ 55% ⏱ 12:30 │
└──────────────────────────────────────────┘
Examples
- Mama Yoyo: "20 red kangas sold → free delivery for everyone". The bar fills as people buy; at 20 → 🎉 → free delivery turns on by itself → 15 more people buy ✅
- "50 followers → 30% coupon", stuck at 38 → she cancels → "Give the reward anyway?" → Yes → coupon drops → "asante mama! ❤️" ✅
- Revenue goal: viewers see "72%", Mama Yoyo sees "720,000 / 1,000,000"; Neema (staff host) sees only "72%" ✅
- Two at once: "20 orders → free delivery" + "1,000,000 TZS → flash price on shoes". At 20 orders 🎉 free delivery; the revenue bar keeps going alone; she adds "50 followers → coupon" as the second goal ✅. She tries a second orders goal ❌ "You already have an orders goal" ✅
- The live ends at 38 / 50 → no reward; summary "reached 38 (76%)" ✅
- Shoe segment: "10 pairs in 15 min → flash price on bags" → time's up at 8 / 10 → she taps ➕ 5 more min → 10 / 10 → 🎉 ✅
7.12 All the tools, and the host's toolbar
✅ 2026-11-24. About 28 tools (not counting what happens by itself: sales numbers, reminders, summary, bad network).
| Group | Tools |
|---|---|
| 🛍 Selling (11) | 📌 pin / show a product · 🎟 coupon drop · 👥 group buy · ⚡ flash price · 🤝 bargain · 🔨 auction · 💳 instalments · 🚚 free delivery · 🎯 goals · 🎁 gifts · 🎫 ticket live |
| 💬 Taking part (7) | comments (role badges, reply, pin) · reactions · polls · questions · guests / speakers / co-hosts · who's watching · send viewers to another live |
| 🛡 Safety (6) | report · moderators · word filter · mute / remove / block · slow mode · who can ask to speak |
| 🎬 Running the live (4) | booking + reminders + post · share link / share to my post · stream from phone / external camera (+ switch) · go live / end / continue your live |
| Not now | paid comments · subscriptions · giveaways |
The host's screen can't hold 28 buttons:
┌─────────────────────────────────────────┐
│ [📌 Pin] [🎟 Drop] [👥 Stage] [💬] [⋯ More]│
└─────────────────────────────────────────┘
🎟 Drop ▸ [Coupon] [Flash] [Group buy] [Auction] [Bargain] [🎯 Goal]
⋯ More ▸ [Poll] [Questions] [Moderators] [Safety] [Share] [Switch] [End]
8. Taking part
✅ Owner 2026-11-23: T1–T6 are needed; T7 battles and T8 not. Discussed one by one below.
| # | Idea | What it is | Status |
|---|---|---|---|
| T1 | Guests and co-hosts | others on screen with the host (split screen); co-hosts bring their own shop and tools (§6) | ✅ §8.1 |
| T2 | Reactions (YouTube style) | tap an emoji, it floats up for everyone, no names, no counts | ✅ §8.2 |
| T3 | "Juma joined" | a short line when someone arrives | ✅ §8.3 |
| T4 | Who's watching | a viewer list | ✅ §8.4 |
| T5 | Polls | "Red or blue kanga?" with live results | ✅ §8.5 |
| T6 | Questions | viewers send questions, the host pins one on screen | ✅ §8.6 |
| T7 | Battles | two hosts on split screen, gifts decide the winner | ❌ not needed (owner 2026-11-23) |
| T8 | Send viewers on | when ending, send everyone to a friend's live | ❌ not needed |
8.1 Guests and co-hosts
✅ Agreed 2026-11-23.
- Guest: joins for a while (a viewer asking on camera), then leaves. Co-host: sells with the host for the whole live with their own shop and tools (§6).
Example. Mama Yoyo is live.
- Juma taps Ask to join (video or voice only) → "Juma wants to join · [Accept] [No]".
- She accepts → the screen splits Mama Yoyo | Juma; everyone watching sees both ✅.
- She taps Remove → Juma is back to watching ✅. Juma can also leave by himself.
- She invites Neema (Neema Fashions) as co-host → both pin their own products, Neema runs her own coupon drop ✅.
- Ali, whom Neema has blocked, asks to join ❌ (blocks of anyone on screen apply).
- Mama Yoyo ends the live → it ends for everyone.
Rules
- Seats decided by the backend: up to 5 guests and co-hosts per live (host + 5 = 6 on screen); each live gets a "seats now" number from the backend, 3 for now (host + 2), less for a weak phone. Raising it needs no app update.
- Guests: request (host accepts) or invite; co-hosts: invite only; accounts at least 3 days old.
- Invites follow §8A.8 (copied from group invites) and the setting "Who can invite me to a live" (§8A.9).
- Voice-only guests allowed in video lives; radio lives: voice only.
- Host tools: accept · ignore · remove · block from asking again in this live · turn requests off.
- The host is responsible for what happens in their live (as YouTube); fast tools matter.
When the screen is full: invites and requests can always be sent; the seat is checked when someone goes on screen. Mama Yoyo has 3 seats, Juma and Neema are on (full).
- She invites Ali ✅ → her screen: "Full · remove someone to bring Ali in".
- Ali taps Join while full ❌ "Mama Yoyo's screen is full"; his invite stays open.
- She removes Juma → Ali gets "A seat is free · Join now" ✅.
- Ali and Rose tap Join at the same moment for the last seat → only one gets it (seat taken in one safe step); the other ❌ "Screen is full".
- Zawadi asks to join while full ✅ → waits in the list; the host's Accept is greyed ("Full") until a seat frees.
- The invited person is in their own live ❌ "End your live to join Mama Yoyo's" (one live per person).
- Invites sent during the live expire after 5 minutes or when the live ends; invites from the form or My lives last until the live ends (§8A.8).
- When a seat frees, only invited people are told; requests stay in the host's list and the host picks.
- Co-hosts and guests use the same seats.
Compared with others
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| On screen | host + 5 | host + 3 | host + 1 | host + 5 allowed, host + 2 for now (backend decides) |
| Getting in | request (video or voice) → host accepts | request or host invites | host's invite link, waiting room | request or invite; co-host invite only |
| Voice only | ✅ | ❌ | ❌ | ✅ (radio: always) |
| Blocks | — | anyone blocked by anyone on screen can't join | — | same as Instagram |
| Host tools | accept, ignore, block, remove, layout | add, remove | swap guest | accept, ignore, remove, block for this live, requests off |
| Who's responsible | — | — | the host | the host |
| Who makes the picture | phone, server for weak phones | — | — | the host's phone (server for weak phones later) |
How the picture is made: on the host's phone, not the server. Mixing one live with guests on the server takes about 3–4 CPU cores (LiveKit's own numbers); our box shows about 4. So:
- Host and guests connect through LiveKit, which only passes their video between them (cheap).
- The host's phone draws the guests next to its own camera.
- It sends one mixed picture to SRS, as today; viewers watch as today.
- The backend tells each phone how many guests it can take (weak phone → 1).
- Later, when we have more servers: mix on the server only for phones that are too weak (ByteDance's own approach: client mixing when the phone and network are good enough, server mixing otherwise).
8.1a Guest vs co-host
✅ Agreed 2026-11-24. A guest is a visitor, a co-host is a partner. The same in video and audio (in audio a guest is a speaker).
| 👤 Guest (video) / 🎙 Speaker (audio) | 🤝 Co-host | |
|---|---|---|
| Who | a viewer or listener who comes on for a while: a question, a story, a happy buyer | a partner who runs the live with the host, often another shop |
| How they get in | asks (request) or is invited (§8A.8) | invite only |
| How long | a few minutes, then back to watching | the whole live |
| Sells | ❌ no tools | ✅ their own shop's products and tools; never the host shop's (only the shop sells, §6) |
| Helps manage | ❌ | ✅ accept requests, mute, remove, full viewer list, pin comments |
| Comment badge (§8.7) | "On stage" | "Co-host" |
| Gifts (§8A.5) | ✅ can receive | ✅ can receive |
| Seat | takes one | takes one |
| How many | the seats left (video 5 allowed / 3 now, audio 8 / 5) | up to 2, in both kinds |
| Host drops (§9.3) | waits | carries on (audio) |
| Go live / End / Switch source | ❌ | ❌ host only |
| Privacy setting | "Who can invite me to a live" (§8A.9) | the same |
| External camera (§8B.7, §8B.8) | through the Guests window (OBS) | in the room, off-screen from the phone, or the Guests window |
- ✅ Up to 2 co-hosts in video too (before, video set no limit, so all 5 seats could be co-hosts each dropping coupons). The other seats are for guests and speakers.
Example
- Mama Yoyo goes live as Duka la Mama with Neema Fashions as co-host for the whole hour: Neema pins her shoes, drops her own coupon, mutes a spammer ✅
- Juma asks to join → on screen 3 minutes: "I bought this kanga last week, it's great" → back to watching ✅. He can't drop coupons or mute anyone ❌
- Seats: Mama Yoyo + Neema (co-host) + Juma (guest) = 3 of 3 → full until Juma leaves ✅
- Mama Yoyo tries to add a third co-host ❌ "Up to 2 co-hosts" → invites her as a guest instead ✅
8.2 Reactions (the YouTube way)
✅ Agreed 2026-11-23 (owner: copy YouTube).
Example. Mama Yoyo shows a new kanga.
- Juma taps 😍 → it floats up the side for everyone ✅.
- 50 people tap 🔥 at once → the side fills with 🔥 ✅; she sees "they love this one".
- She makes a joke → 😂 everywhere.
- No names, no counts on screen.
- After the live, the host only: "2.1K reactions · most 🔥".
Rules
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| How | tap the screen anywhere | heart button | reactions button | reactions button (YouTube) |
| Kinds | hearts | hearts | ❤️ 😂 🎉 😮 💯 | ❤️ 😂 🔥 😍 👏 |
| Names shown | — | — | ❌ | ❌ |
| Count shown | ✅ to everyone | ❌ | ❌ | ❌ (host after the live) |
| Used for ranking | ✅ | — | — | ✅ a little |
8.3 "Juma joined"
✅ Agreed 2026-11-23. The app decides how joins look; the backend delivers the right joins with the right facts.
Every 2 s, with the comments:
| Field | Example | Why |
|---|---|---|
| who | Juma's accountId, name, photo | "Juma joined" |
| hostFollows | true | Mama Yoyo knows him |
| topFan | rank 1 | the app can make a bigger entrance |
| friendOfYou | true (for this viewer) | "your friend Juma joined" |
| joinedCount | 43 in the last 2 s | "+43 joined" in busy rooms |
Rules (backend)
- At most 10 joins per 2 s, most important first (top fans, people the host follows, friends), plus the count.
- Switch "Show when I join a live", on by default; off → the name is never sent, only counted.
- Top fan rank = gifts in this host's lives over the last 30 days.
- Joins come from the existing heartbeats; no new messages from phones. Shop lives the same.
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| Shows joins | ✅ line at the bottom | ✅ in comments | ❌ | ✅ (app decides the look) |
| Big rooms | flies past; big entrance for top fans | lost in comments | — | 10 most important per 2 s + "+N joined" |
| Hide my join | ✅ | — | — | ✅ switch, on by default |
8.4 Who's watching, and how people get on screen
✅ Agreed 2026-11-23.
What the backend delivers
- Everyone: the viewer count (exists) and the top 3 fans (gift givers).
- Host and co-hosts: the full list, page by page: name, photo, watching for, follows you, top fan, 🛍 bought in this live (§7.3 link). Order: top fans → people the host follows → newest. From the existing heartbeats in Redis; nothing new stored.
- Staff hosting a shop live: the list with names; never money ("bought" is only a mark).
- Someone who turned off "Show when I join" still appears in the host's list (only the joined line is hidden).
- Host actions from the list: invite to join · mute · remove from live (can't come back to this live).
Example. Mama Yoyo, 300 watching.
- Juma (viewer) taps 👀 → "300 watching · Top fans: Neema, Ali, Rose"; no full list.
- Mama Yoyo taps 👀 → the full list with [Invite to join] [Mute] [Remove from live]; "🛍 bought" next to Zawadi.
Three ways onto the screen (viewers only ever ask; only the host invites)
| Tab | Who's in it | For |
|---|---|---|
| Requests | viewers who tapped Ask to join | guests |
| Watching | the viewer list above | guests or co-hosts already watching |
| Invite | search with suggestions: people she follows, friends, past co-hosts | mostly co-hosts who aren't watching |
- Neema (not watching) gets a notification "Mama Yoyo invites you to co-host her live" [Join] → opens the live → on screen (seat checked then, §8.1); the invite expires in 5 minutes.
- Invites from search only to people whose "Who can invite me to a live" allows the host (§8A.9, default Contacts only); blocks apply.
Switch "Allow live invites"→ replaced by "Who can invite me to a live" (2026-11-24).
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| Viewer count | everyone | everyone | everyone | everyone |
| Viewer list | top viewers to everyone, host more | host | nobody | top 3 fans to everyone, full list to host / co-hosts |
| Invite from | requests, viewers, search | requests, search | invite link | requests, watching, search (allowed by the setting), the form, speaker link |
| Turn off invites | ✅ | ✅ | — | ✅ "Who can invite me to a live": everyone / contacts only / nobody |
8.5 Polls
✅ Agreed 2026-11-23. Separate from post polls: short, in Redis like comments; the final result kept in the live summary.
Example. Mama Yoyo is live.
- Poll: "Which colour next week?" Red · Blue · Gold, 2 minutes.
- Everyone sees the card; Juma taps Blue ✅ (one vote, no changing).
- Live results for everyone: Red 30% · Blue 55% · Gold 15%.
- Timer ends → "Blue wins! 💙" (or she ends it early).
- Product options: "Which kanga do you want?" with three pinned kangas → Buy on the winner ✅.
- Summary: "Poll: 180 votes, Blue 55%".
Rules
- Made by the host and co-hosts; staff hosting a shop live too (no money involved).
- 2–4 options; timer 1 · 2 · 5 min or until ended.
- One vote each, no changing; voter names hidden from everyone, host included.
- One poll at a time.
- Anyone watching can vote (no 3-day rule; that is for money tools).
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| Who makes it | host, moderators | host, moderators | no live polls | host, co-hosts, staff host |
| Options | 2–4 | 2–4 | — | 2–4, can be pinned products |
| Results | live % | live % | — | live % for everyone |
| Voter names | hidden | hidden | — | hidden, host included |
8.6 Questions
✅ Agreed 2026-11-23.
Example. Mama Yoyo, a dress pinned.
- Juma taps Ask: "Does this come in XL?" → the questions list, linked to the pinned dress ✅.
- Neema taps 🙋 Me too → 12 🙋, it moves up ✅.
- She opens Questions (most 🙋 first) → Answer now.
- Everyone sees a big card: "Juma: Does this come in XL?" with Buy for the dress ✅.
- Done → marked answered, card gone.
- After the live: "6 questions not answered" → she can reply to each person in chat.
Rules
- A separate Ask button and list, not mixed into comments.
- 🙋 Me too pushes popular questions up.
- On-screen card, with Buy when it is about a product.
- One question every 30 s per person, at most 150 characters, the comment word filter (§10).
- Kept 6 hours (as comments) so unanswered ones can be answered in chat.
- Host, co-hosts and a staff host can answer.
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| Ask | Ask button | Q&A button | host starts Q&A | Ask button, linked to the pinned product |
| Support a question | ❌ | ✅ like | ❌ | ✅ 🙋 Me too |
| On screen | big card | on screen | highlighted | big card + Buy |
| After the live | — | unanswered kept | — | unanswered kept 6 h, reply in chat |
8.7 Comments from the host, co-hosts and helpers
✅ Agreed 2026-11-24. Yes, host and co-hosts comment; their comments are marked so viewers know who's talking.
How others mark them (from what we know): YouTube highlights the channel owner's name, 🔧 for moderators; TikTok shows a "Host" label and "Moderator" badge; Twitch has a broadcaster badge and ⚔️ for moderators.
| Who | Their comment | Speaks as |
|---|---|---|
| Host | highlighted row + "Host" | personal live: herself; shop live: the shop (logo + "Duka la Mama") |
| Staff hosting (terminal) | highlighted + "Host" | "Duka la Mama · Neema" |
| Co-host | lighter highlight + "Co-host" | their own shop if they joined as a shop ("Neema Fashions") |
| Moderator (§10 S3) | 🛡 | themselves |
| Guest / speaker on stage | "On stage" | themselves |
| Viewer | normal | themselves |
Rules
- No slow mode for them: host, co-hosts and moderators skip slow mode and the 1-per-2-s limit.
- Reply with a quote: Reply on Juma's comment → the answer shows Juma's line above it; Juma gets a personal ding (audio too) "Mama Yoyo replied to you".
- Pin their own comment (X8).
- The word filter still applies to them. Phone numbers and outside links are allowed for the shop host and co-host shops (their own business); viewers' numbers and links stay held (§10).
- They can be reported like anyone.
- Audio: host comments make no sound, except a reply to you (§8A.10).
- External camera: they comment from the phone control panel (§8B.5).
Juma: how much is the red one?
┌──────────────────────────────────────┐
│ ↩ Juma: how much is the red one? │
│ 🛍 Duka la Mama [Host] 15,000 only! │ ← highlighted
└──────────────────────────────────────┘
👟 Neema Fashions [Co-host] shoes to match 👆
Rose 🛡: please no spam
Asha [On stage]: I have the blue one, love it
Example: Juma gets a ding "Duka la Mama replied to you" ✅; Mama Yoyo pins "Free delivery tonight 🚚" ✅.
8A. Audio live (radio + Spaces merged)
✅ Agreed 2026-11-24 (owner: "we need all those, amazing").
8A.1 Two kinds of live, Spaces removed
- Live has two kinds: 🎥 Video live and 🎙 Audio live. Chosen at the start, never changed during the live.
- Spaces is removed. Spaces (
chat_system/space_mng,/api/v1/live/spaces) was a public audio room (no chat group, followers told, host / co-host / speakers / listeners, raise hand, SRS for listeners): almost the same job as audio radio. Its stage features move into Audio live; then the Spaces code and endpoints go. It was never on real phones, so nobody loses anything. - Private talk = group calls (up to 8), not live.
What we had before the merge (checked in code 2026-11-24):
| 🎙 Audio radio (live) | 🗣 Spaces (chat code) | |
|---|---|---|
| Public, followers told | ✅ | ✅ (not tied to a chat group; anyone with the link joins) |
| Roles | host only | host · co-host · speaker · listener |
| Guests talking | ❌ | ✅ raise hand, stage, promote / demote |
| Listeners hear it through | SRS | SRS (LiveKit → SRS) |
| Selling tools, pins, coupons | ✅ (planned) | ❌ |
| Feeds, swipe, posts, booking, reminders | ✅ (planned) | ❌ |
| Endpoints | /live/streams… |
/api/v1/live/spaces… |
Two public audio things doing almost the same job → one Audio live: Spaces' stage + radio's place in live.
| Want to… | Use |
|---|---|
| Talk to the public, sell, be found in feeds | 🎙 Audio live or 🎥 Video live |
| Talk privately with a few people | Group call (up to 8) |
- Audio live has every tool video has: booking switch, posts, feeds, selling (pins, coupon drop, group buy, flash price, bargain, auction, instalments, free delivery), gifts, reactions, comments, polls, questions, safety, sales numbers, after-live summary, ticket live (a talk, a sermon, a class). Guests follow §8.1 with sound only.
- Lesson from Spotify Live (an audio-only app, closed 2023): audio must live inside an app people use for other things. NexGate has shopping, chat and feed.
8A.2 Where audio is different from video
| # | Topic | Audio live |
|---|---|---|
| A1 | Screen off | Keeps playing when the phone is locked or another app is open; a media control shows title + host + ⏸ |
| A2 | Speakers | No video boxes to fit: 8 seats allowed, 5 now, from the backend (host included) |
| A3 | Who's talking | Speakers' photos in a circle; the one talking glows (LiveKit reports who speaks) |
| A4 | Selling when nobody looks | Same cards + a short sound when a coupon, flash price or auction drops; locked phone: the media control shows "🎟 Coupon dropped" |
| A5 | The screen | Banner big, speakers' circle, comments and product cards below |
| A6 | Report | No picture: the last 30 s of sound (already in the stream's buffer) + the last 5 min of comments + who was talking |
| A7 | Data | Sound only; the 32 kbps copy stays for slow networks |
| A8 | Card in feeds | Banner + moving sound wave + speaker photos + "🎙 Audio" |
How each tool works in Audio live next to Video live: §8A.10.
Example: Juma listens to Mama Yoyo's Audio live riding his boda, phone in his pocket 🎧 → she drops a coupon → ding → lock screen "🎟 Coupon dropped · 20% off kangas" → taps → grabs it. Neema raises her hand → Mama Yoyo brings her on → Neema's photo glows while she talks.
8A.3 The voices are mixed on the server
- Video (§8.1): the host's phone mixes the guests. Audio: the server mixes the voices (LiveKit → SRS, as Spaces does today). Mixing sound is much lighter than mixing video.
- So when the host's network drops, the speakers keep talking and listeners keep hearing (§9.3).
8A.4 Handling people (learned from X Spaces, Discord, Telegram, Clubhouse, Twitch)
| # | Rule | From |
|---|---|---|
| X1 | Roles: host · co-hosts (up to 2) · speakers · listeners (no limit). Co-hosts accept requests, mute, remove; they can't end the live or use the shop's money tools (only the shop sells, §6) | X Spaces |
| X2 | Who can ask to speak: everyone (default) · people I follow · only people I invite. Set when going live, changeable during | X Spaces |
| X3 | Requests list in order; host or co-host taps to accept (§8.1) | X Spaces |
| X4 | Host can mute a speaker but never unmute them. Only the speaker turns their own mic on | X Spaces |
| X5 | ✋ for speakers already on stage: "I want to talk next", shown in order | X Spaces |
| X6 | Back to listener · remove from this live · block (§10) | X Spaces |
| X7 | A short sound when someone comes on or leaves the stage | X Spaces |
| X8 | Pin a comment at the top (e.g. "Today: kangas from Kariakoo"), next to pinned products | X Spaces |
| X9 | "Your friends are listening" on the card (§3.2a) | X Spaces |
| X10 | Captions (speech → text) | ⏳ later, costs per minute |
| X11 | Recording and clips | ❌ no recording (§2) |
| X12 | Host drops: not the end straight away (§9.3) | changed from X |
| Y1 | Invite to speak is an invitation: the listener taps Accept or No thanks, never pulled on stage | Discord Stage |
| Y2 | Two links: listener link and speaker link (open it → on stage at once). For planned panels | Telegram |
| Y3 | New speakers start muted (default on) | Telegram |
| Y4 | Volume per speaker on your own phone (app only, no backend) | Telegram |
| Y5 | Tap a speaker's photo → small profile + Follow (shop speaker: Visit shop), without leaving | Clubhouse |
| Y6 | 🎉 badge on new users for their first week | Clubhouse |
| Y7 | Leave quietly (follows the "Show when I join a live" setting, §8.3) | Clubhouse |
| Y8 | Send listeners to another live when ending: "Mama Yoyo sent you to Duka la Asha's live" | Twitch raid |
| Y9 | Speakers "join as" themselves or their shop | Telegram |
| Y10 | Noise cleaning from the phone, on by default (free) | phone / WebRTC |
| — | No empty rooms in the Live feed: an audio live shows there only with listeners or a known host; empty new rooms only to followers | Clubhouse's lesson |
Compared with others (from what we know of these apps, 2026-11-24; check again before copying an exact rule)
| X Spaces | Clubhouse | Discord Stage | Telegram voice chat | NexGate Audio live | |
|---|---|---|---|---|---|
| Roles | host, 2 co-hosts, ~10 speakers | moderators, speakers | moderators, speakers | admins, speakers | host, 2 co-hosts, speakers (8 allowed, 5 now) |
| Who can ask to speak | everyone / people you follow / invited only | raise hand | request to speak | raise hand | everyone / people I follow / invited only |
| Pulled on stage | invite | invite | invite must be accepted | speaker link = straight on | invite must be accepted; speaker link = straight on |
| Mute others | mute, never unmute | mute | mute | mute | mute, never unmute |
| New speakers muted | — | — | — | ✅ | ✅ default |
| Volume per speaker | — | — | ✅ | ✅ | ✅ on your own phone |
| Tap speaker → profile | ✅ | ✅ + follow | ✅ | ✅ | ✅ + Follow / Visit shop |
| New user badge | — | 🎉 | — | — | 🎉 first week |
| Speak as a channel / shop | — | — | — | ✅ "join as" | ✅ me or my shop |
| Send listeners on at the end | — | — | — | — | ✅ (Twitch raid) |
| Pay a speaker | — | ✅ payments | — | — | ✅ gifts to any speaker |
| Captions | ✅ | ✅ | — | — | ⏳ later |
| Recording / clips | ✅ | ✅ replays | — | ✅ | ❌ (§2) |
| Host drops | Space ends | — | — | — | co-host carries on (§9.3) |
| Selling | — | — | — | — | ✅ every money tool |
Lessons: Clubhouse filled with empty rooms and people stopped coming (→ the no-empty-rooms rule above). Spotify Live (audio only, its own app) closed in 2023 (→ audio inside an app people already use).
Example (handling people): Mama Yoyo goes Audio live, "Who can ask to speak: people I follow", Neema co-host. 40 requests come in, Neema accepts Juma. Juma talks too long → Neema mutes him; she can't turn his mic back on, only Juma can. Juma insults someone → Neema moves him back to listener, then removes him. Mama Yoyo's network drops → listeners hear "host reconnecting…" → back in 40 s.
8A.5 Gifts to speakers
✅ The gift picker has "Send to" [ host ✓ ] [ Neema ] [ Juma ]: default the host, any speaker on stage can be picked (Clubhouse let listeners pay a speaker). A shop speaker → the shop's gift balance. Same for co-hosts and guests in video. Changes §7.9 "100% to the host" to "100% to the person picked".
Example
- Tuesday: Mama Yoyo books "Friday Kanga Talk" (Audio), sends Neema and Asha the speaker link in chat.
- Friday 8 pm: they open it → on stage, muted (Y3); they unmute when ready.
- Juma raises his hand (X2 everyone) → Neema (co-host) accepts → Juma talks too long → Neema mutes him; only Juma can turn his mic back on (X4).
- Juma answers a question well → Asha taps his photo → 🎁 Lion → it lands in Juma's gift balance.
- Juma rides his boda, phone in the pocket → ding → lock screen "🎟 Coupon dropped" → grabs it.
- 9 pm: she ends → "Send listeners to Duka la Asha's live" → 280 people move there.
8A.6 The create form (video and audio)
✅ Agreed 2026-11-24. One form for both kinds. Picking 🎙 Audio shows the full Stage part; video shows a smaller one (guests by request / invite, §8.1). Builds on §4.2.
┌─────────────────────────────────────────┐
│ [ 👤 Mama Yoyo ▾ ] ← Me / 🛍 Duka la Mama
│ │
│ [ 🔴 Now ] [ 📅 Later ] │
│ │
│ [ 🎥 Video ] [ 🎙 Audio ✓ ] │
│ │
│ ┌───────────────────────────────┐ │
│ │ 🖼 Add banner image │ │
│ └───────────────────────────────┘ │
│ Title: Friday Kanga Talk │
│ Description: New kangas from Kariakoo… │
│ │
│ ── Stage ───────────────────────── │
│ Co-hosts [ Neema ✕ ] [ + Add ] │ ← up to 2
│ Speakers [ Asha ✕ ] [ Juma ✕ ] [ + Add ]
│ Who can ask to speak │
│ [ Everyone ✓ ] [ People I follow ] │
│ [ Only people I invite ] │
│ New speakers start muted [ ON ] │
│ │
│ ── Only with Later ─────────────── │
│ When [ Today 8 pm ] [ Tomorrow 8 pm ] │
│ [ 🗓 Custom ] │
│ Let people get reminded [ ON ] │
│ ✏️ Say something about your live… │ ← post caption
│ A post goes to the feed. People can │
│ tap Remind me before you start. │
│ │
│ [ 🎙 Go live ] / [ 📅 Book ] │
└─────────────────────────────────────────┘
- Now: When, the reminder switch and the caption are hidden; the button says Go live.
- Later: they show; the button says Book.
- Banner, title, description belong to the live and show in its card (§3.2); the caption is the post text.
- Everything on the Stage part can be changed during the live too.
- The backend decides which parts and pills show: the shop dropdown only for a shop owner, the Custom date limit (30 days), co-hosts (2), speaker seats (8 allowed, 5 now).
- Example: Mama Yoyo → Audio → banner + title → Neema as co-host, Asha as speaker → Later → Friday 8 pm → caption "Come talk kangas!" → Book ✅. Josh → Audio → Now → title "Morning chat" → Go live; everyone can ask to speak, new speakers start muted ✅.
8A.6a The other screens (drawings)
Booked screen (after Book; the links exist only now, §8A.7)
┌─────────────────────────────────────────┐
│ ✅ Booked · Friday 8 pm │
│ 🎙 Friday Kanga Talk · 🛍 Duka la Mama │
│ Post: "Come talk kangas!" · in the feed │
│ │
│ Invited │
│ Neema · co-host ⏳ waiting │
│ Asha · speaker ⏳ waiting │
│ │
│ [ 🔗 Share link ] [ 🎙 Speaker link ] │
│ [ ✏️ Edit ] │
└─────────────────────────────────────────┘
A private booking (switch off) shows no post line and has [ 📝 Post it ] instead.
My lives (profile → Lives)
┌─────────────────────────────────────────┐
│ My lives [ Upcoming ] [ Ended ]│
│ ───────────────────────────────────── │
│ 🎙 Friday Kanga Talk · Fri 8 pm │
│ 👥 120 waiting · Neema ✅ · Asha ⏳ │
│ [ ✏️ Edit ] [ 🎙 Speaker link ] │
│ [ 📝 Post it ] [ ✖ Cancel ] │
│ ───────────────────────────────────── │
│ 🎥 Saturday sale · Sat 6 pm · 🔒 private│
│ [ ✏️ Edit ] [ 📝 Post it ] [ ✖ Cancel ]│
└─────────────────────────────────────────┘
The backend decides which buttons each row gets.
The invite (push → opens the invites list, §8A.8)
┌─────────────────────────────────────────┐
│ 🎙 Mama Yoyo invites you to speak │
│ Friday Kanga Talk · Fri 8 pm │
│ [ banner ] │
│ [ Accept ] [ No thanks ] │
└─────────────────────────────────────────┘
After Accept the row says "✅ You're a speaker · Fri 8 pm"; at the start "🔴 Live now · [ Join the stage ]".
Inside an Audio live (listener, screen open)
┌─────────────────────────────────────────┐
│ 🔴 LIVE · 🎙 Friday Kanga Talk 300 🎧 │
│ [ banner ] │
│ (Mama) (Neema) (Juma✋) │ ← the one talking glows
│ (Asha) │
│ 📌 Today: kangas from Kariakoo │ ← pinned comment
│ ┌───────────────────────────────┐ │
│ │ 🎟 20% off kangas · 9:41 [Grab]│ │ ← card + ding
│ └───────────────────────────────┘ │
│ Juma: nice colours! │
│ Rose joined │
│ [ 💬 Comment ] [ ✋ Ask to speak ] [ ❤️ ] [ 🎁 ]
└─────────────────────────────────────────┘
Host's Stage panel (during the live)
┌─────────────────────────────────────────┐
│ Stage 4 / 5 seats │
│ Neema co-host [ 🔇 ] [ ⋯ ] │
│ Juma speaker ✋ next [ 🔇 ] [ ⋯ ] │ ⋯ = back to listener · remove · block
│ Asha speaker ⚠️ weak network │
│ Requests (12) [ Juma ✓ ] [ Rose ✓ ] … │
│ Invited: Baraka ⏳ │
│ Who can ask: [ Everyone ▾ ] │
│ [ + Invite ] [ 🎙 Speaker link ] │
└─────────────────────────────────────────┘
Lock screen (audio, phone locked, A1 + §8A.10)
┌─────────────────────────────────────────┐
│ 🎙 Friday Kanga Talk · Mama Yoyo │
│ 🎟 Coupon dropped · 20% off · 10 min │ ← changes with each event
│ ⏮ ⏸ ✖ │
└─────────────────────────────────────────┘
Weak network bar (host, viewer and listener, §9.3)
┌─────────────────────────────────────────┐
│ ⚠️ Weak network, try a new location ✕ │
└─────────────────────────────────────────┘
8A.7 Picking speakers and co-hosts, and the speaker link
- There is no link in the form: the link exists only after the live is created (owner's catch, 2026-11-24).
- In the form the host picks people (co-hosts and speakers), the same way for both. When she taps Book or Go live, the backend creates the live and sends each one an invite (§8A.8).
- The picker shows only people whose setting allows her (§8A.9). Someone who set "Nobody" or blocked her is simply not there, so nobody gets refused.
- The speaker link comes after the live is created:
- Later: on the "✅ Booked · Friday 8 pm" screen and in My lives: [ 🔗 Share link ] [ 🎙 Speaker link ] [ ✏️ Edit ].
- Now: inside the live, from the Stage menu: [ 🎙 Speaker link ].
- For people not in the picker (not connected), or to paste in a WhatsApp group.
- Opening it = accepting (like a group invite link): on stage at once, muted (Y3). No accept step.
- It pushes nothing to anyone, so it doesn't break anyone's setting: the person chooses to open it. Blocked people can't use it. It ends when the live ends. Seats are checked when they open it (§8.1).
- Example: Mama Yoyo books Friday, picks Neema (co-host) + Asha (speaker) → both get the invite at once. Wednesday she remembers Baraka, not in her contacts → My lives → Speaker link → WhatsApp → Friday he opens it → on stage ✅.
8A.8 Live invites (video and audio): copied from group invites
✅ Agreed 2026-11-24: copy the chat group invite system, which already works.
How group invites work today (checked in chat_system/group_mng, 2026-11-24)
- Nobody is put in a group without saying yes. Two doors: an invitation (accept / decline) or an invite link (opening it is the yes; optional "join approval" by an admin).
- Creating a group has no member list: the owner creates it alone, then invites one by one. Only owner or admin can invite.
- Checks, in order: not already a member → group not full (50, pending invites counted) → invitee hasn't blocked the inviter → invitee's "Who can add me to groups" allows it → inviter hasn't sent 20 invites today.
- Refused for a block or the setting → always the same message "This user cannot be invited", never which one (privacy doesn't leak).
- Inviting again while one is open returns the same invite (no pile-up).
- Delivery: push (
CHAT_GROUP_INVITE) + the invites list (GET /chat/groups/invites). - While PENDING the person is not in the group at all (no messages, no history).
- States: PENDING → ACCEPTED / DECLINED / EXPIRED (7 days) / REVOKED (withdrawn). Accept → joins as member, "Asha joined", inviter told "Asha accepted". Can be invited again later.
- Example: Mama Yoyo creates "Kanga Sellers" → invites Asha, Neema, Juma → Asha accepts ✅, Neema declines ✅, Juma ("Nobody") → "This user cannot be invited" ✅; Baraka gets the link on WhatsApp → joined ✅.
Live invites, the same way (for video guests and co-hosts, and audio speakers and co-hosts)
| Group invites (today) | Live invites | |
|---|---|---|
| Who invites | owner, admin | host (form, My lives, in the live); co-hosts only people already in the live (Y1) |
| Pick many at once | ❌ one by one after creating | ✅ in the form; all sent on Book / Go live |
| Privacy setting | "Who can add me to groups" | "Who can invite me to a live" (§8A.9) |
| Block | stops invites | stops invites and the speaker link |
| Refused message | "This user cannot be invited" | the same, and the picker hides them anyway |
| Daily limit | 20 | 20 |
| Same person twice | same invite returned | same |
| Delivery | push + invites list | push + invites list (A, agreed) |
| While pending | not in the group | not on stage, no special rights |
| States | pending · accepted · declined · expired · withdrawn | the same |
| Expires | 7 days | when the live ends; an invite sent during the live: 5 min (§8.1) |
| Link | group invite link (+ optional approval) | speaker link: opening it is the yes, no approval |
| Full | group 50 | seats checked when they go on stage; the invite stays open (§8.1) |
What happens after the invite
- Accept before the live: they're on the list; 15 min before they get "starts in 15 min · get ready" (like the host); at the start "🔴 Live now · join the stage" → tap → on stage, muted (Y3) ✅.
- Accept during the live: straight on stage (seat checked) ✅.
- No thanks: nothing more is sent; the host sees "Asha: no thanks" ✅.
- The host sees each person's state on the Stage part and in My lives: ⏳ waiting · ✅ accepted · ❌ declined; she can withdraw an invite or add more until the live ends.
- Live moved or cancelled: invited people are told, like remind-me people.
- In their own live at the time ❌ "End your live to join Mama Yoyo's" (one live per person, §8.1).
- Example: Monday Mama Yoyo books Friday, picks Asha → Asha gets a push + it's in her invites list → Accept ✅. Friday 7:45 "get ready" → 8:00 "🔴 Live now · join the stage" → on stage, muted ✅. Juma got invited too, taps No thanks → Mama Yoyo sees ❌ next to Juma ✅.
8A.9 Privacy: "Who can invite me to a live"
✅ Agreed 2026-11-24. One setting for all live invites (video guests, co-hosts, audio speakers). It replaces the on / off switch "Allow live invites" (§8.4). A separate row from "Who can add me to groups", in the same privacy screen: someone may want groups open but lives closed.
| Choice | Means |
|---|---|
| Everyone | anyone can invite you |
| Contacts only ✓ default | only people you both follow (the same "contacts" as chat) |
| Nobody | no invites; you can still open a speaker link yourself |
- Default Contacts only, stricter than groups (Everyone), because being put on stage in front of 300 people is bigger than joining a group.
- Blocks always win.
- Examples:
- Asha (Contacts only) and Mama Yoyo follow each other → in the picker → invite → Accept ✅
- Juma (Contacts only) doesn't follow Mama Yoyo → not in her picker ✅
- Neema (Nobody) → never in anyone's picker ✅; she opens a speaker link a friend sent on WhatsApp → on stage, her own choice ✅
- Baraka blocked Mama Yoyo → not in the picker, and her speaker link doesn't work for him ✅
8A.10 Every tool on both kinds: how it works in video and in audio
✅ Owner 2026-11-24: every tool is on both kinds, but it must feel different, because in video people look at the screen, and in audio they often don't (phone locked, in a pocket, another app open).
Rules for all tools
- The backend is the same for both kinds: same endpoints, same rules, same money. Only how the app shows and sounds changes. Every event carries the stream's kind so the app knows how to present it.
- Video = see it. Cards, banners, animations on top of the video.
- Audio = hear it, then see it. Each important event has (1) a short sound, (2) a lock-screen line in the media control (A1), (3) the same card when the screen is open. Tapping the lock-screen line opens the live straight on that card.
- The host is the voice in audio: when the host starts a drop in an audio live, the host's screen shows a small hint "Say it out loud: 20% off kangas, 10 minutes" (listeners with the phone in the pocket only hear the host).
- Sounds are short and few: one sound per kind of event, never more than one every 3 s; the listener can turn live sounds off in the player (default on for audio, off for video).
Showing and selling
| Tool | 🎥 Video live (people look) | 🎙 Audio live (people listen) |
|---|---|---|
| Pin / show a product (§6) | Product card over the video, Buy button; anyone shows, only the shop sells | Same card under the speakers' circle + soft sound; lock screen "🛍 Now showing: Red kanga · 15,000" |
| Coupon drop (§7.1) | Card pops up with the countdown, Grab | Card + ding; lock screen "🎟 Coupon dropped · 20% off kangas · 10 min" → tap → Grab; host hint "say it out loud" |
| Group buy (§7.2) | Bar on the video "6 of 10 · 4:30 left" | Same bar; ding at start and when it's nearly full ("2 more needed"); lock screen line |
| Sales numbers (§7.3) | Counts for the host during the live | Same; host hears nothing, sees counts on her screen |
| Free delivery (§7.4) | Badge on pinned products | Same badge; told once on the lock screen "🚚 Free delivery from this live" |
| Flash price (§7.5) | Card with countdown, price crossed out | Card + ding; lock screen "⚡ 9,000 instead of 15,000 · 3 min left" |
| Bargain (§7.6) | Offer box on the card; the host's answer pops up | Same; the host's answer comes as a personal ding + lock screen "Mama Yoyo accepted 12,000 · 15 min to pay" |
| Instalments (§7.7) | Plans on the pinned card | Same; nothing extra (no sound, it's information) |
| Auction (§7.8) | Card with top bid, Bid button, +10 s anti-snipe | Card + soft tick per bid; lock screen "🔨 Top bid 40,000 · 0:20"; "You were outbid" as a personal ding; host hint to call out bids |
| Gifts (§7.9, §8A.5) | Full-screen animation over the video | Animation over the speakers' circle + gift sound; lock screen "🎁 Juma sent Neema a Lion" |
| Ticket live (§7.10) | Ticket holders watch | Ticket holders listen (a talk, a sermon, a class); same check-in rule |
Taking part
| Tool | 🎥 Video live | 🎙 Audio live |
|---|---|---|
| Comments | Over the bottom of the video | Below the speakers; no sound for comments (too many); a comment that mentions you → personal ding |
| Reactions (§8.2) | Float up over the video | Float over the banner and speakers' circle; no sound |
| Joins "Juma joined" (§8.3) | Line over the video | Same line; no sound |
| Who's watching / listening (§8.4) | "300 watching" | "300 listening"; same lists |
| Getting on (§8.1, §8A.4) | Guests on screen (video or voice), 5 allowed / 3 now, mixed on the host's phone | Speakers in the circle, 8 allowed / 5 now, mixed on the server; raise hand, ✋ next, never unmute others |
| Someone comes on / leaves | Their picture appears / goes | Short stage sound (X7) + their photo appears / goes; the one talking glows (A3) |
| Invites (§8A.8) | Guests and co-hosts | Speakers and co-hosts; same invites and setting |
| Polls (§8.5) | Poll card over the video, tap to vote | Card + ding; lock screen "📊 Poll: red or blue?" → tap → vote; host hint to read the options out loud; result read out by the host |
| Questions (§8.6) | Question card, Me too | Same; when the host picks a question, it shows big and the host reads it out |
| Pinned comment (X8) | Top of the comments | Top, under the banner |
Safety, network, after
| Tool | 🎥 Video live | 🎙 Audio live |
|---|---|---|
| Report (§10) | Picture of the screen + last 5 min of comments | Last 30 s of sound + last 5 min of comments + who was talking (A6) |
| Moderators, word filter, mute, remove, block (§10) | Same | Same; plus mute / back to listener for speakers (X4, X6) |
| Auto-pause by NexGate (§10) | Video replaced by "Paused" | Sound stops + lock screen "Live paused by NexGate" |
| Weak network (§9.3) | Yellow bar; quality drops; Listen only 🎧 | Yellow bar; 32 kbps copy |
| Host drops (§9.3) | 2 min frozen picture, then ends | Co-host and speakers carry on |
| Send listeners on (Y8) | "Sent you to Duka la Asha's live" | Same |
| After-live summary (§11) | "watched" | "listened"; same numbers |
| Cards in feeds (§3) | Moving video | Banner + sound wave + speaker photos + "🎙 Audio" (A8) |
Example: the same coupon drop, two kinds
- Video: Mama Yoyo taps Drop → 300 watchers see the card pop up over her face → 40 grab it.
- Audio: Mama Yoyo taps Drop → her screen: "Say it out loud" → she says "20% off kangas for 10 minutes!" → Juma (phone in pocket) hears it and the ding → lock screen "🎟 Coupon dropped · 20% off kangas · 10 min" → taps → the live opens on the coupon → Grab ✅.
8B. Going live with an external camera
✅ Agreed 2026-11-24. Owner: "most platforms do that, and most lives from a store do this: they don't hold the camera, someone has to."
8B.1 How others set it up (researched 2026-11-24)
| Where the key comes from | Same key every time? | Starting | Who can use it | Notes | |
|---|---|---|---|---|---|
| YouTube | Studio → Live Control Room → "Streaming software" | ✅ reusable, Reset if leaked | Preview → Go live, or auto-start when the camera connects + auto-stop | everyone (after phone verification) | latency choice (normal / low / ultra-low); DVR rewind; keyframe every 2 s, never over 4 |
| TikTok | LIVE Producer on a computer: title + category → Save → Server URL + key | ❌ per live | starting OBS starts it | only accounts with streaming access (commonly ~1,000 followers, 18+); many must use TikTok LIVE Studio | vertical 1080×1920 |
| instagram.com → Create → Live video → title + audience → Live Producer | ❌ new key every live | from Live Producer | everyone with Live | no guests, shopping, pinning or Q&A with Live Producer | |
| Twitch | Creator Dashboard → Settings → Stream → primary key | ✅ reusable, Reset (also on password change) | starting OBS starts it | everyone | server "Auto" picks the nearest; OBS "Connect account" (no key copying) |
| Whatnot (live selling) | in the seller app, per scheduled show | ❌ a token per show | starting OBS starts the show | sellers | cameras + sound from a computer, often vertical |
The ways a camera reaches a live
| # | Way | Example gear | NexGate needs |
|---|---|---|---|
| 1 | Camera → computer → OBS | any HDMI camera + a cheap capture card into a laptop | Server URL + key |
| 2 | Camera that streams by itself | GoPro, DJI Osmo / Pocket, Insta360 (URL + key pasted in their app) | Server URL + key |
| 3 | Streaming box | YoloBox, ATEM Mini (churches, events) | Server URL + key |
| 4 | USB camera into the phone | newer Android phones | app only ("USB camera"), later |
One feature, External camera, opens ways 1–3.
Today (checked in code 2026-11-24): each live already has its own ingest key (ingestKey + ingestKeyExpiresAt on
the stream, never in normal responses); the phone sends RTMP to SRS with it; port 1935 is open. OBS technically
works now; there is no screen for it.
8B.2 Rules
| # | Rule |
|---|---|
| E1 | Name: 📹 External camera ("Kamera ya nje"), with a small line "OBS, YoloBox, GoPro, DJI, a computer…". "OBS" alone means nothing to most sellers |
| E2 | 📱 This phone is the default. External camera is picked only when needed |
| E3 | A new key for every live (owner: not reusable), like Instagram and Whatnot. It works only for that live, from booking until the live ends, then it's dead. Reset per live if it leaks. No "my key" page in settings, only a help page (guides + recommended settings) |
| E4 | Preview first, then Go live (YouTube). A switch "Start when my camera connects" for fixed setups; safe because the key starts only that one live, and never before the booked time |
| E5 | Who: accounts at least 30 days old with a verified phone, and any verified shop. Staff from a shop computer wait for the desktop terminal (§5.1). The backend decides whether "Stream from" shows |
| E6 | Shape: vertical and landscape accepted; the setup screen recommends vertical 720×1280 · 30 fps · keyframe 2 s |
| E7 | Quality: one quality (720p) for now + Listen only for weak networks; smaller copies made by the server come later (1–2 CPU cores per live, the box has ~4) |
| E8 | One source at a time: the phone or the camera, never both; the backend decides which is live and refuses the other |
| E9 | The phone is the control panel (§8B.5); its camera and mic are off while the external camera sends |
| E10 | Audio from a sound mixer (churches, radio): Audio live + External camera; LiveKit Ingress brings the feed into the room so speakers can still join (server mix, §8A.3) |
8B.3 The create form
The form of §8A.6 gets one line under Video / Audio:
┌─────────────────────────────────────────┐
│ [ 👤 Mama Yoyo ▾ ] │
│ [ 🔴 Now ] [ 📅 Later ] │
│ [ 🎥 Video ✓ ] [ 🎙 Audio ] │
│ │
│ Stream from │
│ [ 📱 This phone ✓ ] [ 📹 External camera ]
│ OBS, YoloBox, GoPro, DJI…
│ │
│ 🖼 Banner · Title · Description │
│ ── Stage ── (as §8A.6) │
│ ── Later only ── When · Remind switch · caption
│ │
│ Now + phone: [ 🔴 Go live ] │
│ Now + camera: [ Next: connect camera → ]
│ Later: [ 📅 Book ] │
└─────────────────────────────────────────┘
8B.4 The flows
Flow A: Now + External camera
Form ──► Connect your camera ──► (camera connects) ──► Preview ──► [Go live] ──► Live (phone = control panel)
⏳ waiting push if app closed 🟢 health
┌─────────────────────────────────────────┐
│ 📹 Connect your camera │
│ Server URL │
│ rtmp://live.nexgate.co/app [ Copy ] │
│ Stream key (this live only) │
│ •••••••••••• [ 👁 ] [ Copy ] [ ↻ Reset ]│
│ Best: 720×1280 · 30 fps · keyframe 2 s │
│ [ ? How to: OBS · YoloBox · GoPro · DJI ]│
│ │
│ ⏳ Waiting for your camera… │
│ [ 📱 Use this phone instead ] │
└─────────────────────────────────────────┘
↓ camera connects
┌─────────────────────────────────────────┐
│ 📷 Connected · only you see this │
│ ┌───────────────────────────────┐ │
│ │ [ camera picture ] │ │
│ └───────────────────────────────┘ │
│ Health 🟢 Excellent │
│ (🟡 Good · 🔴 Poor: "bitrate too low") │
│ [ 📱 Use this phone instead ] │
│ [ 🔴 Go live ] │
└─────────────────────────────────────────┘
Flow B: Later + External camera
Form ──► [Book] ──► Booked screen [📹 Camera setup] ──► (days later) 15-min "get ready" ──► Connect screen
──► camera connects ──► Preview ──► 8:00 [Go live] (or auto-start if the switch is on)
┌─────────────────────────────────────────┐
│ ✅ Booked · Friday 8 pm │
│ 🎥 Friday sale · 📹 External camera │
│ [ 🔗 Share link ] [ 🎙 Speaker link ] │
│ [ 📹 Camera setup ] [ ✏️ Edit ] │
└─────────────────────────────────────────┘
My lives rows show 📹 and [ Camera setup ]; once connected: "📷 Connected · [ Open ]".
How "Connected" happens (behind the screen)
OBS / YoloBox / DJI ──RTMP + key──► SRS ──"someone is sending"──► backend
backend: key valid for this live? ──► live = CAMERA CONNECTED (preview, NOT public: no feeds, no notifications)
backend ──Centrifugo──► host's phone: waiting screen turns into the preview
app closed? ──push──► "📷 Your camera is connected · tap to go live"
only host + co-hosts can play the preview (private play token)
8B.5 The phone as control panel
| The phone does | |
|---|---|
| 📺 Monitor | small picture of what viewers see + health 🟢🟡🔴 + viewer count |
| ▶️ Start / End | Go live, End |
| 💬 Comments | read, reply, pin a comment, mute, remove |
| 🛍 Selling | every tool: pin, coupon drop, flash price, auction, group buy, bargain, polls, questions |
| 👥 Stage | requests, invites, guests, speakers |
| 🔁 Switch | Switch to this phone / Continue on this phone |
| 🔔 Alerts | "🟡 Weak signal from your camera", "📷 Camera lost", "⚠️ Neema is on stage but OBS isn't showing guests" |
┌─────────────────────────────────────────┐
│ 🔴 LIVE · 📹 External camera · 🟢 · 312 👀│
│ ┌──────────────┐ │
│ │ small picture│ ⏱ 24:10 │
│ └──────────────┘ │
│ Juma: how much is the red one? [Reply] │
│ Rose joined │
│ [📌 Pin] [🎟 Drop] [⚡ Flash] [📊 Poll] │
│ [👥 Stage] [🔗 Guests window] [📱 Switch] │
│ [⏹ End] │
└─────────────────────────────────────────┘
8B.6 Switching between camera and phone
| When | She does | What happens |
|---|---|---|
| Before the live (booked) | My lives → Edit → Stream from → 📱 This phone | phone live; the key is killed |
| On the preview | [ 📱 Use this phone instead ] | OBS disconnected, phone camera opens, Go live from the phone |
| During, camera → phone (crash, power cut, walk around) | [ 📱 Switch to this phone ] | the phone takes over, the server drops OBS; viewers see a 2–3 s blip; same live, viewers, comments |
| During, phone → camera | [ 📹 Switch to camera ] → start OBS | when OBS connects it takes over; the phone is the control panel again |
| Forgot OBS running, taps Go live on the phone | — | ❌ "Your camera is already sending to this live" [ Switch to this phone ] [ Keep camera ] |
| Camera lost, she does nothing | — | "reconnecting…" 2 min (§9.3 N4); the panel shows [ 📱 Continue on this phone ] |
- The key stays valid until the live ends (except when switched to the phone before the start).
- On the phone, video guests are mixed by the phone again (§8.1).
- Example (power cut): 8:00 live from OBS → 8:20 power goes off, PC dies → "reconnecting…" → Continue on this phone → live again in seconds, coupons still running → 8:40 power back → Switch to camera ✅
8B.7 Co-hosts
| Co-host is… | Video + external camera | Audio + external mixer |
|---|---|---|
| In the same shop, in front of the camera | ✅ stands in the picture; added as co-host so her tools work | ✅ talks into the same mixer |
| Elsewhere, helping from their phone (off-screen) | ✅ co-host panel: comments, mute, remove, requests, their own shop's products and tools | ✅ same, and can talk (server mix) |
| Elsewhere, wants to be on screen | ✅ with OBS through the Guests window (§8B.8); ❌ without a computer (later) | ✅ |
The co-host's panel = the host's minus Go live / End, the host shop's money tools (only the shop sells) and Switch.
8B.8 Guests: the Guests window (Twitch's way)
How others handle guests with an external camera (researched 2026-11-24)
| Platform | Guests? | How |
|---|---|---|
| ❌ official FAQ: not supported with Live Producer, no plans | — | |
| YouTube | ❌ nothing of its own | outside tools: StreamYard, or VDO.Ninja link added in OBS as a Browser source |
| Twitch | ✅ Guest Star, up to 5 | guests join from the browser or app; Twitch gives a link → OBS Browser source → OBS mixes; users reported crashes and high memory with many guests |
| TikTok | ✅ only inside its own PC program (LIVE Studio), up to 5 | — |
Nobody mixes guests on the server for external cameras. NexGate copies Twitch:
| Setup | Remote guests on screen |
|---|---|
| 📱 Phone live | ✅ host's phone mixes (up to 5, §8.1) |
| 📹 External camera with a computer (OBS, vMix) | ✅ Guests window: the PC mixes |
| 📹 External camera without a computer (YoloBox, GoPro, DJI) | ❌ later (server mixing) |
| 🎙 Audio, any source | ✅ server mixes sound |
| People in the same room | ✅ always |
How it works
- Setting up, once per live: control panel → [ 🔗 Guests window for OBS ] → Copy → OBS + Browser source → paste → place it next to the camera. Empty (invisible) until someone joins.
- Getting guests on is the same as a phone live: requests, invites, speaker links, the privacy setting, 20 a day, seats up to 5 from the backend (§8.1, §8A.8). Accept on the phone → the guest appears in the window → OBS shows them. Remove → gone.
- Talking without delay: the guest must not hear the host 2–3 s late, so the host's phone joins the guests' room with its mic (camera optional). Guests hear her live; she hears them in her phone earphones.
- Earphones are a must (the shop mic would pick up the phone speaker → echo): "🎧 Put in earphones to talk with guests" when the first guest joins.
- The window shows only the guests with their names under each box, never the host's phone (no double).
- The guest's side is unchanged: they join from their NexGate app.
Rules
- Window not open in OBS → "⚠️ Neema is on stage but your OBS isn't showing guests · [ How to add ]" (the backend knows whether the window is connected).
- Camera without a computer → the Stage still has requests and invites, but Accept says "Guests on screen need OBS or your phone · [ Switch to this phone ]".
- Keep the window light (Twitch's lesson): small video per guest, max 5.
Neema taps Ask to join ──► host's phone: [Accept] ──► "🎧 Put in earphones"
──► Neema in the Guests window ──► OBS mixes camera + window ──► viewers see both
host ⇄ Neema talk live through LiveKit (host's phone mic + earphones)
┌──────────────── OBS (shop PC) ────────────────┐
│ ┌───────────────────────────┐ ┌────────────┐ │
│ │ │ │ Guests │ │
│ │ camera: Mama Yoyo │ │ window │ │
│ │ │ │ ┌────────┐ │ │
│ │ │ │ │ Neema │ │ │
│ │ │ │ └────────┘ │ │
│ └───────────────────────────┘ └────────────┘ │
└──────────────────────────────────────────────┘
Example: Mama Yoyo streams from OBS, the Guests window pasted once. 8:15 Neema (Arusha) asks → accepted → earphones in → Neema appears beside the camera picture, they talk with no delay ✅. 8:30 removed → window empty ✅. A church on a YoloBox: someone asks → "Guests on screen need OBS or your phone" ✅.
8B.9 What viewers see
Two layers:
- The video: whatever OBS sends (camera + Guests window + the host's own logo or text). The host decides the picture.
- The NexGate layer on top, drawn by each viewer's app: LIVE badge, name, count, comments, reactions, gifts, product cards, drops, polls, yellow bar. Identical to a phone live; every tool works the same (§8A.10).
Vertical camera (recommended)
┌───────────────────────┐
│ 🔴 LIVE Duka la Mama 312│ ← app layer
│ On screen: Neema › │ ← tap → profile / follow / gift
│ │
│ [ camera picture ] │ ← video from OBS
│ ┌──────┐ │
│ │Neema │ │ ← Guests window, placed by the host
│ └──────┘ │
│ 🎟 20% off · 9:41 [Grab]│ ← app layer
│ Juma: nice! │
│ [💬] [❤️] [🎁] [🛍] │
└───────────────────────┘
Landscape camera
Phone upright: Phone turned sideways:
┌───────────────────────┐ ┌──────────────────────────────────┐
│ 🔴 LIVE Duka la Mama 312│ │ [ full camera picture ]│
│ ░░░ blurred fill ░░░░░ │ │ 🔴 LIVE · 312 🎟 [Grab] │
│ [ camera picture 16:9 ]│ │ comments on the side │
│ ░░░ blurred fill ░░░░░ │ └──────────────────────────────────┘
│ 🎟 coupon · comments │
└───────────────────────┘
Upright: the wide picture in the middle with a blurred copy of itself above and below (no black bars). Sideways: full screen, comments and cards on the side.
| Moment | Viewers see |
|---|---|
| Guests | where the host placed the window, names under each box; "On screen: Neema ›" chip to tap a guest |
| Quality | one quality (720p); weak network → yellow bar + [ 🎧 Listen only ] |
| Delay | the same 2–3 s |
| Camera lost | "Mama Yoyo is reconnecting…" (up to 2 min) |
| Switch to phone | a 2–3 s blip; the shape may change; same live and comments |
| Feeds and cards | the same live card as any live |
Safe area: the app layer covers the top bar and the bottom third. The help page gives a simple OBS template with the safe area, so logos and price text aren't hidden under comments.
Example: Mama Yoyo's shop camera is landscape. Juma (upright) sees it in the middle with blur → turns the phone → full screen ✅. She drops a coupon → Juma's app draws the card → Grab ✅. He taps "On screen: Neema ›" → follows ✅.
8B.10 Later: OBS button and NexGate Studio
"Connect account" in OBS (how Twitch and YouTube do it): pick the service in OBS → Connect account → the service's login page → Allow → OBS gets a permission token (OAuth) and fetches the key and server itself.
| Level 1: "NexGate" in OBS's list | Level 2: full "Connect account" | |
|---|---|---|
| User sees | picks NexGate → server filled in + recommended settings applied → pastes only the key | Connect account → logs in → no key at all |
| How | ask OBS to add us to its public list of services (server + recommended settings); OBS reviews | login code written inside OBS (only big services) or our own OBS plugin |
| Our work | small | big: our own OAuth login for apps + an API |
TikTok LIVE Studio: TikTok's own free Windows program for going live ("OBS made by TikTok, only for TikTok"): log in, no key, cameras / screen / games, comments, gifts and up to 5 guests built in, vertical. A separate program, not on top of OBS, but when it came out (end of 2021) people found OBS's code inside it, and the OBS team said TikTok broke OBS's license (GPL: whatever is built from OBS's code must share its own code). From memory, not re-checked.
A future NexGate Studio could be:
| Way | Meaning | Catch |
|---|---|---|
| A. Built from OBS's code | fast | our Studio's code must be public (GPL) |
| B. A NexGate plugin in normal OBS | login, guests, comments, coupons inside OBS | only the plugin is public (GPL) |
| C. Our own app from scratch | no license issue | most work |
The path
| Step | What | When |
|---|---|---|
| 1 | External camera: per-live key, phone as control panel, Guests window | first version |
| 2 | NexGate in OBS's service list | when camera lives have users |
| 3 | NexGate Studio (probably B; includes the staff shop terminal) | last, after the owner's desktop guide |
8B.11 Examples
- Mama Yoyo buys a DJI Pocket → books Friday with External camera → Booked → Camera setup → pastes this live's key in the DJI app → Friday 7:45 "get ready" → "📷 Connected · 🟢" → 8:00 Go live → her helper films, she drops coupons from her phone ✅
- Duka la Mama: OBS on the shop PC; each Friday the nephew pastes the new key ✅. Someone saw the key Thursday → Reset ✅
- A church: 2 cameras + a YoloBox; every Sunday a new key; no remote guests (no computer) ✅
- Pastor John's mixer → Audio live → 500 listen, a member raises a hand to speak ✅
- Neema (staff) wants to stream the shop from the shop PC ❌ waits for the desktop terminal ✅
9. Speed and data saver
✅ Agreed 2026-11-23. Target: TikTok level. About 2–3 s behind the host, no buffering on weak 3G, listen only on 2G.
Today (checked in srs/srs.conf): viewers get HLS in 4 s pieces → about 6–12 s behind the host; video
has one quality (whatever the host's phone sends), so weak 3G buffers; radio has a 32 kbps version; the server
makes no extra video qualities (no CPU for it); SRS already makes HTTP-FLV, not used for viewers.
9.1 Delay
| Step | What | Delay | Notes |
|---|---|---|---|
| 1 (quick) | HLS pieces 1 s, host phone sends a keyframe every 1 s | 3–5 s | still through the CDN, same cost per viewer |
| 2 (TikTok way) | HTTP-FLV to viewers, one continuous stream | 2–3 s | delivered by SRS edge servers (ours, small, near users, e.g. Nairobi / Johannesburg; SRS's own design for scale), cost check first; HLS stays as the backup |
| 3 (agreed in §8.1) | people on screen talk through LiveKit | < 1 s | guests and co-hosts only |
- Android's standard player plays FLV; iPhone and web need a player library.
- Timers and deals follow the backend clock, never the video: auction, flash price, coupon drop, group buy and poll timers reach phones with the comments, so they are fair even when the video is late.
9.1a Where the delay comes from
Two different waits:
- Delay: how far behind the host a viewer is, for the whole time they watch (Mama Yoyo waves, Juma sees it 10 s later).
- Opening time: from tapping a live to seeing the picture, once, when joining.
The delay, step by step (today, HLS with 4 s pieces). Mama Yoyo waves at 8:00:00.
| # | Where | What happens | Today | 1 s pieces (step 1) | FLV (step 2) |
|---|---|---|---|---|---|
| 1 | Host phone | camera → compress | 0.2 s | 0.2 s | 0.2 s |
| 2 | Host upload | phone → SRS | 0.3 s | 0.3 s | 0.3 s |
| 3 | SRS cuts pieces | waits until a piece is complete | up to 4 s | up to 1 s | none (continuous) |
| 4 | CDN / edge | playlist cached a moment | ~1 s | ~0.5 s | ~0.1 s |
| 5 | Viewer's player | keeps 2–3 pieces in hand, plays that far behind the newest | 4–8 s | 2–3 s | ~1–1.5 s buffer |
| 6 | Viewer download | → phone | 0.3 s | 0.3 s | 0.3 s |
| Total | 6–12 s | 3–5 s | 2–3 s |
Steps 3 and 5 are the big ones and both grow with piece size; FLV has no pieces.
Timers are separate. The auction ending at 8:05:00 (backend clock) shows "0:05 left" at the right moment even if Juma's video is 6 s late; his bid at 8:04:58 counts. The delay makes the live feel slow; it never makes a deal unfair.
Opening time
| Today (HLS, 4 s pieces) | With FLV | |
|---|---|---|
| What happens | fetch the piece list → download a whole 4 s piece → start | the server sends from the last keyframe at once |
| Time to picture | 1–3 s | under 1 s |
- Instant feel (TikTok's trick): in the swipe feed (
/live/swipe) the app loads the next live while you watch the current one. - Catch-up: after the network stutters the player has fallen further behind (10 s → 20 s) and never comes back by itself. The player plays at 1.1× until caught up, or jumps to now if far behind.
What each delay feels like (why 2–3 s is the target)
| Delay | Feels like | Who uses it |
|---|---|---|
| < 0.5 s | a phone call, real back and forth | video calls; our guests on screen (LiveKit) |
| 1–2 s | almost instant | some apps on perfect networks |
| 2–3 s ✅ | Juma comments "red one!", Mama Yoyo holds up red, he sees it ~3–5 s after typing (with the comment refresh): feels live | TikTok, Douyin, Instagram |
| 6–12 s (today) | the answer comes after he's moved on: feels like TV | old-style streaming |
| 20–30 s | a broadcast | YouTube's normal setting |
Why not lower: the last 1–2 s are the viewer's player keeping about 1 s in hand so it doesn't freeze when the signal wobbles; half-second drops are common on Tanzanian mobile networks, and freezing is worse than 2 s of delay. Only people talking on screen need under 0.5 s, and they have LiveKit.
9.1b Is 2–3 s affordable? The math
Assumptions (to re-check with real numbers): average watched quality about 0.8 Mbps (mix of 720p 1.5 · 480p 0.8 · 240p 0.3) → 0.36 GB per viewer-hour. Prices looked up 2026-11-23: Vultr Johannesburg small server $12/month with 3 TB, extra traffic $0.01/GB; bunny.net CDN Middle East & Africa $0.06/GB. Cloudflare's free / Pro CDN is not allowed for video (their terms: video needs Stream / R2 or Enterprise), and today HLS is still served straight from the SRS box (VP_LIVE_SPEC).
| Viewer-hours a month | Traffic | bunny.net CDN (HLS only, no FLV) | SRS edges on Vultr Johannesburg (FLV + HLS) |
|---|---|---|---|
| 10,000 (≈ 330 a day) | 3.6 TB | ~$216 | ~$18 (1 server) |
| 100,000 | 36 TB | ~$2,160 | ~$300 (3 servers) |
| 1,000,000 | 360 TB | ~$21,600 | ~$3,750 (≈ 6 servers) |
- One edge with a 1 Gbps port serves roughly 800–1,200 viewers at once at 0.8 Mbps.
- Main box → edge traffic is small (one copy of each live per edge).
- Dar → Johannesburg is about 40–60 ms away: fine for 2–3 s.
- Result: SRS edges are both the fastest option and about 6× cheaper than a CDN. Start with one edge, add more as viewers grow.
Data paid by people (their phone bundles)
| Who | Quality | Per hour |
|---|---|---|
| Viewer | 720p / 480p / 240p / listen only | ~675 MB / ~360 MB / ~135 MB / ~15 MB |
| Host sending 3 qualities | 720p + 480p + 240p | ~1.2 GB |
| Host sending 1 quality | 720p | ~675 MB |
The host's upload cost matters on mobile data: 3 qualities on Wi-Fi, 2 on mobile data (decided by the backend per phone, as §9.2).
9.2 Quality and data saver
- The host's phone sends 3 qualities (720p · 480p · 240p); the server only passes them along (no re-encoding); the player switches automatically with the viewer's network. A weak host phone sends 2 or 1; the backend tells each phone what to send.
- Listen only 🎧 for 2G: the server copies just the sound (cheap, no re-encoding); the product card and Buy stay.
- Switch "Data saver" in settings: every live starts in low quality.
- Later, with more servers: the server makes extra qualities for hosts whose phones can't.
| Today | After step 1 | After step 2 (target) | TikTok | |
|---|---|---|---|---|
| Delay | 6–12 s | 3–5 s | 2–3 s | 2–3 s |
| Weak 3G | buffers | 240p, plays | 240p, plays | plays |
| 2G | buffers | listen only | listen only | — |
| Our server CPU | low | low | low | — |
9.3 Bad network
✅ Agreed 2026-11-24.
| # | When | What happens |
|---|---|---|
| N1 | Before going live | The device check measures the network; weak → "Your network is weak, try Audio live or move to a new location" |
| N2 | Host's network gets weak | Small yellow bar for the host: "Weak network, try a new location"; the phone lowers quality by itself (§9.2) |
| N3 | Host drops (audio) | Listeners see "Mama Yoyo is reconnecting…"; co-host and speakers carry on (server mix, §8A.3); the phone reconnects by itself to the same live (same listeners, post, comments) |
| N4 | Host drops (video) | Picture freezes + "Reconnecting…" for 2 minutes, comments stay open; back in time → continues; not back → ends normally |
| N5 | Host away long (audio) | No limit while a co-host is there; the co-host can end it. No co-host and no speakers → ends after 2 minutes |
| N6 | Money tools while the host is away | Running drops (coupon, flash price, auction) keep running on the backend clock; no new drops until the host is back |
| N7 | A speaker's network is weak | ⚠️ on their photo for the host: "Juma's network is weak"; the host can move Juma back to listener |
| N8 | Ended by accident | Within 10 minutes the host gets "Continue your live": reopens the same live; listeners still around get "Mama Yoyo is back" |
| N9 | A viewer or listener's network is weak | The same small yellow bar: "Weak network, try a new location" (owner 2026-11-24); for video also a one-tap Listen only 🎧 |
Example: 8:20 pm Mama Yoyo's network drops in her Audio live → Neema and Juma keep talking, 300 keep listening → her coupon drop keeps running, Neema can't start a new one → 8:21 she's back: "Mama Yoyo is back". Meanwhile Asha on the bus gets the yellow bar "Weak network, try a new location".
10. Safety
✅ Agreed 2026-11-23.
Today: host can mute a person and turn on slow mode; only accounts 18+ and 3 days old go live; posts have
reporting (reasons list + admin review: PostReportEntity, ReportReason); lives have no reporting, and with
no recording there is no evidence afterwards.
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| Report a live | ✅ | ✅ | ✅ | ✅ + a picture + last 5 min of comments |
| Moderators chosen by the host | ✅ (up to 20) | ✅ | ❌ | ✅ up to 10 |
| Host's blocked words | ✅ | ✅ | ✅ | ✅ up to 100 + NexGate's list |
| Hold risky comments | ✅ | ✅ | — | ✅ phone numbers and links |
| Mute for a time | ✅ | ✅ | — | ✅ 1 min · 5 min · whole live |
| Automatic video checks | ✅ | ✅ | ✅ | later |
| Platform stops a live / bans | ✅ | ✅ | ✅ | ✅ |
S1. Report a live. ⋯ → Report → a reason (the same list as posts). At that moment the backend grabs one picture from the video (a single frame from SRS, cheap) and the last 5 minutes of comments; admin sees what the reporter saw.
S2. Automatic pause. 5 reports from different people within 2 minutes (more in big rooms, scaled with viewers; the number is a setting) → the live is paused ("This live is being reviewed") until admin lets it continue or ends it. Only accounts at least 3 days old count, so fresh accounts can't kill a rival's live.
S3. Moderators chosen by the host. Up to 10; they can mute, remove from live, hold or delete comments; they can't start deals, end the live or see money. Shop lives: the owner picks staff, only through the shop terminal (team rules).
S4. Word filter.
- NexGate's list (insults, scam words like "send money to this number") always applies.
- The host's own list, up to 100 words.
- A filtered comment is shown only to its writer.
- Phone numbers and links are held for the host or moderators to approve (stops "call me for cheaper" scams).
S5. Mute, remove, block. Mute 1 min · 5 min · whole live; remove from the live (T4); block = never watches this host again.
S6. Admin. End any live now; ban from going live 1 day · 7 days · 30 days · forever; every action in the admin audit log. Under 18: can watch, can't send gifts, can't join on screen.
Later: automatic video checks (a machine looks at pictures for nudity etc.); costs CPU or a paid service.
11. After the live
✅ Agreed 2026-11-23. Brings together §7.3 (sales numbers), gifts, reactions, polls, questions and "Book again".
| TikTok | YouTube | NexGate | ||
|---|---|---|---|---|
| Summary right after ending | ✅ | ✅ | ✅ short | ✅ everything in one place |
| Viewers over time graph | ✅ | ✅ | ❌ | ✅ with markers for what the host did |
| Where viewers came from | ✅ | ✅ | ❌ | ✅ |
| Average watch time | ✅ | ✅ | ❌ | ✅ |
| History of all lives | ✅ | ✅ | ❌ | ✅ My lives |
A. Host's end screen (right after End)
Your live · 1 h 05 min 👀 410 at the peak · 1.2k watched · average 6 min each · +38 followers 🛍 14 orders · 230,000 TZS · best: Kanga red (30 taps → 8 orders) 🎟️ Coupon drop 20 → 9 used · 👥 Group 10/10 ✅ · 🔨 Watch sold 25,000 🎁 38 gifts · 54,000 in gift balance · top fan: Neema 🔥 most reactions · 📊 Poll: Blue 55% · ❓ 6 questions not answered → [Reply in chat] [Book again next Friday 8 pm?] [See full numbers]
Money for the shop owner / personal host only (staff and other people's products: counts, §7.3).
B. Full numbers (My lives → that live)
- Viewers per minute graph with markers: "8:20 coupon drop → +80 viewers", "8:40 flash price → 5 orders" (from heartbeats; no video needed).
- Where viewers came from: Live feed · Swipe · notification · a post with the live · profile · shared link · followers (the app says where the tap came from, like the sales link).
- Products: taps → orders → money, per product.
- Refunds subtracted later.
C. Viewer's screen when a live ends
Live ended · [Follow Mama Yoyo] (if not yet) Next live: Friday 8 pm [Remind me] (if booked) Live now: 3 lives he might like (from
/live/now)
"From my last live": the pinned products stay in a row on her profile / shop for 24 h; late buys still count for the live (§7.3).
D. Kept
| What | Kept |
|---|---|
| Summary and numbers of each live | forever (a few rows per live) |
| Viewers-per-minute graph | forever (one number per minute) |
| Comments, questions | 6 hours, then gone |
| Video | never recorded |
12. Open questions waiting for the owner
None right now. Q1 and Q3–Q9 (live row, post stays after the live, owner's personal followers, shop reasons and weights, staff tools, group buy rules, others can pin my products, reminder choices) were all agreed on 2026-11-23.
| # | Question | Answer |
|---|---|---|
| Q1 | Live row above the home feed? | yes |
| Q3 | Post stays after the live ends, ranked lower? | yes |
| Q4 | Owner's personal followers not notified when she goes live as the shop? | yes |
| Q5 | Shop live reasons and weights (§3.3) | as in the table |
| Q6 | What staff can do while live (§5.2) | as in the table |
| Q7 | Group buy rules (§7.2) | as listed |
| Q8 | "Others can pin my products in their lives" shop switch | yes, on by default |
| Q9 | Reminder choices (§4.1): 24 h · 1 h · 15 min · at start; tick more than one; default 24 h + 15 min; at start always on | as listed |
| Q10 | "Is live" push to followers + mutual friends, recommended people only in the Live feed (2026-11-24) | yes |
| Q11 | No push at booking time, only the post (2026-11-24) | yes |
| Q12 | Switch after booking: off → on makes the post; on → off only while nobody waits (2026-11-24) | yes |
| Q13 | Booking post may have an empty caption (2026-11-24) | yes |
| Q14 | Merge radio + Spaces into Audio live, remove Spaces (2026-11-24) | yes |
| Q15 | Audio live: A1–A8, X1–X12, Y1–Y10, server mixing (2026-11-24) | yes |
| Q16 | Bad network N1–N9, yellow bar for host and viewers (2026-11-24) | yes |
| Q17 | Gifts to any speaker or co-host (2026-11-24) | yes |
| Q18 | One create form for video and audio with a Stage part; pick co-hosts and speakers in the form (2026-11-24) | yes |
| Q19 | Speaker link only after the live is created (Booked screen, My lives, in the live); opening it = accepting (2026-11-24) | yes |
| Q20 | Live invites copied from group invites; delivery push + invites list (2026-11-24) | yes |
| Q21 | "Who can invite me to a live": everyone / contacts only / nobody, default contacts only, replaces "Allow live invites" (2026-11-24) | yes |
| Q22 | Every tool on both kinds, shown differently: video = see it, audio = hear it then see it (sound + lock-screen line + host "say it out loud" hint) (2026-11-24) | yes |
| Q23 | External camera (OBS, YoloBox, GoPro, DJI): name "External camera", phone is the default, a new key for every live (not reusable), preview + Go live with an auto-start switch (2026-11-24) | yes |
| Q24 | External camera: one quality 720p + Listen only now; vertical and landscape; remote guests through the Guests window in OBS (Twitch's way), none without a computer (2026-11-24) | yes |
| Q25 | External camera open now for accounts 30+ days with a verified phone and verified shops; staff wait for the desktop terminal (2026-11-24) | yes |
| Q26 | One source at a time; switch camera ⇄ phone before and during the live; Continue on this phone when the camera is lost (2026-11-24) | yes |
| Q27 | Co-hosts in camera lives: in the room, off-screen from their phone, or on screen through the Guests window (2026-11-24) | yes |
| Q28 | Viewers: two layers (video + app layer), landscape with blurred fill, "On screen" chip, OBS safe-area template (2026-11-24) | yes |
| Q29 | Host, co-host, moderator and on-stage comments: badges, speak as the shop, skip slow mode, reply with a quote + ding, shop host and co-host shops may share numbers and links (2026-11-24) | yes |
| Q30 | Guest vs co-host as in §8.1a; up to 2 co-hosts in video and audio (2026-11-24) | yes |
| Q31 | Live goals: 6 types (orders, pieces, revenue as %, followers, watching, gifts), no reaction goal, up to 2 at once (never the same type), only inside the live, optional timer for a segment, host cancels any time (2026-11-24) | yes |
| Q32 | Tool map (~28) and the host's 5-button bar with Drop and More, backend decides which tools show (2026-11-24) | yes |
| Q33 | Centrifugo with three channels: live room (everyone), hosts' room (host, co-hosts, moderators), personal (money in TZS only for the owner); goals and every new tool use it (2026-11-24) | yes |
13. What the backend needs
For everything agreed (all topics discussed by 2026-11-23).
13.1 Keep as is
- Going live: create, ingest key, end, SRS callbacks publish / unpublish.
- Comments: post, read, mute, slow mode (read changes: built once every 2 s, served from memory to signed-in viewers, §Rules).
- Pins: attach, list, pin, unpin, remove, tap.
- Discovery:
GET /live/now,POST /live/now/open,POST /live/streams/{id}/watching. - Remind me:
PUT /live/streams/{id}/reminder(gains the lead choices, §4.1).
13.2 Change
| What | Change |
|---|---|
| Create a live | + stream from (this phone by default / external camera); + co-hosts and speakers picked in the form (invites sent on create) + who can ask to speak + new speakers start muted; + as (me / which shop); + let people get reminded (on by default) + caption: on → the backend makes the post (caption + live attached) in the same step; + booking rules (15 min – 30 days, 5 waiting per person and per shop, 2 h apart, one live per person and per shop) |
| Stream mode | AUDIO_RADIO becomes Audio live with a stage: server mixing (LiveKit → SRS, from Spaces), roles host / co-host / speaker / listener, seats 8 allowed / 5 now |
| Stream | + shop (null for a person's live); + hosted by (the staff member, for a terminal live) |
| Reminder | + the chosen leads (ReminderLead set) |
| Create a post | + accepts a live attachment (an added optional field; post_streams table like post_events); the post answer gets an optional live attachment with its state, banner, title, description and "friends waiting" read at serve time |
| "Is live" push | to followers + mutual friends (shop: shop followers); recommended people none; remind-me people only once |
| Coupon | + only people watching switch; + grab limit |
| Playback | address now carries a play token (short-lived, account + phone), checked by SRS / edges at start (§Rules) |
| SRS | HLS pieces 4 s → 1 s; FLV to viewers through SRS edges; three qualities from the host phone; listen-only sound copy (§9) |
| Shop settings | + Others can pin my products in their lives (on by default) |
13.3 New
| Topic | Endpoints |
|---|---|
| My lives | GET /live/mine?status=&as=: personal and all my shops' lives (including staff-hosted), each with as, title, cover, status now (scheduled / live / ended / cancelled), when, numbers, and buttons decided by the backend |
| Someone's lives | GET /live/people/{accountId}, GET /live/shops/{shopId}: upcoming + live now only, with Remind me or Watch |
| Scheduling | edit · cancel · who is waiting (host only) · book again · switch "let people get reminded" after booking (off → on makes the post; on → off only while nobody waits, deletes the post) |
| Live feeds | GET /live/swipe (next few, in order, for preloading) · kind=SHOP filter on /live/now and /live/swipe |
| Coupon drop | drop · change (add people, add time, stop) · grab · hold time from a fixed list · "ends in 1 h" reminder |
| Ticket live | "Stream on NexGate Live" on online / hybrid events (live booked from the event, moved / cancelled with it) · watch only with a valid online ticket, one phone at a time · watching = check-in |
| Live gifts | admin list (key, name, icon, price, order, on/off) · send (wallet → host's or shop's gift balance, daily limit) · top fans · event with the key for the animation |
| Auction | start (start price, step, time, lowest price) · bid (top bid held in escrow, outbid released) · cancel · end → order or ticket for the winner |
| Bargain | turn on per pinned product (lowest price optional) · offer · counter / accept / no · accepted = personal offer with 15 min to pay |
| Flash price | start · change (lower, add pieces, stop) · hold a piece at checkout 10 min; checkout and quotation use the flash price |
| Free delivery | a shop delivery campaign with audience "from this live" (start, stop); quotation checks the §7.3 link |
| Sales numbers | optional "from live" on product orders and ticket purchases (24 h after the tap, last live wins; coupon / group buy always) · live summary for the host (counts; money for the shop owner only) · "from other people's lives" in shop reports |
| Group buy | start (host, no seat bought) · change (add time, lower price, give through); joining uses the existing checkout; tickets with seats, several seats per person |
| Goals | set (type, target, optional reward = a prepared shop tool or text) · up to 2 at once, never the same type · optional timer (5 / 10 / 15 / 30 min or until the live ends; time's up → host: more time / give anyway / end, 1 min) · lower target · cancel (+ give reward anyway) · progress by real-time event · reward fired by the backend when reached · revenue: % to viewers, TZS to owner only · summary line |
| Host toolbar | which tools show for this host and live (shop / personal / staff rights / event / product plans), decided by the backend |
| Instalments | pinned card shows the product's existing plans (no new tool) |
| Guests and co-hosts | up to 2 co-hosts (video and audio), the other seats for guests / speakers · request · invite (watching / search, connected people only) · accept / ignore / remove / block for this live / requests off · seats (5 allowed, "seats now" from the backend) taken in one safe step · "Allow live invites" setting · LiveKit room tokens for people on screen |
| Comments by role | badge from the role (host / co-host / moderator / on stage) and "speaks as" (shop, "shop · staff") on each comment · roles skip slow mode and the rate limit · reply with a quote + personal ding · shop host and co-host shops pass the phone-number and link hold · word filter for everyone |
| Reactions | send (batched, fixed LiveReaction list, 15/s per person) · mix for the last 2 s with the comments · host totals |
| Joins | up to 10 per 2 s with facts (host follows, top fan, friend of you) + count · "Show when I join a live" setting |
| Who's watching | count + top 3 fans for everyone · full list for host / co-hosts (bought mark) · mute / remove from the list |
| Polls | start (2–4 options, products allowed, 1 · 2 · 5 min or open) · vote once · end · result into the summary |
| Questions | ask (linked to the pinned product) · Me too · answer now / done · unanswered after the live |
| Safety | report (picture + last 5 min of comments) · auto-pause and admin continue / end · moderators (up to 10) · word filter (NexGate + host list) · held phone numbers and links · mute 1 / 5 min / whole live · block · admin end live and ban from going live · under-18 limits |
| After the live | end summary · viewers per minute with event markers · where viewers came from · per product numbers · viewer's end screen · "From my last live" row 24 h |
| Data saver | qualities per phone decided by the backend (Wi-Fi 3, mobile data 2) · listen-only address |
| External camera | a key per live (from booking until the live ends, reset, killed when switched to the phone before the start; never in normal responses) · SRS publish before Go live = CAMERA CONNECTED preview (not public, private play token for host and co-hosts) + push when the app is closed · health from SRS stats (bitrate, fps, keyframes → Excellent / Good / Poor + hint) · auto-start switch · one source at a time (switch camera ⇄ phone, refuse the other) · camera lost → 2 min · Guests window (web page with the LiveKit guests, names, max 5; backend knows whether it's connected) · host's phone joins the guest room for live talk · LiveKit Ingress for audio from a mixer · who may use it (30 days + verified phone, verified shops) |
| Live invites | send (form, My lives, in the live) · my invites list · accept / no thanks · withdraw · states pending / accepted / declined / expired / withdrawn · 20 a day · picker search only returns people the setting allows · "cannot be invited" message (same as groups) |
| Privacy setting | "Who can invite me to a live" (EVERYONE / CONTACTS_ONLY / NOBODY, default contacts only), next to the group one; replaces "Allow live invites" |
| Audio stage | who can ask to speak · requests · invite (accept / no thanks) · speaker link (after create; opening = accepting; blocks apply) · mute (never unmute others) · ✋ next · back to listener / remove · pin a comment · send listeners to another live |
| Bad network | host reconnect to the same live · 2 min grace (video) · co-host carries on (audio) · "Continue your live" within 10 min · speaker weak-network flag |
| Gifts | + send to a speaker or co-host |
| Staff from the terminal | go live for the shop · hand over to another staff member · the NexGate Shop app's allowed paths (team rule 2) |
The composer's + Live picker uses /live/mine?status=upcoming,live. To attach someone else's live, the person
starts from that live (its card or page → Share as post).
13.4 Live events on screen: real time through Centrifugo
✅ Agreed 2026-11-23 (owner: "we need it").
- Sending = API (as today and as TikTok): comment, vote, bid, ask, grab, join… each checked properly (signed in, money, one vote) and safe against double taps.
- Receiving = push. Each watching phone keeps one open connection to Centrifugo (a small open-source server built only for real-time delivery; handles hundreds of thousands of connections on a small server; checks our sign-in tokens). The backend decides everything and tells Centrifugo "send X to this live's room"; Centrifugo only delivers, about every 0.3 s.
- One channel per live carries everything: comments, reactions, joins, poll results, questions, coupon counts ("20 left"), group buy ("7 of 10"), auction bids, timers, pins, "live paused".
- Events stay a key + an id, never display text, as pins do today.
- Connection drops (weak network) → the app falls back to asking every 2 s until it reconnects; nothing is lost.
- Cards can arrive before the video shows the host saying it (video is 2–3 s behind): harmless; timers follow the backend clock.
- Example: Juma taps Bid 22,000 → API checks and holds it → the backend pushes "Juma 22,000 · 0:08" → all 300 phones see it in under half a second.
- New infrastructure: Centrifugo runs on the box (later next to the SRS edges); Redis lets several backend copies publish to it. Later it can also carry the feed's live counts and calls / meetings events.
| Today | After | |
|---|---|---|
| Others' actions reach me | up to 2 s (asking every 2 s) | under 0.5 s (push) |
| Requests with 1,000 viewers and nothing happening | ~500 a second | ~0 (open connections, quiet) |
| Auction last seconds | can be 2 s late | fair and instant |
Three kinds of channel (✅ 2026-11-24): not everything may go to everyone, so one room channel isn't enough.
| Channel | Who listens | Carries |
|---|---|---|
| 🏠 Live room (one per live) | everyone watching or listening | comments (with role badges, §8.7), reactions, joins, pins, coupon / flash price / group buy / auction / free delivery updates, goal progress + 🎉 reached (revenue only as %, §7.11), polls, questions, gifts ("Juma → Neema: Lion"), stage changes (who's on / off), "On screen: Neema", camera switch blip, "reconnecting…", "Mama Yoyo is back", "sent you to Duka la Asha's live", live paused / ended |
| 🎛 Hosts' room (one per live) | host, co-hosts, moderators | requests list, full viewer list, invite states (⏳ ✅ ❌), reports, held comments, camera connected + health 🟢🟡🔴 (§8B), "Guests window not open", "Juma's network is weak", goal "time's up" choices, goal revenue as % |
| 👤 Personal (one per person) | only that person | "Mama Yoyo replied to you", "You were outbid", bargain answer, invite to speak / co-host, "you're on stage now", revenue goal in TZS and sales money (owner only) |
- Money never goes to a shared channel: TZS only on the owner's personal channel; staff hosts and co-hosts see %.
- Privacy: the full viewer list, reports and held comments only in the hosts' room.
- Less noise: viewers' phones never receive host tools.
- Centrifugo checks on subscribe that the person may join that channel (watching this live · host / co-host / moderator of it · their own personal channel).
What does NOT go through Centrifugo
| What | Goes through |
|---|---|
| Video and sound | SRS (viewers), LiveKit (guests, speakers, Guests window) |
| "Who's talking" glow (audio) | LiveKit (it already knows who speaks) |
| Notifications when the app is closed (reminders, "is live now", invites, "camera connected") | FCM push (notification server) |
| Sending anything (comment, bid, grab, set or cancel a goal, switch source) | API, checked by the backend |
- Audio with a locked phone: while audio plays the app stays awake and keeps its Centrifugo connection, so lock-screen lines ("🎟 Coupon dropped", "🎯 Goal reached") arrive (§8A.10).
- Example: Juma pays the 20th order → the backend updates the goals → room: "orders 20/20 🎉" + "sales 55%" to all 300 phones; Mama Yoyo's personal: "550,000 / 1,000,000 TZS"; hosts' room: Neema (staff host) sees "55%"; free delivery fires → room: "🚚 Free delivery on" ✅
13.5 Notifications (each one also goes into the notification workbook)
Live is now (followers + mutual friends) · live invite (speaker / co-host / guest) · invite accepted / declined (to the host) · invite withdrawn · speaker "get ready" 15 min · "Live now · join the stage" · moved / cancelled to invited people · "Mama Yoyo is back" · "Continue your live" · "sent you to Duka la Asha's live" · reminder 24 h · reminder 1 h · reminder 15 min · host "get ready" · moved · cancelled · "book again" after the live · grabbed coupon ends in 1 h · co-host invite · ticket live starts in 15 min · live summary ready · your live was paused / ended by NexGate · banned from going live.
13.6 Sale origins (shared, not only live)
Agreed 2026-11-23: where a sale came from is kept in one new table, not as columns on orders, because it will also be used for sales from feed posts, reels, events, shared links and more.
- One row per purchase that came from somewhere (most purchases have none): which purchase (product order or
event booking order + its id) · from where (
SaleOriginKind, VARCHAR:LIVEfirst; laterPOST,CLIP,EVENT,SHARE_LINK,CHAT) · which one (stream / post / clip / event id) · whose it was (the account that brought the buyer, kept even if the post is deleted later) · when tapped · when bought. - The tap is remembered by the backend, not carried by the app: tapping a product or ticket from a live / post / reel notes "this person, this product, from here, at this time" for 24 hours (Redis, expires by itself). At payment the backend looks it up and writes the row. The last place tapped wins.
- Existing order tables and responses stay unchanged; reports ("orders from my live", "4 orders came from Juma's post") read this one table.
13.7 Remove
Spaces (chat_system/space_mng, /api/v1/live/spaces) once Audio live has its stage · SRS recording (dvr) + the on_dvr callback · the replay service + its File Thunder contexts (STREAM_VIDEO,
STREAM_AUDIO) · the states PROCESSING, REPLAY_READY, FAILED.
14. Research sources (read 2026-11-23)
-
TikTok: LIVE gifts, going LIVE, multi-guest, LIVE Events, LIVE analytics, LIVE Subscription, requirements, selling on TikTok LIVE, live-shopping playbook, LIVE recordings, scheduling
-
Instagram: Live Rooms, schedule a live (Help), scheduling (RouteNote), scheduling (Later), for more views (Social Media Examiner)
-
YouTube: live chat, watch live streams, clips and polls, live Q&A, reminder button
-
Twitch: raids, TwitchCon 2025, TwitchCon 2023
-
Whatnot: auctions, auctions and giveaways
-
China live commerce: brands taking back livestreaming (Campaign Asia), store-led live (eCommerce China Agency), star host regret (Caixin)
-
Latency: Douyin low latency, BytePlus 2–3 s FLV
-
Audio rooms (2026-11-24, from what we know of these apps, not re-read): X (Twitter) Spaces, Clubhouse, Discord Stage channels, Telegram voice chats, Twitch raids, Spotify Live (closed 2023).
-
External cameras (2026-11-24): YouTube live settings, YouTube latency, YouTube DVR, YouTube encoder settings, TikTok with OBS, TikTok stream key, Instagram Live Producer, Instagram Live Producer with Streamlabs, Twitch broadcasting, Twitch key reset, Whatnot OBS
-
Guests with external cameras (2026-11-24): Twitch Guest Star, Guest Star OBS guide, Guest Star memory issues, TikTok multi-guest, TikTok LIVE Studio (TechCrunch), OBS guests via VDO.Ninja, StreamYard vs OBS
-
NexGate code (2026-11-24):
chat_system/space_mng(Spaces),chat_system/group_mng(group invites, invite policy).
Some sources disagree on details (follower minimums, replay days, flash-sale limits). Good for ideas; check again before copying an exact rule.
Change log
| Version | Date | What |
|---|---|---|
| 0.1 | 2026-11-23 | First write-up: today's state, no recording, live feeds, scheduling, shop live, staff via terminal + Shop app, anyone shows / only the shop sells, coupon drop, group buy proposal, open questions; a live on a post is an attachment type, anyone can attach anyone's live, share-as-post is an app shortcut; viewer picks reminder times from a fixed list; §13 what the backend needs; Q1, Q3–Q9 agreed (group buy rules, staff tools, shop reasons, reminder choices); full money tools list M1–M14; M10, M13, M14 not now; every tool for products and tickets except instalments; M3 sales numbers agreed (§7.3); coupon drop hold time picked by the owner; M4 free delivery agreed (§7.4); one shared sale origins table for live, posts, reels, events (§13.6); M5 flash price agreed (§7.5) with the "only people watching" switch, sizes and colours; M6 bargain live agreed (§7.6); M8 instalments agreed (§7.7); M7 live auction agreed (§7.8); M9 live gifts agreed (§7.9): gifts land in the gift balance; M11 ticket live agreed (§7.10); M12 paid live not needed; group buy tickets side agreed (§7.2); money tools list finished; taking part T1–T7 needed, T8 not; T1 guests and co-hosts agreed (§8.1), mixed on the host's phone; seats decided by the backend (5 allowed, 3 now), full screen checked when someone goes on, comparison table; T2 reactions the YouTube way (§8.2); T3 joins delivered by the backend, shown by the app (§8.3); T4 who's watching + three ways onto the screen (§8.4); T5 polls with product options (§8.5); T6 questions with Me too (§8.6); T7 battles not needed; §9 speed and data saver: target 2–3 s (1 s HLS pieces, then FLV via SRS edges), host phone sends 3 qualities, listen only, timers on the backend clock; delay breakdown, opening time, catch-up, cost math (SRS edges ~6× cheaper than a CDN), what each delay feels like; §10 safety agreed (report with a picture + comments, auto-pause, moderators, word filter, held phone numbers and links, admin bans, under-18 rules); every live endpoint and the video itself need a signed-in account (play token), shared link preview; §11 after the live agreed; §13 complete; real time through Centrifugo (sending by API, receiving by push, fall back to asking every 2 s); "your friends are watching" on every live card (§3.2a) |
| 0.2 | 2026-11-24 | Booking refactor (owner): switch "Let people get reminded" (on by default) replaces "no private bookings"; on → the backend makes a normal post (caption + live attached), no push at booking; off → private booking, only the host's get-ready; switch can change after booking (on → off only while nobody waits); "is live" push to followers + mutual friends, recommended people only in the Live feed; form: profile dropdown (me / shop), Now / Later; banner, title, description belong to the live and show in the card, separate from the post caption; "your friends are waiting" on the scheduled card; Q10–Q13 |
| 0.3 | 2026-11-24 | Audio live (§8A): radio + Spaces merged, Spaces removed, private talk = group calls; audio has every video tool; A1–A8 (screen off, 8 seats, glow, sound on drops, 30 s sound in reports); server mixes audio; handling people X1–X12 and Y1–Y10 (co-hosts, who can ask to speak, never unmute others, speaker link, send listeners on); gifts to speakers; §9.3 bad network N1–N9 incl. yellow bar "Weak network, try a new location" for host and viewers; Q14–Q17 |
| 0.4 | 2026-11-24 | §8A.1 radio vs Spaces table + which to use; §8A.2 how every tool shows in audio; §8A.4 comparison with X Spaces, Clubhouse, Discord, Telegram + lessons + example; §8A.6 one create form for video and audio (Stage part); §8A.7 pick co-hosts and speakers in the form, speaker link only after create; §8A.8 live invites copied from group invites (how groups work today, comparison, what happens after the invite); §8A.9 "Who can invite me to a live" (default contacts only) replaces "Allow live invites"; §8.1, §8.4, §12 Q18–Q21, §13, §14 updated |
| 0.5 | 2026-11-24 | §8A.10 every tool on both kinds side by side (selling, taking part, safety, network, after): video = see it, audio = sound + lock-screen line + card; host "say it out loud" hint; sound limits; same backend for both; coupon drop example both ways; Q22 ; §8A.6a drawings: Booked screen, My lives, the invite, inside an Audio live, host's Stage panel, lock screen, weak network bar |
| 0.6 | 2026-11-24 | §8B going live from a camera or computer: how YouTube does it, the 4 ways a camera reaches the live, Server URL + reusable key per person and per shop, preview + health, the phone as control panel, camera lost, audio from a mixer via LiveKit Ingress; one quality + Listen only now, no video guests now, open to owners and personal accounts (staff wait for the desktop terminal); drawings; §5.1, §12 Q23–Q25, §13 updated |
| 0.7 | 2026-11-24 | §8B rewritten as "External camera": how YouTube, TikTok, Instagram, Twitch, Whatnot set it up; rules E1–E10 (name, phone default, a key per live, preview + auto-start switch, who, shape, quality, one source, phone as control panel, sound mixer); form, flows A (now) and B (later) with drawings; how "Connected" happens; control panel; switching camera ⇄ phone (power cuts); co-hosts; Guests window (Twitch Guest Star way) with how others handle guests; what viewers see (two layers, vertical / landscape, safe area); OBS "Connect account" levels, TikTok LIVE Studio + GPL, the 3-step path; examples; §12 Q23–Q28, §13, §14 |
| 0.8 | 2026-11-24 | §8.7 comments from host, co-hosts, moderators and people on stage (badges, speak as the shop, no slow mode, reply with a quote, numbers and links for shop hosts); Q29; §13 |
| 0.9 | 2026-11-24 | §8.1a guest vs co-host (visitor vs partner) for video and audio; up to 2 co-hosts in both kinds; Q30; §13 |
| 0.10 | 2026-11-24 | §7.11 live goals (6 types, revenue as % to viewers, no reaction goal, one at a time, only inside the live, cancel any time with "give the reward anyway", rewards fired by the backend); §7.12 the full tool map (~28) and the host's 5-button toolbar; Q31–Q32; §13 ; optional goal timer for a segment of the live ; up to 2 goals at once, never the same type |
| 0.11 | 2026-11-24 | §13.4 Centrifugo with three channels (live room, hosts' room, personal), what each carries incl. goals, stage, camera health; money in TZS only on the owner's personal channel; what does not go through Centrifugo; Q33 |
No comments to display
No comments to display