✦ OPEN TO WORK // SENIOR FULL-STACK & APPLIED AI ✦ REAL-TIME WEBSOCKETS & DISTRIBUTED SYSTEMS ✦ MUMBAI, INDIA [UTC +5:30] ✦ OPEN TO WORK // SENIOR FULL-STACK & APPLIED AI ✦ REAL-TIME WEBSOCKETS & DISTRIBUTED SYSTEMS ✦ MUMBAI, INDIA [UTC +5:30] ✦ OPEN TO WORK // SENIOR FULL-STACK & APPLIED AI ✦ REAL-TIME WEBSOCKETS & DISTRIBUTED SYSTEMS ✦ MUMBAI, INDIA [UTC +5:30]
arrow_back All Projects
CASE STUDY · DEVELOPER TOOL
WEB UTILITY PRODUCTION // LIVE FASTAPI + NEXT.JS ISR

Colorchef

Decoupled 'Ghost' Architecture: Next.js ISR, FastAPI Clustering & Git-as-a-Database

ROLE Creator & Full-Stack Developer
CORE TECHNOLOGIES
Next.js FastAPI (Python) TypeScript Git-as-a-Database
PRIMARY HIGHLIGHT Zero-cost Git-as-a-Database CMS & global CDN Private local FastAPI backend with TMDB sync

01. Context & Overview

Colorchef is a modular, all-in-one color and UI utility platform designed for indie developers, designers, and solopreneurs. It streamlines visual decision-making around colors, box shadows, dark themes, and UI components while serving as an aesthetic Cinema Palette Discovery Engine.

The project spans a three-tier decoupled “Ghost” architecture:

  • colorchef-next (Frontend UI & Discovery Engine): Built with Next.js (App Router, Incremental Static Regeneration) and Tailwind CSS, featuring Firebase for authentication and saved palettes.
  • colorchef-server (Local Extraction & Ingestion Engine): A dedicated Python FastAPI backend with asynchronous HTTPX, custom color clustering algorithms, and TMDB API synchronization. Intended strictly for local private execution so that no write-capable endpoints are exposed to the public internet.
  • colorchef-data (Single Source of Truth / Decoupled CMS): A Git repository serving as a version-controlled database and global CDN for static JSON assets, enabling hot-swappable business logic without frontend redeployments.

The platform provides six specialized design modules:

  1. 🎨 Colors: Generate and tweak harmonious color palettes (contrast-based or random) with one-click HEX clipboard copy.
  2. 🪞 Shadows: Visual box-shadow builder with real-time controls for offset, blur, spread, and opacity, exporting ready-to-paste CSS.
  3. 🌒 Dark Palette: Transform light palettes into accessible, contrast-adjusted dark theme variants while maintaining visual harmony.
  4. 🔘 Buttons: Design customizable interactive buttons with instant previews for normal, hover, and disabled states.
  5. 📐 Golden Ratio: Generate balanced palettes mathematically using golden ratio proportions or custom user-uploaded images.
  6. 🎬 Cinema: Discover aesthetic color palettes extracted directly from curated movie posters and high-resolution backdrops.

02. The Constraints & Needs

Building a high-performance, content-rich design discovery platform for indie developers required solving three key engineering constraints:

  1. Zero-Cost, High-Security Infrastructure: Exposing public admin REST endpoints and maintaining managed relational or document databases incurs ongoing cloud hosting costs and opens web attack surfaces. Colorchef uses a “Ghost” architecture where admin ingestion runs entirely locally and commits to Git.
  2. Algorithmic Palette Extraction from Cinematic Backdrops: Converting raw film posters and movie backdrops into cohesive, high-aesthetic 5-color palettes requires custom clustering algorithms that extract dominant tones while discarding visual noise.
  3. Hot-Swappable Business Logic without Frontend Redeploys: Modifying discovery taxonomy, horizontal filter bars (e.g., promoting “Cyberpunk” or “Folk Horror”), or search synonyms needed to occur dynamically without triggering full Next.js rebuilds or redeployments.
MovieDataAndConfigContract
JSON SCHEMA
// Contract schema definition
{
"slug": *req <string> // URL-friendly film identifier (e.g. 'blade-runner-2049')
"title": *req <string> // Official movie title and release year metadata
"backdrop_path": *req <string_url> // High-resolution TMDB backdrop image URI
"palette": *req <string[]> // Array of extracted HEX color codes from clustering pipeline
"curated_filters": *req <string[]> // Hot-swappable homepage category filters defined in config.json
"niche_map": *req <record<string, string[]>> // Smart search synonym expansion mappings (e.g. 'jinn' → 'islamic horror')
}

