The problem
I took over an internal CRM that was supposed to help the sales team — instead it was the bottleneck. Reporting didn't work. The task system was unusable, so nobody used it. The interface fought the people who depended on it every day.
Underneath, the database had grown organically over years into an unoptimized sprawl: customer and order data scattered across 15+ legacy tables, every interaction type in its own isolated log, and a separate ERP re-keyed by hand to stay aligned. Nothing was fast, and nothing could be trusted end to end.
What I built
Rebuilt on a clean, optimized schema: UUID primary keys with JSONB columns for the parts that genuinely vary (turnover history, enrichment, metadata) — flexible without losing referential integrity. The 15+ tables and 5+ scattered logs collapsed into one customer timeline.
Reporting that actually runs. A task system the team uses instead of avoids. ERP sync went automatic through a dual-key match (relation number + ERP id) instead of manual re-entry, with flexible tagging and GDPR unsubscribe handling built into the data layer. The tool went from the daily friction to the daily driver.
Stack
Retool · Postgres · JSONB · UUID · ERP sync · GDPR