← Back to projects
LSN Hub
Active

From CSV Time Tracker to Full Newsroom Operations Platform

Internal operations hub for Los Santos News — AI content generation with Claude, browser-based video-to-GIF via FFmpeg.wasm, guided story building workflow, 4-tier employee lifecycle management, Discord bot with credential delivery, and shift analytics. 15 Vercel serverless endpoints, 20+ migrations, PostgreSQL RLS, and dual-environment deployment.

ReactViteSupabaseClaude APIFFmpeg.wasmTailwind CSS
Dashboard — 6 tools, one newsroom. Select a module to start working.
100%
👤
LSN Staff
Logs in with email/pass
Vite + React
SPA with hash routing
🔐
Supabase Auth
JWT, 24h TTL
🛡️
Row-Level Security
4-tier role enforcement
🗄️
PostgreSQL
Roster + shifts + profiles
📄
CSV Parser
Dual-format, encoding fallback
Shift Builder
Pair events + flag anomalies
📊
Analytics
Recharts, 7d-90d ranges
Phase 0Core PlatformTap a node for details
Key component
Infrastructure
Data flow
Core Platform
Phase 0

The foundation — Supabase Auth with JWT (24h TTL), PostgreSQL Row-Level Security enforcing a 4-tier role hierarchy (Admin > Editor > Creator > Viewer), employee roster with Steam ID matching, and CSV-based shift analytics with anomaly detection.

What Ships
Supabase Auth with email/password + forced password reset gate
Row-Level Security — 4-tier enforcement via is_admin(), is_editor_or_admin(), get_my_role()
Roster — employee directory with rank, certs, callsigns, Steam name/hex, Discord username
Time Tracker — CSV upload with dual-format parsing (clock events + paired in/out)
Shift Builder — clock in/out pairing with anomaly flags (>4h long, <30m short, missing clock-out)
Analytics — Recharts area/bar charts, 7d/14d/30d/90d/custom ranges, color-coded performance tiers
3-pass auto name matching (exact, normalized case/spacing, reversed name order)
localStorage fallback with Supabase cloud sync (fast offline, authoritative online)
Impact
LSN staff have secure, role-isolated access to shift data and employee records. Multi-tenancy is structurally enforced at the database level — data leaks are impossible by design.
Capability Comparison
Phase 0: Core PlatformPhase 1: Content EnginePhase 2: Production BayPhase 3: Admin & DiscordPhase 4: Voice RewriteLevel 1: Basic RAGLevel 2: Multi-Source RAGLevel 3: Hybrid + Feedback RAGLevel 4: Agentic RAG
Tools AvailableRoster + Time Tracker+ Content Tools + Field Kit + Library+ Story Builder + Edit Bay (Video Clipper)+ Admin Panel + Discord Bot+ Voice rewrite+ pgvector RAG+ Knowledge docs+ Story arcs + Locations+ AI query planning
API Endpoints0 (client-only)4 (generate, fieldkit, image, audit)4 (same — new tools are client-side)15 (+8 admin + Discord interactions)15 (same)16 (+embed)17 (+chunk)18 (+arcs)19 (+quality gate)
AI IntegrationNoneClaude API (dual output)Claude API (via Story Builder)Claude API + Discord bot responsesClaude + voice rules+ vector similarity+ multi-source RAG+ hybrid search + feedback+ agentic retrieval
Auth & SecuritySupabase Auth + RLSSame + rate limitingSame + audit relaySame + Ed25519 + immutable audit logSameSame + embed keySameSameSame
Content TypesShift data onlyArticles, posts, field reports+ GIFs, overlays, media+ User profiles, credentialsSameSame+ Knowledge chunks+ Story arcs+ Quality scores
Migrations001-008009-014015-016017-020020 (same)021022-023024-025026
DiscordNoneNoneNoneBot + slash commands + credential threadsSameSameSameSameSame
Data Sources0 (prompt only)2 (Library + Roster)4+ (+ Knowledge + Lore)6+ (+ Locations + Arcs)6+ (AI-selected)
Search TypeNoneVector similarityVector similarityHybrid (vector + keyword)Agentic (AI-driven)
RAG LearningStaticStaticStaticFeedback loopSelf-evaluation
Token Budget+~200+~800-1200+~1000-1500+~1200-1800+~2000-3000
Latency Impact+0ms+250-500ms+300-600ms+400-800ms+1-3s