# PubHub Product Plan

_Last updated: 2026-07-29_

## Working name
**PubHub** — an operating hub for independent pubs.

The Bedford becomes the live demo/reference site. The product should be multi-venue from day one, even if the first real venue is The Bedford.

## Core promise
Give a pub owner/manager one screen that answers:

- What’s happening today?
- Who’s working?
- What sports/events are on?
- What needs doing before opening/closing?
- Are there risks or incidents?
- What invoices/supplier costs are due?
- Are bookings, darts/gaming/events working?
- What should we post/promote today?

## Current assets already in repo

### Working/prototype modules
- `command.html` — original command centre dashboard.
- `live.html` — larger live dashboard with sports, darts, Hawkeye, rota, apps, etc.
- `apps/rotahub.html` — staff rota/timesheet portal.
- `apps/hawkeye.html` — CCTV/security view.
- `functions/api/rotahub.js` — Cloudflare Pages Function, KV-backed rota/timesheets/staff auth.
- `functions/api/ops.js` — KV-backed incidents, maintenance, stock, contacts, barred list, documents, tips, compliance, academy.
- `functions/api/tasks.js` — daily/opening/closing/toilets/checklists.
- `functions/api/roster.js` — public roster feed derived from synced bookings/Deputy data.
- `scripts/sync-bookings.py` / `sync-bookings-run.py` — Dojo + 501 + Deputy sync.
- `scripts/fixtures-refresh.js` — Fanzo sports fixtures refresh.
- `data/bookings.json` — synced Dojo/501/Deputy state.
- `data/fixtures.json` — synced sports fixtures state.
- `costs.html` — pub cost categories including Sky Sports, TNT Sports, licences, tech, etc.

### Important observation
The prototype has lots of real value, but it is currently file-heavy/static-page-heavy and Bedford-specific. The next step is productising: one clean app shell, one API layer, one data model, one venue config.

## Product modules

### 1. Today Dashboard
Owner/manager home screen.

Cards:
- Open / closed status
- Staff on duty + next shift
- Today’s bookings
- Sports/events today
- Darts/501 activity
- Current tasks/checklists
- Incidents/maintenance alerts
- Hawkeye/security status
- Invoice/cost alerts

### 2. MatchDay / Pub Sport
This is likely the strongest commercial wedge.

Features:
- Pull sports fixtures from Fanzo/manual sources.
- Show what is on today and this week.
- Assign fixtures to screens: Sky 1, Sky 2, Sky 3, TNT, Freeview, projector.
- Mark main-sound fixture.
- Generate staff briefing: “Put Arsenal v Spurs on Sky Main Event at 19:30, sound on main bar.”
- Generate social posts/story text for upcoming fixtures.
- Track expensive subscriptions: Sky Sports, TNT Sports, TV licence, PRS/PPL.
- Estimate matchday value: expected covers, bookings, darts uplift, beer sales.

Commercially: this can become **PubHub Sport**.

### 3. RotaHub
Already exists and should be kept.

Features:
- Staff list + manager roles.
- Shifts, availability, holiday requests.
- Clock in/out and timesheets.
- Payroll week lock/export.
- Deputy import.
- Staff PIN login.

Need to productise:
- Multi-venue staff isolation.
- Proper branded login.
- Cleaner mobile UX.

### 4. Ops / Daily Control
Features:
- Opening/closing checklists.
- Toilet checks.
- Cleaning/deep-clean rota.
- Maintenance log.
- Lost property.
- Incidents.
- Barred list.
- Contacts and emergency numbers.
- Handover notes.

### 5. Finance / Invoices / Supplier Control
This is the “invoice our new pub” area.

MVP features:
- Supplier list.
- Invoice register: supplier, invoice no, date, due date, amount, VAT, status, category, attachment link.
- Recurring cost schedule: Sky, TNT, utilities, beer suppliers, music licences, broadband, software.
- Overdue/due-this-week dashboard.
- Cost category report matching `costs.html`.
- Manual upload/import first; email/OCR later.

Future:
- Scan invoice PDF/photo with AI.
- Compare against expected pricing.
- Flag unexpected increases.
- Export to accountant/Xero/QuickBooks.

