Commit 3e3b3516 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Restructure Roadmap: full backend/frontend separation, done + to-do on both sides

Replaces the old feature-card grid ("What we have") with two Done lists
(Backend, Frontend), grouped by feature area, sitting directly above the
existing Backend/Frontend to-do columns - everything backend-related now
lives under one heading, everything frontend under the other, instead of
being interleaved per feature.

Ideas that need work from both sides are now two separate line items
instead of one combined one, each with its own status:
- Discovery -> Library: backend needs to source a real playable file
  (needs design); frontend action to save one is blocked on that.
- Discovery confidence feedback: backend needs a real queryable field
  (needs design); frontend display of it is blocked on that.
- Telegram chat scanning: backend design (needs design); frontend
  approve-chats/results UI is blocked on that.

Reflects this session's backend work: delete endpoints and Discovery rate
limiting moved from Backend to-do into Backend done; their frontend
counterparts (delete buttons, confirm dialogs) flipped from blocked to
ready now that the backend they were waiting on exists.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 244c776d
Pipeline #1100 canceled with stage
......@@ -31,13 +31,18 @@ describe('Roadmap', () => {
expect(screen.getByText('/remix now requires login and is scoped to its owner')).toBeInTheDocument()
expect(screen.getByText('Room WebSocket now verifies a real access token')).toBeInTheDocument()
// "Soundmarks"/"Remix" also appear in the page nav, so scope to feature-card-only text.
expect(screen.getByText('Location-tied anthems, three tiers')).toBeInTheDocument()
expect(screen.getByText('Stems, key/BPM detect, AI arrangement')).toBeInTheDocument()
expect(screen.getByText('Backend')).toBeInTheDocument()
expect(screen.getByText('Frontend')).toBeInTheDocument()
expect(screen.getByText('Delete endpoints for library songs, playlists, and playlist tracks')).toBeInTheDocument()
// Done lists, grouped by feature area, on both sides.
expect(screen.getByText(/Playlists: create, list, detail with ordered tracks/)).toBeInTheDocument()
expect(screen.getByText(/Playlists page: list, create, view tracks, playback/)).toBeInTheDocument()
// To-do lists - a "ready" item that moved out of backend once this pass's work landed,
// and its frontend counterpart that's now unblocked by the same work.
expect(screen.getByText('Channels: vibe sets, stories, showcase screens')).toBeInTheDocument()
expect(screen.getByText('Delete buttons for library songs, playlists, and playlist tracks')).toBeInTheDocument()
// A "needs design" idea split into its own backend half and frontend half.
expect(screen.getByText('Discovery → Library: source a real playable file for a liked match')).toBeInTheDocument()
expect(screen.getByText('Wire a "save to library" action for liked Discovery matches')).toBeInTheDocument()
expect(screen.getAllByText('Ready to start').length).toBeGreaterThan(0)
expect(screen.getAllByText('Needs design').length).toBeGreaterThan(0)
expect(screen.getAllByText('Blocked').length).toBeGreaterThan(0)
......
import { ShieldCheck } from 'lucide-react'
import { CheckCircle2, ShieldCheck } from 'lucide-react'
import { Layout } from '../components/Layout'
type Status = 'good' | 'warn' | 'bad'
const STATUS_STYLES: Record<Status, string> = {
good: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/30',
warn: 'bg-amber-500/10 text-amber-400 border-amber-500/30',
bad: 'bg-red-500/10 text-red-400 border-red-500/30',
}
const STATUS_LABEL: Record<Status, string> = {
good: 'Functional',
warn: 'Partial',
bad: 'Critical gap',
}
function StatusPill({ status, label }: { status: Status; label?: string }) {
return (
<span className={`shrink-0 rounded-full border px-2.5 py-1 text-[11px] font-bold uppercase tracking-wide ${STATUS_STYLES[status]}`}>
{label ?? STATUS_LABEL[status]}
</span>
)
}
interface Feature {
name: string
sub: string
status: Status
statusLabel?: string
built: string
gaps: string
backendTests: string
frontendTests: string
}
const FEATURES: Feature[] = [
{
name: 'Soundmarks',
sub: 'Location-tied anthems, three tiers',
status: 'good',
built: 'Major (super-admin, one song), Business (owner playlist), Community (proposals + voting, top 3 shown). Review queue, dark map re-theme, full CRM.',
gaps: 'None found.',
backendTests: '40+',
frontendTests: 'Full coverage',
},
{
name: 'Rooms',
sub: 'Pass-the-Aux live listening',
status: 'good',
built: 'Chat, reactions, DJ queue/handoff, now-playing with cross-user streaming — a listener actually hears what the DJ picks. WebSocket auth fixed 2026-08-15: connects with a verified access token, not a client-supplied user_id.',
gaps: 'None found.',
backendTests: '25+',
frontendTests: '19',
},
{
name: 'Channels',
sub: 'Follow, vibe sets, stories, showcase',
status: 'warn',
built: 'Create/follow/unfollow. An auth hole (client-supplied user_id/owner_id, no login required) was fixed this pass.',
gaps: 'Vibe sets, 24h audio stories, and post showcase all have working backend endpoints with zero frontend UI.',
backendTests: '13',
frontendTests: '5',
},
{
name: 'Posts',
sub: 'Song posts + remix reply-trees',
status: 'good',
built: 'Feed, composer, recursive remix tree with "remix this" at every node. Was backend-only with no way to even list posts before this pass.',
gaps: 'None found.',
backendTests: '21',
frontendTests: '7',
},
{
name: 'Live Location',
sub: 'Formerly GeoDrops — live presence',
status: 'good',
built: 'Share toggle, live nearby list, geo-playlist shuffle-play. Verified live: two real accounts, spoofed GPS, cross-account streaming confirmed with audio actually playing.',
gaps: 'None found.',
backendTests: '26',
frontendTests: '12',
},
{
name: 'Library & Upload',
sub: 'Tagging, storage, playback',
status: 'good',
statusLabel: 'Mostly functional',
built: 'Upload, tag, stream, cross-user scoping all correct — no impersonation holes. Playlist UI shipped 2026-08-16: create, view, add tracks, playback — reusing the existing backend endpoints plus one new GET /playlists/{id} for track detail.',
gaps: 'No delete for songs, playlists, or playlist tracks. Library search and a standalone lyrics fetch still have working endpoints with no UI. Upload.tsx has zero tests.',
backendTests: '32',
frontendTests: '15',
},
{
name: 'Remix',
sub: 'Stems, key/BPM detect, AI arrangement',
status: 'warn',
built: 'Real pipeline, not vaporware — Demucs stem separation, BPM/key detection, a Gemini-planned arrangement, mastering. Upload/progress/poll UI works end to end. Auth gap fixed 2026-08-15: both endpoints require login, job status and library-song sourcing are scoped to the owner (was an IDOR).',
gaps: 'Library-song linking (feeds the Posts remix-tree) is hardcoded off in the UI. Zero frontend tests.',
backendTests: '25',
frontendTests: '0',
},
{
name: 'Discovery',
sub: 'Shazam-style ambient ID',
status: 'warn',
built: 'Identify a clip, 24h history, like/dismiss — real auth, correctly scoped.',
gaps: '"Liked" is a dead end — nothing converts it into a real library song. No rate limit on identify calls. Gemini fallback + lyrics fetch built but never called. Zero frontend tests.',
backendTests: '8',
frontendTests: '0',
},
{
name: 'Auth',
sub: 'Username/password login',
status: 'warn',
statusLabel: 'Backend + UI shipped',
built: 'Plain username/password is the primary login (PBKDF2-hashed, stdlib only, no bcrypt dependency), with refresh-token rotation and a real server-side logout that revokes the token — not just a client-side drop. Telegram phone/code (/auth/telegram/*) is now a separate account-linking flow, feeding the chat-scanning music-tagging feature rather than being the identity mechanism. Brute-force protection shipped 2026-08-16: 10 attempts per account per 15 minutes, 100 per source per hour, independent of the Telegram rate limiter despite sharing a table.',
gaps: 'Per-IP limiter on /auth/telegram/request_code (and the new /auth/login limiter) has no proxy-header handling, so every user could share one bucket in production. The real Telegram sign-in code path is fully mocked in every test. No frontend UI yet to actually link a Telegram account post-login.',
backendTests: '24',
frontendTests: '7',
},
]
type WorkStatus = 'ready' | 'needs-design' | 'blocked'
const WORK_STATUS_STYLES: Record<WorkStatus, string> = {
......@@ -150,49 +31,130 @@ interface WorkItem {
note?: string
}
const BACKEND_TODO: WorkItem[] = [
interface DoneGroup {
area: string
items: string[]
}
// --- Backend ---
const BACKEND_DONE: DoneGroup[] = [
{
item: 'Delete endpoints for library songs, playlists, and playlist tracks',
status: 'ready',
note: 'No DELETE exists for any of the three yet — straightforward owner-scoped CRUD, same pattern as everything else in library.py.',
area: 'Auth',
items: [
'Username/password register, login, refresh (rotating), logout (real server-side revoke) - PBKDF2, stdlib only',
'Telegram phone/code account-linking (/auth/telegram/*), separate from primary login',
'Rate limited: login (10 attempts/account/15min, 100/source/hr), Telegram request_code (5/phone/10min, 20/IP/hr) - independent of each other despite sharing a table',
],
},
{
item: "Rate limit Discovery's /discovery/listen identify endpoint",
status: 'ready',
note: 'Each call is a real Shazam + AcoustID request — currently uncapped per user.',
area: 'Soundmarks',
items: [
'Major/Business/Community tiers with tier-aware resolution logic',
'Full CRUD, proposals + voting, review queue, geocode proxy (Nominatim)',
],
},
{
area: 'Rooms',
items: [
'WebSocket: chat, reactions, DJ queue, pass-the-aux handoff, now-playing',
'Connection requires a verified access token, not a client-supplied user_id',
'Cross-user song streaming - a listener hears what the DJ actually picked',
],
},
{
area: 'Channels',
items: ['Create/follow/unfollow', 'Vibe sets, 24h audio stories, and showcase endpoints (built, no frontend yet)'],
},
{
area: 'Posts',
items: ['Feed, composer, recursive remix-tree endpoints', 'Cross-user streaming regardless of who uploaded the song'],
},
{
area: 'Live Location',
items: [
'Share / stop / distance-sorted nearby list / cross-user stream',
'Stale entries (>5min since last heartbeat) drop out of nearby results automatically',
],
},
{
area: 'Library & Playlists',
items: [
'Upload, tag, stream (Range-request capable), search, lyrics fetch',
'Playlists: create, list, detail with ordered tracks, add track',
'Delete: songs (+ file on disk), playlists (+ their tracks), single playlist tracks - all owner-scoped',
],
},
{
area: 'Remix',
items: [
'Real pipeline: Demucs stem separation, BPM/key detection, Gemini-planned arrangement, mastering',
'Auth-scoped end to end - job status and library-song sourcing both scoped to the owner (was an IDOR)',
],
},
{
item: 'Surface real identify-confidence feedback in Discovery',
area: 'Discovery',
items: ['Identify (Shazam + AcoustID), 24h history, swipe (like/dismiss)', 'Rate limited: 20 identify calls per user per 10 minutes'],
},
]
const BACKEND_TODO: WorkItem[] = [
{
item: 'Discovery → Library: source a real playable file for a liked match',
status: 'needs-design',
note: 'AcoustID candidates carry a score, but it\'s embedded in a source string ("AcoustID (72%)"), not a queryable field — and Shazam candidates carry no score at all. Needs a real schema decision, not just a passthrough.',
note: 'DiscoveredSong has no audio file at all today - ambient ID fingerprints a mic snippet then discards it. Needs a real answer for where a playable file would come from before there\'s anything for the frontend to save.',
},
{
item: 'Discovery → Library: make "liked" actually save a playable song',
item: 'Give Discovery candidates a real, queryable confidence field',
status: 'needs-design',
note: 'DiscoveredSong has no audio file at all today — ambient ID fingerprints a mic snippet then discards it. "Save to library" needs a real answer for where a playable file would come from.',
note: 'AcoustID candidates carry a score, but it\'s embedded in a source string ("AcoustID (72%)"), not a queryable field - and Shazam candidates carry no score at all. Needs a schema decision, not just a passthrough.',
},
{
item: 'Telegram chat scanning — auto-scan approved chats, tag and save songs',
item: 'Telegram chat scanning: auto-scan approved chats, tag + save songs',
status: 'needs-design',
note: 'A materially bigger scan-everything design than the current one-chat-at-a-time /auth/telegram/chats/{id}/music lookup.',
},
{
item: 'Proxy-aware IP detection for both rate limiters',
item: 'Proxy-aware IP detection for the rate limiters',
status: 'blocked',
note: 'Blocked on this box sitting behind a real load balancer/reverse proxy — request.client.host is correct for the current direct-to-IP setup.',
note: 'Blocked on this box sitting behind a real load balancer/reverse proxy - request.client.host is correct for the current direct-to-IP setup.',
},
]
// --- Frontend ---
const FRONTEND_DONE: DoneGroup[] = [
{ area: 'Auth', items: ['Login page: username/password + register, toggled in place', 'Route guards redirect to /login when signed out instead of showing a blank page'] },
{ area: 'Soundmarks', items: ['Nearby page: dark-themed map, tier-aware display, proposals + voting UI'] },
{ area: 'Rooms', items: ['RoomView: chat, reactions, DJ song picker, pass-the-aux controls, now-playing card'] },
{ area: 'Channels', items: ['List + follow/unfollow UI only - vibe sets/stories/showcase have no UI yet'] },
{ area: 'Posts', items: ['Feed, composer, recursive remix-tree view with "remix this" at every node'] },
{ area: 'Live Location', items: ['GeoDrops page: share toggle, live nearby list, cross-account playback, geo-playlist shuffle-play'] },
{ area: 'Library & Playlists', items: ['Library page with playback', 'Playlists page: list, create, view tracks, playback', 'Add-to-playlist modal from the Library page (add existing or create-and-add)'] },
{ area: 'Remix', items: ['Upload / progress / poll UI, end to end'] },
{ area: 'Discovery', items: ['Listen, 24h history, swipe UI'] },
]
const FRONTEND_TODO: WorkItem[] = [
{
item: 'Delete buttons for library songs, playlists, and playlist tracks',
status: 'ready',
note: 'Backend now supports all three (shipped 2026-08-18) - no UI calls them yet.',
},
{
item: 'Confirm dialogs on destructive actions',
status: 'ready',
note: 'Only one destructive action (deleting a soundmark) has a confirm dialog today - worth a real pass now that song/playlist/track deletes exist too.',
},
{
item: 'Channels: vibe sets, stories, showcase screens',
status: 'ready',
note: 'Backend endpoints already exist and work — zero UI.',
note: 'Backend endpoints already exist and work - zero UI.',
},
{
item: "Wire remix's library-song linking into the composer UI",
status: 'ready',
note: 'Backend already accepts library_song_ids on POST /remix — the UI just never sends it.',
note: 'Backend already accepts library_song_ids on POST /remix - the UI just never sends it.',
},
{
item: 'Library search box on the Library page',
......@@ -207,12 +169,9 @@ const FRONTEND_TODO: WorkItem[] = [
{
item: 'Test coverage for Upload, Discovery, and Remix pages',
status: 'ready',
note: 'All three are zero right now — no blockers, just needs writing.',
},
{
item: 'Volume control in the player',
status: 'ready',
note: 'All three are zero right now - no blockers, just needs writing.',
},
{ item: 'Volume control in the player', status: 'ready' },
{
item: 'Global error boundary',
status: 'ready',
......@@ -223,36 +182,88 @@ const FRONTEND_TODO: WorkItem[] = [
status: 'ready',
note: 'Some pages show a spinner/skeleton, others just render empty until data arrives.',
},
{ item: 'Persist playback position/volume across a reload', status: 'ready' },
{
item: 'Persist playback position/volume across a reload',
status: 'ready',
item: 'Show identify confidence / a clear "couldn\'t identify" state in Discovery',
status: 'blocked',
note: 'Blocked on the backend giving Discovery candidates a real confidence field first.',
},
{
item: 'Confirm dialogs on destructive actions',
item: 'Wire a "save to library" action for liked Discovery matches',
status: 'blocked',
note: 'Blocked on the backend delete endpoints above landing first — only one destructive action (deleting a soundmark) even exists to confirm right now.',
note: 'Blocked on the backend deciding where a playable file for a Discovery match would come from.',
},
{
item: 'UI to approve chats for scanning and see scan results',
status: 'blocked',
note: 'Blocked on the backend chat-scanning design landing first.',
},
{
item: 'Offline/connectivity-loss handling',
status: 'needs-design',
note: 'A dropped connection just makes requests silently fail one at a time right now — needs a real UX decision, not just a passthrough.',
note: 'A dropped connection just makes requests silently fail one at a time right now - needs a real UX decision, not just a passthrough.',
},
]
function DoneList({ groups }: { groups: DoneGroup[] }) {
return (
<div className="space-y-4 px-4 py-4">
{groups.map((g) => (
<div key={g.area}>
<p className="mb-1.5 text-[11px] font-bold uppercase tracking-wide text-neutral-600">{g.area}</p>
<ul className="space-y-1.5">
{g.items.map((item) => (
<li key={item} className="flex items-start gap-2 text-sm leading-relaxed text-neutral-300">
<CheckCircle2 size={14} strokeWidth={2} className="mt-0.5 shrink-0 text-emerald-500/70" />
<span>{item}</span>
</li>
))}
</ul>
</div>
))}
</div>
)
}
function TodoList({ items }: { items: WorkItem[] }) {
return (
<ul className="divide-y divide-neutral-800/80">
{items.map((work) => (
<li key={work.item} className="px-4 py-3">
<div className="mb-1 flex items-start justify-between gap-3">
<p className="text-sm font-medium text-white">{work.item}</p>
<WorkStatusPill status={work.status} />
</div>
{work.note && <p className="text-xs leading-relaxed text-neutral-500">{work.note}</p>}
</li>
))}
</ul>
)
}
function ColumnHeader({ title, dot, sub }: { title: string; dot: string; sub: string }) {
return (
<div className="flex items-center gap-2 border-b border-neutral-800 px-4 py-3">
<span className={`h-2 w-2 rounded-full ${dot}`} />
<span className="font-semibold text-white">{title}</span>
<span className="ml-auto text-[11px] text-neutral-500">{sub}</span>
</div>
)
}
export function Roadmap() {
return (
<Layout title="Status & Roadmap">
<p className="mb-8 max-w-2xl text-sm leading-relaxed text-neutral-400">
A full pass over both repos — what's live and working, what's built but unreachable, and where the
backend trusts something it shouldn't. Compiled 2026-08-15 from a direct audit plus live
cross-account testing.
A full pass over both repos, split cleanly by backend vs. frontend - what's done, what's left, and what
every "needs design" idea actually requires from each side. Compiled 2026-08-15, updated through 2026-08-18.
</p>
<div className="mb-10 flex flex-wrap gap-x-8 gap-y-4">
{[
['9', 'Feature areas'],
['0', 'Critical security gaps'],
['214', 'Backend tests'],
['227', 'Backend tests'],
['168', 'Frontend tests'],
['4', 'Pages w/ zero tests'],
].map(([n, l]) => (
......@@ -339,75 +350,28 @@ export function Roadmap() {
</div>
</section>
<section className="mb-10">
<div className="mb-3 flex items-center justify-between">
<h2 className="text-xs font-bold uppercase tracking-wide text-neutral-500">What we have</h2>
<span className="text-xs text-neutral-500">Nine feature areas, audited end to end</span>
</div>
<div className="grid gap-3 sm:grid-cols-2">
{FEATURES.map((f) => (
<div key={f.name} className="rounded-xl border border-neutral-800 bg-neutral-900 p-4">
<div className="mb-3 flex items-start justify-between gap-3">
<div>
<p className="font-semibold text-white">{f.name}</p>
<p className="text-xs text-neutral-500">{f.sub}</p>
</div>
<StatusPill status={f.status} label={f.statusLabel} />
</div>
<dl className="space-y-2 text-sm">
<div className="flex gap-2">
<dt className="w-12 shrink-0 pt-0.5 text-[11px] font-bold uppercase tracking-wide text-neutral-600">Built</dt>
<dd className="text-neutral-300">{f.built}</dd>
</div>
<div className="flex gap-2">
<dt className="w-12 shrink-0 pt-0.5 text-[11px] font-bold uppercase tracking-wide text-neutral-600">Gaps</dt>
<dd className="text-neutral-400">{f.gaps}</dd>
</div>
</dl>
<div className="mt-3 flex gap-4 border-t border-neutral-800 pt-3 text-xs text-neutral-500">
<span>
<b className="font-semibold text-neutral-400">{f.backendTests}</b> backend
</span>
<span>
<b className="font-semibold text-neutral-400">{f.frontendTests}</b> frontend
</span>
</div>
</div>
))}
</div>
</section>
<section>
<div className="mb-3 flex items-center justify-between">
<h2 className="text-xs font-bold uppercase tracking-wide text-neutral-500">What's next</h2>
<span className="text-xs text-neutral-500">Backend-first — UI/UX work is paused until this list is worked down</span>
<h2 className="text-xs font-bold uppercase tracking-wide text-neutral-500">Backend vs. frontend — done and to do</h2>
<span className="text-xs text-neutral-500">Backend-first — UI/UX work is paused until its list is worked down</span>
</div>
<div className="grid gap-4 lg:grid-cols-2">
{(
[
{ title: 'Backend', dot: 'bg-emerald-400', items: BACKEND_TODO },
{ title: 'Frontend', dot: 'bg-neutral-600', items: FRONTEND_TODO },
] as const
).map((col) => (
<div key={col.title} className="rounded-xl border border-neutral-800 bg-neutral-900">
<div className="flex items-center gap-2 border-b border-neutral-800 px-4 py-3">
<span className={`h-2 w-2 rounded-full ${col.dot}`} />
<span className="font-semibold text-white">{col.title}</span>
<span className="ml-auto text-[11px] text-neutral-500">{col.items.length} items</span>
<div className="rounded-xl border border-neutral-800 bg-neutral-900">
<ColumnHeader title="Backend" dot="bg-emerald-400" sub={`${BACKEND_TODO.length} to do`} />
<DoneList groups={BACKEND_DONE} />
<div className="border-t border-neutral-800 px-4 pb-2 pt-3">
<p className="text-[11px] font-bold uppercase tracking-wide text-neutral-600">To do</p>
</div>
<ul className="divide-y divide-neutral-800/80">
{col.items.map((work) => (
<li key={work.item} className="px-4 py-3">
<div className="mb-1 flex items-start justify-between gap-3">
<p className="text-sm font-medium text-white">{work.item}</p>
<WorkStatusPill status={work.status} />
<TodoList items={BACKEND_TODO} />
</div>
{work.note && <p className="text-xs leading-relaxed text-neutral-500">{work.note}</p>}
</li>
))}
</ul>
<div className="rounded-xl border border-neutral-800 bg-neutral-900">
<ColumnHeader title="Frontend" dot="bg-neutral-600" sub={`${FRONTEND_TODO.length} to do`} />
<DoneList groups={FRONTEND_DONE} />
<div className="border-t border-neutral-800 px-4 pb-2 pt-3">
<p className="text-[11px] font-bold uppercase tracking-wide text-neutral-600">To do</p>
</div>
<TodoList items={FRONTEND_TODO} />
</div>
))}
</div>
</section>
</Layout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment