APILensAPILens
About

Built because Datadog was too expensive for my side project

APILens started as a personal tool. Now it's free for every Node.js developer.

The problem I kept hitting

Every time I shipped a Node.js API — whether a freelance project or a side product — I'd immediately lose visibility the moment it hit production. I could see that something was slow, but not which route, not which database query, and definitely not the N+1 patterns hiding in my Mongoose code.

The “right” answer was Datadog or New Relic. Both require a full agent install, 15–30 minutes of config, and cost $23/host/month before you've seen a single metric. For a project making $0, that math doesn't work.

So I built the tool I wanted: one app.use() call, zero infrastructure, zero config — and a real-time dashboard that shows latency, errors, slow routes, and database queries the moment your first request lands.

What APILens actually does

Request / response logging

Every route, status code, duration — aggregated per endpoint, not per request.

Database query profiling

Auto-instruments pg, mysql2, mongoose, prisma, knex, sequelize, ioredis, better-sqlite3. Zero code changes.

N+1 detection

Flags routes that fire the same query pattern 3+ times in a single request cycle.

Distributed tracing

Propagates traceId headers across microservices so you can follow a request end-to-end.

Real-time dashboard

Charts, live tail, error breakdown, slow endpoint list — hosted at apilens.rest/dashboard.

Alerts

Email alerts when error rate or p95 latency crosses your threshold.

The person behind it

I'm Rahul Patel, a full-stack developer focused on Node.js backends and developer tooling. I've been building APIs professionally for several years and have run into the same observability pain across every project — freelance clients, internal tools, and personal products alike.

APILens is an indie project. That means fast decisions, direct support, and no enterprise sales process. If something is broken or confusing, open a GitHub issue and I'll look at it.

The npm package (auto-api-observe) is MIT-licensed. Use it however you like.

Tech stack

The middleware is zero-dependency TypeScript. The cloud pipeline is Node.js + PostgreSQL + Redis. The dashboard is Next.js 14 with Clerk auth. Nothing exotic — the goal is something you can trust in production without reading 10 pages of documentation.

TypeScriptNode.jsExpress / FastifyNext.js 14PostgreSQLRedisClerkResendVercel + Railway