Inspiration
Google Analytics, Mixpanel, and Sentry each solve one slice of the "understand your users" problem — but stitching them together means juggling three dashboards, three SDKs, and three privacy policies, plus cookie-consent banners that hurt conversion and user trust. I wanted a single, lightweight SDK that gives developers analytics, funnel tracking, and error visibility without a single cookie or a bloated bundle.
What it does
Ucoder Insights is a production-grade, privacy-first, cookie-free web analytics SaaS. A single SDK under 8.75KB drops into any site and gives you:
- Real-time pageview and event analytics
- Multi-step funnel tracking with conversion rates
- A unified dashboard replacing the need for separate GA, Mixpanel, and Sentry tools
- No cookies, no consent banners, no personal data collection
How I built it
The backend runs on Node.js, TypeScript, and Express, with Next.js and React powering the dashboard (styled with Tailwind CSS and Shadcn UI, using Context API for client state and React Query for server state).
Data is split across two stores by purpose: MongoDB handles raw event ingestion as a time-series collection with a 7-day retention window, while Supabase (PostgreSQL) holds the durable, structured side — funnels, funnel steps, sync checkpoints, and pre-computed funnel results. A BullMQ repeatable job runs every 30 minutes, incrementally archiving events from MongoDB into a FunnelEventArchive collection (with a dynamic per-document TTL) and syncing checkpoints forward. Funnel conversion numbers are pre-computed on that cadence rather than calculated live, so the dashboard just reads from funnel_results — keeping it fast even as event volume grows.
The whole stack is deployed on an Azure VM behind Docker, Nginx, PM2, and Cloudflare.
Challenges I ran into
- Zero-conversion funnels that should've had data. Traced through three separate causes over time: MongoDB seed data pointing at the wrong funnel, stale Redis cache masking real numbers, and a MongoDB Compass JSON import that was silently dropping
eventTimefields. - A Next.js hydration mismatch from calling
Date.now()outside anisMountedguard, causing server/client render differences. - A React Query race condition after login, fixed by adding an
isFetchingcheck and explicitly callingsetQueryData. - Middleware that silently never ran — the file was named
proxy.tsinstead ofmiddleware.ts, so Next.js never picked it up. - A production CORS 500 error on the public API domain caused by a subdomain missing from the Express
allowedOriginsarray — resolved by opening the public SDK config route to all origins while keeping strict checks on authenticated routes.
Accomplishments that I'm proud of
Building and shipping a real, production analytics SaaS solo — from raw event ingestion through pre-computed funnel analytics to a live dashboard — while keeping the client SDK under 8.75KB and fully cookie-free.
What I learned
Deep, practical experience with time-series data modeling and TTL strategies in MongoDB, incremental checkpoint-based background processing with BullMQ, and diagnosing subtle full-stack bugs that span database, cache, and framework layers rather than living in one place.
What's next for Ucoder Insights
Continuing to build out the analytics feature set and grow adoption through a developer-led strategy — targeting final-year students on a free tier who carry Ucoder Insights with them into their professional roles.
Built With
- azure
- cloudflare
- docker
- fumadocs
- next.js
- nginx
- node.js
- react
- redis
- supabase
- tailwind-css
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.