03. System Architecture & Data Flow

Colorchef’s decoupled multi-layer architecture separates local administrative operations from public edge delivery:

ARCHITECTURE SCHEMATIC

Colorchef Decoupled 'Ghost' Architecture

01
Local Metadata Ingestion (TMDB API) FASTAPI + HTTPX ASYNC

Local Python server triggers POST /admin/cinema/sync, fetching movie metadata and high-resolution backdrops asynchronously via TMDB.

arrow_downward
02
Dominant Palette Extraction CUSTOM CLUSTERING

Applies image clustering algorithms across backdrop pixels to extract aesthetically balanced HEX color palettes.

arrow_downward
03
Git-as-a-Database Deployment GIT REPO (SSOT)

Rebuilds lightweight index.json, movie records, and config.json, committing directly to the colorchef-data repository.

arrow_downward
04
Next.js ISR Consumption & Edge Delivery NEXT.JS APP ROUTER

Next.js frontend fetches static JSON from GitHub/CDN via Incremental Static Regeneration (ISR) with zero database overhead.

arrow_downward
05
Interactive Client Utility Suite TAILWIND + FIREBASE

Client browser renders responsive UI tools (Colors, Shadows, Dark Palette, Buttons, Golden Ratio) with Firebase user auth.

04. Protocol & Sequence Lifecycle

The lifecycle trace below outlines how new cinema palette data moves from local administrative sync through the Git repository into the live Next.js application:

PROTOCOL LIFECYCLE

Cinema Ingestion & ISR Static Delivery Trace

Local Admin
FastAPI Server
TMDB API
Git Data Repo
Next.js Frontend
#1 Local Admin → FastAPI Server : POST /admin/cinema/sync: Trigger film ingestion batch
1ms
#2 FastAPI Server → TMDB API : Async HTTPX: Fetch movie details and backdrop URLs
180ms
#3 FastAPI Server → FastAPI Server : Execute color clustering algorithm on image buffer
45ms
#4 FastAPI Server → Git Data Repo : Commit updated movies/{slug}.json and index.json
120ms
#5 Next.js Frontend → Git Data Repo : GET /index.json via raw GitHub CDN
35ms
#6 Next.js Frontend → Local Admin : ISR builds static cinema page with extracted palette
12ms

05. Benchmark & Evaluation Matrix

Comparing traditional cloud-hosted database systems with Colorchef’s Decoupled “Ghost” Architecture:

ARCHITECTURE MATRIX

Architecture & Operational Decisions

Comparative evaluation across design constraints and implementations

swipe Swipe horizontally to inspect full matrix
System Area Conventional Stack Colorchef Architecture Operational Result
Database Hosting Cost $25–$60 / month (Hosted SQL / MongoDB) $0.00 / month (Git repository SSOT) 100% Infrastructure cost elimination
Admin Ingestion Security Public REST write endpoints exposed to internet Local-only 'Ghost' FastAPI service Zero external write attack surface
Discovery Logic Updates Frontend redeployment for filter or tag changes Hot-swappable config.json (niche_map & filters) Instant zero-downtime reconfiguration
Palette Processing Heavy client-side image processing on every load Asynchronous backend clustering with Next.js ISR Static edge delivery with fast page loads

06. Key Engineering Learnings

  1. Git as a Database for Editorial Systems: For content with frequent reads and infrequent, controlled writes, using a version-controlled Git repository (colorchef-data) as an SSOT provides an immutable audit log, automated CDN distribution, and zero operational hosting costs.
  2. Private “Ghost” Backends Minimize Risk: Keeping write-heavy administrative ingestion processes (colorchef-server) strictly on local development machines completely eliminates public API vulnerability surfaces and removes the need for complex web application firewall setups.
  3. Hot-Swappable Configuration Drives Agility: Isolating business parameters—such as curated_filters and the niche_map synonym expansion layer—in config.json allows instant changes to category promotion and smart search without modifying React components or redeploying the Next.js frontend.
  4. Modular Utility Architecture: Designing standalone, single-purpose UI tools (Colors, Shadows, Dark Palette, Buttons, Golden Ratio) keeps client bundles lean while enabling seamless cross-module workflows for developer workflows.