{"id":50048772,"url":"https://github.com/alihassan161820/nodejs-telescope","last_synced_at":"2026-05-21T08:04:42.777Z","repository":{"id":344255054,"uuid":"1181131167","full_name":"alihassan161820/NodeJs-Telescope","owner":"alihassan161820","description":"Laravel Telescope for Node.js — debugging \u0026 monitoring dashboard for Express, NestJS, and Fastify. 18 watchers, 3 storage drivers, real-time dashboard.","archived":false,"fork":false,"pushed_at":"2026-04-02T14:23:18.000Z","size":580,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T16:16:23.453Z","etag":null,"topics":["dashboard","debugging","developer-tools","devtools","express","fastify","laravel-telescope","monitoring","nestjs","nodejs","observability","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alihassan161820.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-13T19:31:48.000Z","updated_at":"2026-04-02T14:23:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alihassan161820/NodeJs-Telescope","commit_stats":null,"previous_names":["alihassan161820/nodejs-telescope"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alihassan161820/NodeJs-Telescope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alihassan161820%2FNodeJs-Telescope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alihassan161820%2FNodeJs-Telescope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alihassan161820%2FNodeJs-Telescope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alihassan161820%2FNodeJs-Telescope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alihassan161820","download_url":"https://codeload.github.com/alihassan161820/NodeJs-Telescope/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alihassan161820%2FNodeJs-Telescope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33293472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","debugging","developer-tools","devtools","express","fastify","laravel-telescope","monitoring","nestjs","nodejs","observability","typescript"],"created_at":"2026-05-21T08:04:39.819Z","updated_at":"2026-05-21T08:04:42.768Z","avatar_url":"https://github.com/alihassan161820.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Telescope\n\n**Laravel Telescope for the Node.js ecosystem.** A debugging and monitoring dashboard that gives you full visibility into your application's requests, exceptions, logs, queries, and more.\n\n[![npm version](https://img.shields.io/npm/v/@node-telescope/core.svg)](https://www.npmjs.com/package/@node-telescope/core)\n[![npm downloads](https://img.shields.io/npm/dm/@node-telescope/core.svg)](https://www.npmjs.com/package/@node-telescope/core)\n[![CI](https://github.com/alihassan161820/NodeJs-Telescope/actions/workflows/ci.yml/badge.svg)](https://github.com/alihassan161820/NodeJs-Telescope/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-green.svg)](https://nodejs.org/)\n\n---\n\n## Screenshots\n\n### Requests Dashboard\n![Requests List](docs/screenshots/requests-list.png)\n\n### Request Replay\nReplay any captured request directly from the dashboard. Click \"Replay Request\" to re-send it to your server and see the live response.\n\n![Request Detail with Replay](docs/screenshots/request-detail-replay.png)\n\n### Queries with Slow Query Detection\n![Queries List](docs/screenshots/queries-list.png)\n\n### Job Queue Monitoring\n![Jobs List](docs/screenshots/jobs-list.png)\n\n---\n\n## Quick Start\n\n### Express\n\n```bash\nnpm install @node-telescope/express @node-telescope/storage-sqlite\n```\n\n```ts\nimport express from 'express';\nimport { telescope } from '@node-telescope/express';\n\nconst app = express();\napp.use(telescope());\n\napp.listen(3000);\n// Dashboard: http://localhost:3000/__telescope\n```\n\n### NestJS\n\n```bash\nnpm install @node-telescope/nestjs @node-telescope/storage-sqlite\n```\n\n```ts\nimport { Module } from '@nestjs/common';\nimport { TelescopeModule } from '@node-telescope/nestjs';\n\n@Module({\n  imports: [TelescopeModule.forRoot()],\n})\nexport class AppModule {}\n// Dashboard: http://localhost:3000/__telescope\n```\n\n### Fastify\n\n```bash\nnpm install @node-telescope/fastify @node-telescope/storage-sqlite\n```\n\n```ts\nimport Fastify from 'fastify';\nimport { telescopePlugin } from '@node-telescope/fastify';\n\nconst app = Fastify();\nawait app.register(telescopePlugin);\n\nawait app.listen({ port: 3000 });\n// Dashboard: http://localhost:3000/__telescope\n```\n\nThat's it. Zero config. SQLite auto-creates, all watchers enabled, dashboard served at `/__telescope`.\n\n---\n\n## Features\n\n### 18 Watchers (mirrors Laravel Telescope 1:1)\n\n| Watcher | What it captures |\n|---------|-----------------|\n| **Request** | HTTP requests, responses, status codes, duration |\n| **Exception** | Uncaught exceptions and unhandled rejections |\n| **Log** | `console.log/info/warn/error/debug` calls |\n| **Query** | Database queries with duration and slow query detection |\n| **Model** | ORM model events (created, updated, deleted) |\n| **Event** | Application events and listeners |\n| **Job** | Background job execution (queues) |\n| **Mail** | Outgoing email with recipients and content |\n| **Notification** | Notification dispatch across channels |\n| **Cache** | Cache hits, misses, writes, and forgets |\n| **Redis** | Redis commands with duration |\n| **Gate** | Authorization checks (allowed/denied) |\n| **HTTP Client** | Outgoing HTTP requests (fetch, axios) |\n| **Command** | CLI command execution with exit codes |\n| **Schedule** | Scheduled task runs with cron expressions |\n| **Dump** | Debug dump output with file/line info |\n| **Batch** | Batch operation tracking with job counts |\n| **View** | Template rendering with data keys |\n\n### 3 Framework Adapters\n\n- **Express** (`@node-telescope/express`) - Middleware-based, Express 4 \u0026 5\n- **NestJS** (`@node-telescope/nestjs`) - Module with interceptors, NestJS 10 \u0026 11\n- **Fastify** (`@node-telescope/fastify`) - Plugin with hooks, Fastify 5\n\n### 3 Storage Drivers\n\n- **SQLite** (`@node-telescope/storage-sqlite`) - Zero-config default, great for development\n- **PostgreSQL** (`@node-telescope/storage-postgres`) - Production-ready with JSONB and connection pooling\n- **MongoDB** (`@node-telescope/storage-mongodb`) - Document storage with TTL indexes\n\n### Dashboard\n\n- React 19 SPA with Tailwind CSS\n- Pages for all 18 watcher types\n- Real-time updates via WebSocket\n- **Request Replay** -- re-send any captured request and see the live response\n- Recording toggle (pause/resume)\n- Entry clearing\n- Batch correlation (see all entries from a single request)\n\n---\n\n## Configuration\n\nAll options are optional with sensible defaults:\n\n```ts\nimport { telescope } from '@node-telescope/express';\nimport { EntryType } from '@node-telescope/core';\n\napp.use(telescope({\n  // Enable/disable. Default: true in dev, false in production\n  enabled: true,\n\n  // Dashboard URL path. Default: '/__telescope'\n  path: '/__telescope',\n\n  // SQLite database path. Default: './telescope.sqlite'\n  databasePath: './telescope.sqlite',\n\n  // Auto-prune entries older than N hours. Default: 24\n  pruneHours: 24,\n\n  // Paths to exclude from recording. Default: ['/__telescope']\n  ignorePaths: ['/__telescope', '/health'],\n\n  // Authorization gate for dashboard access\n  gate: (req) =\u003e {\n    return req.headers['x-admin-token'] === 'secret';\n  },\n\n  // Filter which entries get recorded\n  recordingFilter: (entry) =\u003e {\n    // Skip health check requests\n    if (entry.content.path === '/health') return false;\n    return true;\n  },\n\n  // Headers to mask in stored entries. Default: ['authorization', 'cookie', 'set-cookie']\n  hiddenRequestHeaders: ['authorization', 'cookie', 'set-cookie'],\n\n  // Body fields to mask. Default: ['password', 'token', 'secret', 'credit_card']\n  hiddenRequestParameters: ['password', 'token', 'secret', 'credit_card', 'ssn'],\n\n  // Selectively enable/disable watchers\n  watchers: [\n    { type: EntryType.Request, enabled: true },\n    { type: EntryType.Log, enabled: true },\n    { type: EntryType.Exception, enabled: true },\n    { type: EntryType.Query, enabled: false }, // disable query watcher\n  ],\n}));\n```\n\n---\n\n## Storage Drivers\n\n### SQLite (default)\n\nAutomatically used when `@node-telescope/storage-sqlite` is installed. No configuration needed.\n\n```bash\nnpm install @node-telescope/storage-sqlite\n```\n\n### PostgreSQL\n\n```bash\nnpm install @node-telescope/storage-postgres\n```\n\n```ts\nimport { telescope } from '@node-telescope/express';\nimport { PostgresStorage } from '@node-telescope/storage-postgres';\n\nconst storage = new PostgresStorage('postgresql://user:pass@localhost:5432/mydb');\nawait storage.initialize();\n\napp.use(telescope({ storage }));\n```\n\n### MongoDB\n\n```bash\nnpm install @node-telescope/storage-mongodb\n```\n\n```ts\nimport { telescope } from '@node-telescope/express';\nimport { MongoStorage } from '@node-telescope/storage-mongodb';\n\nconst storage = new MongoStorage('mongodb://localhost:27017', 'telescope');\n\napp.use(telescope({ storage }));\n```\n\n---\n\n## NestJS Advanced Usage\n\n### Async configuration\n\n```ts\n@Module({\n  imports: [\n    TelescopeModule.forRootAsync({\n      imports: [ConfigModule],\n      inject: [ConfigService],\n      useFactory: (config: ConfigService) =\u003e ({\n        enabled: config.get('TELESCOPE_ENABLED', true),\n        databasePath: config.get('TELESCOPE_DB_PATH', './telescope.sqlite'),\n      }),\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\n### Injecting Telescope\n\n```ts\nimport { Injectable } from '@nestjs/common';\nimport { Telescope } from '@node-telescope/core';\n\n@Injectable()\nexport class MyService {\n  constructor(private readonly telescope: Telescope) {}\n\n  doWork() {\n    // Telescope instance is available for manual recording\n  }\n}\n```\n\n---\n\n## Recording Watchers Manually\n\nMany watchers are \"passive\" - they provide a `record*` method that your application or ORM adapter calls:\n\n```ts\nimport { Telescope, QueryWatcher, EntryType } from '@node-telescope/core';\n\n// Record a database query (e.g., from a Prisma middleware)\nconst queryWatcher = telescope.watchers.get\u003cQueryWatcher\u003e(EntryType.Query);\nqueryWatcher?.recordQuery(telescope, {\n  connection: 'postgresql',\n  sql: 'SELECT * FROM users WHERE id = $1',\n  bindings: [42],\n  duration: 12.5,\n});\n\n// Record an outgoing HTTP request (e.g., from an axios interceptor)\nconst httpWatcher = telescope.watchers.get\u003cHttpClientWatcher\u003e(EntryType.HttpClient);\nhttpWatcher?.recordHttpClient(telescope, {\n  method: 'GET',\n  url: 'https://api.example.com/users',\n  headers: {},\n  statusCode: 200,\n  duration: 150,\n});\n```\n\n---\n\n## Security\n\nNode Telescope is secure by default:\n\n- **Auto-disabled in production** - `enabled` defaults to `process.env.NODE_ENV !== 'production'`\n- **PII masking** - Passwords, tokens, secrets, credit card numbers are automatically masked in stored data\n- **Header filtering** - Authorization, Cookie, and Set-Cookie headers are masked by default\n- **Authorization gate** - Restrict dashboard access with a custom gate function\n- **CSP headers** - Dashboard serves Content-Security-Policy headers\n- **No eval** - Dashboard is a pre-built static SPA, no server-side template rendering\n\n---\n\n## Packages\n\n| Package | Description | npm |\n|---------|-------------|-----|\n| `@node-telescope/core` | Core engine, watchers, security (0 runtime deps) | [![npm](https://img.shields.io/npm/v/@node-telescope/core)](https://npmjs.com/package/@node-telescope/core) |\n| `@node-telescope/express` | Express middleware adapter | [![npm](https://img.shields.io/npm/v/@node-telescope/express)](https://npmjs.com/package/@node-telescope/express) |\n| `@node-telescope/nestjs` | NestJS module adapter | [![npm](https://img.shields.io/npm/v/@node-telescope/nestjs)](https://npmjs.com/package/@node-telescope/nestjs) |\n| `@node-telescope/fastify` | Fastify plugin adapter | [![npm](https://img.shields.io/npm/v/@node-telescope/fastify)](https://npmjs.com/package/@node-telescope/fastify) |\n| `@node-telescope/storage-sqlite` | SQLite storage driver | [![npm](https://img.shields.io/npm/v/@node-telescope/storage-sqlite)](https://npmjs.com/package/@node-telescope/storage-sqlite) |\n| `@node-telescope/storage-postgres` | PostgreSQL storage driver | [![npm](https://img.shields.io/npm/v/@node-telescope/storage-postgres)](https://npmjs.com/package/@node-telescope/storage-postgres) |\n| `@node-telescope/storage-mongodb` | MongoDB storage driver | [![npm](https://img.shields.io/npm/v/@node-telescope/storage-mongodb)](https://npmjs.com/package/@node-telescope/storage-mongodb) |\n| `@node-telescope/dashboard` | Pre-built React dashboard | [![npm](https://img.shields.io/npm/v/@node-telescope/dashboard)](https://npmjs.com/package/@node-telescope/dashboard) |\n\n---\n\n## Development\n\n```bash\n# Clone and install\ngit clone https://github.com/alihassan161820/NodeJs-Telescope.git\ncd node-telescope\npnpm install\n\n# Build all packages\npnpm build\n\n# Run all tests\npnpm test\n\n# Lint\npnpm lint\n\n# Run the example app\ncd examples/express-basic\npnpm dev\n```\n\n### Project Structure\n\n```\npackages/\n  core/             # Engine, 18 watchers, security, types (0 deps)\n  storage-sqlite/   # SQLite storage driver\n  storage-postgres/ # PostgreSQL storage driver\n  storage-mongodb/  # MongoDB storage driver\n  express/          # Express middleware adapter\n  nestjs/           # NestJS module adapter\n  fastify/          # Fastify plugin adapter\n  dashboard/        # React 19 + Tailwind CSS SPA\nexamples/\n  express-basic/    # Minimal Express example\n```\n\n---\n\n## Comparison with Laravel Telescope\n\n| Feature | Laravel Telescope | Node Telescope |\n|---------|:-:|:-:|\n| Request monitoring | Yes | Yes |\n| Exception tracking | Yes | Yes |\n| Log capturing | Yes | Yes |\n| Database queries | Yes | Yes |\n| Model events | Yes | Yes |\n| Events/listeners | Yes | Yes |\n| Queue/jobs | Yes | Yes |\n| Mail | Yes | Yes |\n| Notifications | Yes | Yes |\n| Cache | Yes | Yes |\n| Redis | Yes | Yes |\n| Authorization gates | Yes | Yes |\n| HTTP client | Yes | Yes |\n| CLI commands | Yes | Yes |\n| Schedule | Yes | Yes |\n| Dumps | Yes | Yes |\n| Batch | Yes | Yes |\n| Views | Yes | Yes |\n| Real-time dashboard | Yes | Yes (WebSocket) |\n| Data pruning | Yes | Yes (auto + manual) |\n| Auth gate | Yes | Yes |\n| PII masking | Yes | Yes |\n| Multiple frameworks | Laravel only | Express, NestJS, Fastify |\n| Multiple databases | MySQL/PostgreSQL | SQLite, PostgreSQL, MongoDB |\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falihassan161820%2Fnodejs-telescope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falihassan161820%2Fnodejs-telescope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falihassan161820%2Fnodejs-telescope/lists"}