Ad Hoc Data Platform
Production PlatformThree refactor iterations: from legacy AngularJS to an Angular 21 SSR platform with a dual-database selection tool
Overview
Over three refactor iterations I rebuilt Ad Hoc Data's entire web platform: from a legacy AngularJS marketing site and selection tool to a modern Angular 21 application with server-side rendering. The platform now combines a fully SEO-optimized marketing site with a dual-database selection tool: KVK Pro (3.7 million Dutch companies, refreshed monthly from the official trade register) and AI Leads (3.4 million web-indexed companies across the Netherlands, Belgium, Germany and France, refreshed daily).
The Challenge
The original stack was legacy AngularJS: client-side rendered (invisible to search engines), hard to maintain, and built around a single database. The business needed geographic search, then a modern design system, and eventually a second data product with a completely different filter model — all while the existing tool kept serving paying customers in production. That forced an iterative approach instead of a big-bang rewrite.
The Solution
Three iterations, one platform
Iteration 1: refactored the legacy Angular 1.x selection tool and added geographic search with GeoJSON polygons and Turf.js — finding companies by province, arrondissement, or postal code area on the Belgian database (1.2M companies). Iteration 2: rebuilt the tool around industry-standard lead-gen UX (Apollo-style): sidebar filter navigation, a credits system, and live result counts. Iteration 3: full rebuild as Angular 21 SSR with a new, dual-database selection tool.
Dual-database selection tool
A database switcher lets users select from KVK Pro (official trade register data) or AI Leads (web-indexed companies) — each with its own filter registry, since the filter models never cross databases. Live record counts update on every filter change via a signal-based FilterStore, and users can export two separate lists in one flow with combined pricing.
3,800+ technology filters
The AI Leads database is filterable on the technology a company's website runs (Shopify, WordPress, HubSpot, Salesforce — 3,800+ detectable technologies), plus TLD, languages, B2B/B2C classification and verified contact data. KVK Pro filters cover SBI industry codes, legal form, building/energy-label data and fine-grained location trees.
SEO architecture
Server-side rendering via Node/Express, dual-language NL/EN with hreflang pairs, JSON-LD structured data, canonical tags, and Sharp-generated WebP images. Backed by PostgreSQL with Drizzle ORM, deployed on Railway, and regression-tested with Playwright across 10 viewports.
Key Features
Dual Database
KVK Pro (3.7M) + AI Leads (3.4M) behind one switcher
Live Counts
Matching record count updates on every filter change
3,800+ Tech Filters
Filter companies by the technology their website runs
Geographic Search
GeoJSON polygons: provinces, municipalities, postcodes
Angular 21 SSR
Server-rendered, crawlable, NL/EN with hreflang
Playwright Testing
Automated checks across 10 viewport sizes
From legacy to platform
The three iterations, with artifacts from each stage.
Refactor + geographic search
Refactored the legacy Angular 1.x selection tool and added geographic search: GeoJSON polygons with Turf.js to find companies by province, arrondissement, or postal code area on the Belgian database (1.2M companies). Try it below — this is the actual map interaction.
Apollo-style rebuild
Rebuilt the tool around industry-standard lead-gen UX, inspired by tools like Apollo: sidebar filter navigation, a credits system, live result counts, and a focus mode. Drag the slider to compare the legacy interface with this iteration.


Angular 21: one platform, two databases
Complete platform rewrite as Angular 21 SSR. The selection tool now starts with a database choice — KVK Pro (3.8M Dutch companies from the official register) or AI Leads (3.4M web-indexed companies) — each with its own filter set, live counts, and a dual-export flow.



Results
Three major iterations shipped while the tool kept serving paying customers
7.1 million company records searchable across two databases and four countries
Live counts before export — pay-per-record from €0.09, no subscription required
Legacy AngularJS fully replaced by a maintainable Angular 21 SSR codebase
Every route server-rendered and indexable, with structured data and hreflang