
AdFlow
Ad Tech · SaaS
NestJS · Next.js · PostgreSQL · Redis · TypeORM · VAST 4.0 · AWS
2025
Companies running serious ad spend bleed margin to platforms they don’t own — Google Ad Manager, The Trade Desk, DoubleClick. Platform fees, audience data sitting on someone else’s servers, targeting locked to whatever the vendor chooses to expose.
The brief was to build the full stack — ad server, targeting engine, creative delivery, impression pipeline, analytics — and run it on infrastructure the business actually controls.
A NestJS ad server with an in-memory campaign cache refreshed every thirty seconds, so the serve path almost never hits Postgres. Contextual targeting on weather, location, and time of day — no cookies, no personal data, GDPR-clean by construction.
Impression events push to a Redis queue in microseconds and batch-flush to Postgres every five seconds in groups of five hundred — the serve path is never blocked on a database write.
A VAST 4.0 XML endpoint for video players, async JS tag for banner and rich media, and a weather-targeting layer wrapping OpenWeatherMap with a ten-minute Redis cache and a safe “any” fallback so serving never stops when the upstream does.
End-to-end serve under fifty milliseconds, including IP geolocation, weather lookup, targeting evaluation, and creative selection. VAST 4.0 compliant — drops into any standard video player.
The dashboard shows impressions, CTR, and weather and location breakdowns live, with no CSV exports and no third-party platform in the loop.
