Samples
Runnable demos in this monorepo (fixed ports for automation).
| Sample | Path | Port | SDK | Open |
|---|---|---|---|---|
| Express | samples/express-api | 3001 | @idebug/node | http://localhost:3001/\_\_idebug |
| NestJS | samples/nest-api | 3002 | @idebug/nest | http://localhost:3002/\_\_idebug |
| Database | samples/db-api | 3003 | @idebug/node + @idebug/db | http://localhost:3003/\_\_idebug |
| React | samples/react-app | 5173 | @idebug/react | Overlay in-page |
Run
pnpm install
pnpm build:packages
pnpm --filter sample-express-api start # or: dev (tsx watch)
pnpm --filter sample-nest-api start
pnpm --filter sample-db-api start # Drizzle + Knex call tree
pnpm --filter sample-react-app devEach sample folder has a README. The root monorepo README documents the full layout, CLI, and package map.
Demo routes (Express & Nest)
| Route | Purpose |
|---|---|
GET /health | Success |
GET /calc/add?a=1&b=2 | Logged module / @Loggable success |
GET /calc/divide?a=1&b=0 | Error path |
Database sample (sample-db-api)
In-memory SQLite. Wrap clients with instrumentDrizzle / instrumentKnex, wrap services with logModule, then inspect Call tree at /__idebug.
| Route | Purpose |
|---|---|
GET /users | Controller → service → Drizzle SELECT |
GET /users/1 | One request, two ORMs (Drizzle user/posts + Knex orders) |
POST /users | Insert; password redacted on the dbQuery |
GET /orders | Knex-only branch |
GET /stats | Concurrent Drizzle + Knex + raw traceQuery |
GET /demo/n-plus-one | N+1: one user list + one orders query per user |
GET /demo/slow | Function time vs query time |
GET /demo/error | Failed SQL on the same tree |
See @idebug/db and Database queries.
React sample
Buttons trigger fetch success, XHR success, and fetch failure. Open the floating ID control to inspect events.
Each sample folder has its own README with details.