// PROJECT CASE STUDY

Prisma Lens.

Visual query analyzer and schema relationship visualizer for Prisma ORM databases.

Role

Full Stack Engineer

Timeline

3 Months · 2023

Prisma Lens
// 01. OVERVIEW

system architecture & goal.

Prisma Lens inspects Prisma query logs in real time, detecting N+1 query patterns, indexing bottlenecks, and generating interactive ER diagrams directly from schema.prisma definitions.

Core Architectural Highlights

Real-time query execution flamegraphs.

Automated N+1 detection with instant fix recommendations.

Interactive canvas graph visualization powered by React Flow.

// 02. TECHNICAL HURDLES

challenges & engineering solutions.

01

Rendering Massive ER Diagrams

The Challenge

Schemas with 100+ relations caused severe canvas lag and frame drops.

The Solution

Implemented level-of-detail viewport culling and WebGL hardware acceleration.

Key Takeaway:

Graph visualization requires spatial index partitioning for large datasets.

// 03. ROADMAP

future improvements.

Milestone 01

Support for Drizzle and Kysely ORM schema analysis.

Milestone 02

AI-driven index suggestion generator based on slow query logs.