Knokr Base
The administrative backbone of the Knokr ecosystem — a multi-tenant back office managing the full lifecycle of data across 60,000+ artists, 1,500+ festivals, 1,000+ venues, and 25,000+ events.
- role
- Solo founder & engineer
- status
- Active
- years
- 2024 — present
01The problem
Managing 60,000+ artists, 1,500+ festivals, 1,000+ venues, and 25,000+ events requires more than a spreadsheet. The data relationships are complex — artists play at multiple festivals across years, festivals share artists, genres overlap and evolve, venues host events across different promoters, and ownership of any entity may need to transfer between users. The music industry needed a purpose-built back office that could handle entity management, content publishing, team collaboration, and data enrichment at scale — while feeding multiple consumer-facing applications from a single source of truth.
02What I built
Knokr Base is a multi-tenant CMS and administrative platform designed specifically for the music industry. It manages the full lifecycle of artist, venue, festival, and sponsor data — from image uploading and lineup management to graph-based discovery and AI-powered data enrichment. Every entity gets its own managed presence, every user gets their own site at /f/[username], and the platform serves as the data backbone for the entire Knokr ecosystem (knokr-lineups, knokr-media, knokr-predictor, mojo-boston, and any future apps).
03Key decisions
Database-driven routing
URLs are defined in the database via NavigationItem records rather than filesystem paths. This means content changes don't require code deployments — users can create pages, restructure navigation, and publish content entirely through the CMS. It required building a routing engine that resolves database records at request time while maintaining performance through Redis caching.
Multi-tenant entity architecture
I designed a two-layer system separating entity types (Artist, Venue, Festival, Sponsor tables with type-specific fields) from a unified Project container that provides common functionality. Each user gets their own namespace at /f/[username], with strict data isolation enforced at the query level. This lets the same infrastructure serve individual artists, festival organizers, and venue managers without cross-contamination.
Six-tier permission system
SUPER_ADMIN, ADMIN, PUBLISHER, EDITOR, AUTHOR, and READER roles with three-layer route protection (middleware → layout → component). Permission checks are Redis-cached, achieving 90–95% latency reduction on authorization. The system includes audit logging for sensitive actions and ownership transfer workflows.
Music discovery graph
A graph-based artist discovery system using festival co-occurrence data — if two artists frequently appear at the same festivals, they're likely related. The system uses Node2Vec embeddings to learn artist representations from the co-occurrence graph, then applies Louvain community detection to identify music scenes automatically. An anti-popularity scoring mechanism ensures recommendations surface emerging artists rather than defaulting to headliners.
Background worker architecture
Four BullMQ workers handle computationally intensive tasks without blocking the main application: a graph-worker for relationship computation, an embedding-worker for vector generation, an insights-worker for analytics processing, and a social-card-worker for automated social media image generation. A separate Python service handles scene detection and graph analysis.
Vector search with enhanced embeddings
OpenAI text-embedding-3-small generates embeddings enriched with artist metadata — country, region, genres, gender — enabling semantic search that understands queries like "female electronic artists from Berlin" without exact keyword matching.
04Architecture
Next.js 16 with React 19, TypeScript, PostgreSQL with pgvector, Prisma ORM, Redis, BullMQ, OpenAI API, Clerk authentication, AWS S3 with CloudFront, HeroUI with Tailwind CSS 4, Sentry for monitoring with Winston structured logging. Deployed to Railway.
05Testing
614 test files across Vitest, Playwright, and Testcontainers. Tests cover API endpoints with real PostgreSQL instances via Testcontainers, permission and RBAC validation, data isolation between tenants, organization workflows, and multi-tenant boundary enforcement. Memlab handles memory leak detection. The project maintains 106+ detailed implementation guides in documentation.
06What this enables
Knokr Base's shared PostgreSQL infrastructure feeds every application in the ecosystem — Knokr Lineups (public discovery at knokr.com), Knokr Media (photo and video platform), Knokr Predictor (FastAPI lineup-prediction service), Mojo Boston (white-label festival sites), and the legacy Orchestra and Nuncio experiments. The data model has proven robust enough to support distinct consumption patterns — admin CMS, public site, media library, prediction engine, white-label tenants — all from a single source of truth.