{"id":21826861,"url":"https://github.com/ddosnotification/express-raw","last_synced_at":"2026-04-12T21:40:16.240Z","repository":{"id":264696637,"uuid":"894122911","full_name":"ddosnotification/express-raw","owner":"ddosnotification","description":"Powerful Express.js utility package for better work with express. Zero dependencies.","archived":false,"fork":false,"pushed_at":"2024-11-27T15:59:45.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T08:26:28.598Z","etag":null,"topics":["analytics-tracking","bot-detection","console-logger","developer-tools","devtools-detection","express","express-middleware","express-plugin","express-utils","expressjs","monitoring-tool","node-middleware","nodejs","nodejs-logging","performance-monitoring","request-tracking","server-logging","user-behavior","zero-dependencies"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/express-raw","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddosnotification.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-25T19:47:40.000Z","updated_at":"2024-11-27T15:59:48.000Z","dependencies_parsed_at":"2024-11-25T20:38:26.206Z","dependency_job_id":"4dac7cea-031e-4e6d-8e70-4ebb8bad4498","html_url":"https://github.com/ddosnotification/express-raw","commit_stats":null,"previous_names":["ddosnotification/express-raw"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Fexpress-raw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Fexpress-raw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Fexpress-raw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Fexpress-raw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddosnotification","download_url":"https://codeload.github.com/ddosnotification/express-raw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244795518,"owners_count":20511521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["analytics-tracking","bot-detection","console-logger","developer-tools","devtools-detection","express","express-middleware","express-plugin","express-utils","expressjs","monitoring-tool","node-middleware","nodejs","nodejs-logging","performance-monitoring","request-tracking","server-logging","user-behavior","zero-dependencies"],"created_at":"2024-11-27T18:11:10.125Z","updated_at":"2026-04-12T21:40:11.191Z","avatar_url":"https://github.com/ddosnotification.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# express-raw\n\n### Advanced Express.js Utilities for Modern Applications\n\n[![npm version](https://img.shields.io/npm/v/express-raw?style=for-the-badge\u0026logo=npm\u0026color=cb3837)](https://www.npmjs.com/package/express-raw)\n[![downloads](https://img.shields.io/npm/dm/express-raw?style=for-the-badge\u0026logo=npm\u0026color=252525)](https://www.npmjs.com/package/express-raw)\n[![GitHub stars](https://img.shields.io/github/stars/ddosnotification/express-raw?style=for-the-badge\u0026logo=github\u0026color=252525)](https://github.com/ddosnotification/express-raw)\n\n*Zero-dependency toolkit for request analytics, performance monitoring, rate limiting, and real-time communication*\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n### Core Features\n- 🔍 **Request Analytics**\n- 🚦 **Rate Limiting**\n- 📊 **Enhanced Logging**\n- 👁️ **DevTools Detection**\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n### Advanced Features\n- 🔌 **WebSocket Support**\n- 🎯 **GraphQL Integration**\n- 📈 **Metrics Dashboard**\n- 🔒 **Security Suite**\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## 📦 Installation\n\n```bash\nnpm install express-raw\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eRequirements\u003c/summary\u003e\n\n- Node.js ≥ 14\n- Express.js ≥ 4\n\u003c/details\u003e\n\n## 🚀 Quick Start\n\n```javascript\nconst express = require('express');\nconst { \n    expressLogger, \n    RateLimiter,\n    WebSocketSupport,\n    MetricsDashboard \n} = require('express-raw');\n\nconst app = express();\n\n// Initialize\nconst logger = new expressLogger();\nconst limiter = new RateLimiter({ maxRequests: 100 });\nconst dashboard = new MetricsDashboard();\n\n// Apply middleware\napp.use(limiter.middleware(logger));\napp.use(logger.middleware());\n\n// Start server\napp.listen(3000, () =\u003e logger.serverStart(3000));\n```\n\n## 📚 Documentation\n\n### Rate Limiting\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration Options\u003c/summary\u003e\n\n```javascript\nconst limiter = new RateLimiter({\n    // Time Window\n    windowMs: 15 * 60 * 1000,  // 15 minutes\n    maxRequests: 100,\n    windowType: 'sliding',     // 'sliding' | 'fixed'\n    \n    // Route Limits\n    routeLimits: {\n        '/api/auth/.*': 20,    // Auth routes: 20 req/window\n        '/api/upload/.*': 10   // Upload routes: 10 req/window\n    },\n    \n    // Security\n    autoBan: {\n        enabled: true,\n        maxViolations: 3,      // Ban after 3 violations\n        banDurationMs: 24 * 60 * 60 * 1000 // 24h\n    }\n});\n```\n\u003c/details\u003e\n\n### Enhanced Logging\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration \u0026 Examples\u003c/summary\u003e\n\n```javascript\nconst logger = new expressLogger({\n    enabled: {\n        server: true,      // Server logs\n        requests: true,    // Request logs\n        responses: true,   // Response logs\n        websocket: true,   // WebSocket logs\n        graphql: true      // GraphQL logs\n    }\n});\n```\n\n#### Output Examples\n\n```shell\n# Server Start\n[2024-11-25T19:38:20.177Z] ⚡ [SERVER] Server started\n    Port: 3000\n    Environment: development\n    Memory: 8MB\n\n# Rate Limit Event\n[2024-11-25T19:38:26.177Z] ⚠️ [RATELIMIT] Rate limit exceeded\n    IP: 192.168.1.100\n    Path: /api/users\n    ViolationCount: 1\n```\n\u003c/details\u003e\n\n### WebSocket Support\n\n```javascript\nconst wsSupport = new WebSocketSupport({\n    heartbeatInterval: 30000,\n    rateLimiting: {\n        enabled: true,\n        maxConnectionsPerIP: 5\n    },\n    auth: {\n        enabled: true,\n        handler: async (req) =\u003e {\n            // Auth logic\n        }\n    }\n});\n\n// Broadcast\nwsSupport.broadcast({ type: 'update', data: { time: Date.now() }});\n```\n\n### GraphQL Integration\n\n```javascript\nconst profiler = new GraphQLProfiler({\n    slowQueryThreshold: 500,    // ms\n    maxQueryComplexity: 100,\n    maxDepth: 10,\n    trackMemory: true\n});\n\napp.use('/graphql', profiler.middleware(logger));\n```\n\n### Metrics Dashboard\n\n```javascript\nconst dashboard = new MetricsDashboard({\n    updateInterval: 5000,\n    enableRealtime: true,\n    alerts: {\n        maxMemoryUsage: 85,     // %\n        maxErrorRate: 3         // %\n    }\n});\n```\n\n## 🎯 Examples\n\n\u003cdetails\u003e\n\u003csummary\u003eComplete Application Example\u003c/summary\u003e\n\n```javascript\nconst express = require('express');\nconst { \n    expressLogger, \n    RateLimiter,\n    WebSocketSupport,\n    GraphQLProfiler,\n    MetricsDashboard\n} = require('express-raw');\n\nconst app = express();\n\n// Initialize components\nconst logger = new expressLogger({\n    enabled: { \n        rateLimit: true, \n        websocket: true,\n        graphql: true \n    }\n});\n\nconst limiter = new RateLimiter({\n    windowMs: 15 * 60 * 1000,\n    maxRequests: 100,\n    autoBan: { enabled: true }\n});\n\nconst wsSupport = new WebSocketSupport({\n    rateLimiting: { enabled: true }\n});\n\nconst profiler = new GraphQLProfiler({\n    slowQueryThreshold: 500\n});\n\nconst dashboard = new MetricsDashboard({\n    enableRealtime: true\n});\n\n// Apply middleware\napp.use(limiter.middleware(logger));\napp.use(logger.middleware());\napp.use('/graphql', profiler.middleware(logger));\napp.use(dashboard.middleware(logger, limiter, profiler));\n\n// Start server\nconst server = app.listen(3000, () =\u003e {\n    logger.serverStart(3000);\n});\n\nwsSupport.middleware(logger)(server);\n```\n\u003c/details\u003e\n\n## 📋 Best Practices\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n### Rate Limiting\n- Use sliding windows\n- Set route-specific limits\n- Enable auto-ban for security\n- Whitelist trusted IPs\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n### WebSocket\n- Enable heartbeat\n- Implement authentication\n- Set connection limits\n- Handle reconnection\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n### GraphQL\n- Set complexity limits\n- Monitor slow queries\n- Implement depth limiting\n- Cache common queries\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n### Dashboard\n- Set alert thresholds\n- Monitor memory trends\n- Keep reasonable retention\n- Adjust update frequency\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## 🔧 Troubleshooting\n\n\u003cdetails\u003e\n\u003csummary\u003eCommon Issues \u0026 Solutions\u003c/summary\u003e\n\n### Rate Limiter\n```javascript\n// Fix: Too many false positives\nconst limiter = new RateLimiter({\n    windowType: 'sliding',\n    maxRequests: 200\n});\n\n// Fix: Auto-ban too aggressive\nconst limiter = new RateLimiter({\n    autoBan: {\n        maxViolations: 5,\n        banDurationMs: 60 * 60 * 1000\n    }\n});\n```\n\n### WebSocket\n```javascript\n// Fix: Connection drops\nconst wsSupport = new WebSocketSupport({\n    heartbeatInterval: 15000\n});\n\n// Fix: Memory leaks\nconst dashboard = new MetricsDashboard({\n    retentionPeriod: 3600000,\n    cleanup: true\n});\n```\n\u003c/details\u003e\n\n## 📫 Support\n\nNeed help? Found a bug? Have a feature request?\n\n- [GitHub Issues](https://github.com/ddosnotification/express-raw/issues)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nMade with ♥ by [ZeX](https://github.com/ddosnotification)\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddosnotification%2Fexpress-raw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddosnotification%2Fexpress-raw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddosnotification%2Fexpress-raw/lists"}