### 6. Bookings + Experiences
Features:
- Dojo table bookings.
- 501 darts sessions.
- Special events.
- Booking reminders for staff.
- No-bookings alerts for quiet periods.

### 7. Hawkeye / Security
Features:
- Latest camera sheets.
- Periodic AI patrols.
- Incidents and alerts.
- Staff phone misuse rules.
- Bins/weather/exterior checks.

Important: keep this optional. Many pubs won’t have compatible CCTV initially.

### 8. Academy / Training
Features:
- Staff training modules.
- Certifications.
- Policy acknowledgements.
- New starter onboarding.

## Suggested packages and pricing

### PubHub Sport
For pubs mainly wanting sports scheduling/promotions.
- £49–£99/month per venue
- Fixtures, screen planner, social post generator, staff sports briefing.

### PubHub Ops
Daily operations package.
- £149/month per venue
- Tasks, checklists, incidents, maintenance, contacts, lost property, barred list, handovers.

### PubHub Pro
Full operating hub.
- £249–£399/month per venue
- Sport + Ops + RotaHub + bookings + invoice/supplier control.

### Setup fee
- £500–£1,500 depending on integrations.
- Higher if CCTV/Hawkeye and supplier invoice import are included.

## Recommended MVP build

### Phase 1 — Clean product shell
Build a modern app shell with tabs:
- Today
- Sport
- Staff
- Tasks
- Bookings
- Invoices
- Ops
- Settings

Use current Cloudflare Pages + Functions + KV to move quickly.

### Phase 2 — Multi-venue data model
Add `venueId` to all API stores. Even if only one venue exists, avoid hard-coding Bedford everywhere.

Suggested KV keys:
- `venue:{venueId}:config`
- `venue:{venueId}:ops:v1`
- `venue:{venueId}:rotahub:v1`
- `venue:{venueId}:tasks:{date}`
- `venue:{venueId}:fixtures:{date}`
- `venue:{venueId}:bookings:{date}`
- `venue:{venueId}:invoices:v1`
- `venue:{venueId}:suppliers:v1`

### Phase 3 — Finance/invoice MVP
Create `/api/finance` with:
- GET suppliers/invoices/summary
- POST save_supplier
- POST save_invoice
- POST update_invoice
- POST delete_invoice
- POST seed

UI:
- Invoice dashboard card
- Invoice register table
- Supplier list
- Recurring costs
- “Due this week / overdue / paid this month” totals

### Phase 4 — Pub Sport MVP
Create `/api/sport` or use existing fixture data with venue config.

UI:
- Today’s fixtures
- Upcoming week
- Screen assignment planner
- Main sound selection
- Staff briefing
- Social post copy
- Sports subscription cost tracker

### Phase 5 — Make Bedford live
Replace mock values in `command.html`/new app with real API calls:
- Roster from `/api/roster`
- Bookings from `data/bookings.json`
- Fixtures from `data/fixtures.json`
- Tasks from `/api/tasks`
- Ops from `/api/ops`
- Finance from new `/api/finance`

## Tech recommendation

Short-term:
- Keep Cloudflare Pages + Functions + KV.
- Add vanilla JS or a lightweight Vite app.
- Avoid a heavy backend until product-market fit is clearer.

Medium-term:
- Move to Supabase/Postgres if reporting, multi-venue, file attachments and permissions become painful in KV.

## First build task
Implement the Finance/Invoices module, because it turns the dashboard into a real business control product and supports the “invoice/supplier” use case.

Deliverables:
1. `/functions/api/finance.js`
2. `apps/finance.html`
3. Dashboard invoice card reads real finance summary.
4. Seed Bedford suppliers/cost categories from `costs.html`.
5. Add Sport package cost lines: Sky Sports, TNT Sports, TV Licence, PRS/PPL.

## Notes for Steven
The best commercial entry point is probably **PubHub Sport** because pub owners immediately understand the value: “Tell my staff what sport to show, where to show it, and what to promote.”

Then upsell into Ops/Pro: rota, checklists, invoices, bookings, CCTV patrols.
