Hacker

PREETHAM S

@preethams

Joined Oct 2026student at collegeIndia

Projects

  • Flagsmith Lens

    Flagsmith Experimentation HackathonNov 2026

    ### What did you build? We built **Flagsmith Lens** — an open-source developer toolbelt and Terminal User Interface (TUI) designed for software engineers and DevOps teams running self-hosted Flagsmith. It bridges the gap between self-hosted flag infrastructure and day-to-day coding workflows by providing: 1. An interactive, keyboard-driven Terminal Dashboard (`lens tui`). 2. An AST Codebase Drift Scanner (`lens audit`) that detects Ghost Flags and Dead Flags. 3. A Type-Safe Code Generator (`lens codegen`) that outputs strict TypeScript definitions. 4. A production-ready Docker Compose bootstrapper (`lens docker init`) bundling Flagsmith Core and the high-throughput Rust Edge Proxy. --- ### What problem does it solve? Self-hosting Flagsmith provides total data ownership and ultra-low latency, but developer experience often suffers: 1. **Context Switching:** Developers constantly interrupt their focus to switch between code editors and browser tabs just to toggle a flag or inspect its value. 2. **Ghost Flag Runtime Bugs:** Developers call flags in code before creating them in the dashboard, leading to silent fallback errors in production. 3. **Dead Flag Technical Debt:** Flags that are enabled 100% across all environments linger in codebases for months because engineers lose track of them. 4. **Lack of Type Safety:** Relying on raw strings for flag names leads to typos going undetected until runtime. --- ### Who would use it? - **Full-stack and Backend Developers** who use Flagsmith for feature branching, gradual rollouts, or microservice resilience. - **Platform & DevOps Engineers** self-hosting Flagsmith in private cloud/on-prem environments with the Rust Edge Proxy. - **Engineering Leads & Teams** looking to audit and eliminate feature flag technical debt across their codebases. --- ### How does it work? - **Terminal Control (`lens tui`):** Uses Textual and Rich to render an interactive CLI dashboard. Developers can switch environments (Dev/Staging/Prod) with `Tab`, filter flags in real-time with `/`, and toggle flags with `Spacebar` via the Flagsmith Management API. - **Static AST Analysis (`lens audit`):** Parses the Abstract Syntax Tree of TypeScript, JavaScript, and Python files to extract flag calls. It cross-references them against active Flagsmith flags to alert on Ghost Flags (missing in Flagsmith) and Dead Flags (100% rolled out). - **Type Generation (`lens codegen`):** Connects to the Flagsmith environment schema and generates strict string-literal unions (`flags.d.ts`), enabling IDE autocomplete and compile-time verification. - **Self-Hosted Infrastructure (`lens docker init`):** Automates the setup of PostgreSQL 15, Flagsmith Core, and the Rust Edge Proxy (`edge-proxy-rs`) for sub-millisecond local evaluation.