diff --git a/Domains/Backend/MiniProjects/Logging/.gitignore b/Domains/Backend/MiniProjects/Logging/.gitignore new file mode 100644 index 00000000..97aca2ea --- /dev/null +++ b/Domains/Backend/MiniProjects/Logging/.gitignore @@ -0,0 +1,2 @@ +.env +node_modules \ No newline at end of file diff --git a/Domains/Backend/MiniProjects/Logging/README.md b/Domains/Backend/MiniProjects/Logging/README.md new file mode 100644 index 00000000..8a5610b9 --- /dev/null +++ b/Domains/Backend/MiniProjects/Logging/README.md @@ -0,0 +1,224 @@ +**Contributor:** Ogagaoghene Esavwede +**Domain:** Backend +**Difficulty:** Beginnerโ€“Intermediate +**Tech Stack:** Node.js, Express.js, Pino + +# ๐Ÿš€ Express Logging Server with Pino + +--- + +## ๐Ÿ“ Description + +A simple Express.js server that replaces all `console.log` statements with a **structured logging system** using **Pino** โ€” a fast, production-grade logging library for Node.js. +This project demonstrates how to create a centralized logger, use it throughout your app, and log useful events like route access and server startup. + +--- + +## ๐ŸŽฏ Features + +- โœ… Centralized logger configuration +- โœ… Structured JSON logs +- โœ… Replaces `console.log` with `logger.info`, `logger.error`, etc. +- โœ… Lightweight and high performance (using Pino) +- โœ… Works in production and development environments +- โœ… Easily extensible for file or external log management + +--- + +## ๐Ÿ› ๏ธ Tech Stack + +- **Node.js** โ€“ Runtime environment +- **Express.js** โ€“ Web framework +- **Pino** โ€“ Fast JSON logger + +--- + +## ๐Ÿš€ How to Run + +### Prerequisites + +- Node.js installed (v14 or higher) +- npm or yarn package manager + +### Installation Steps + +1. **Install dependencies** + + ```bash + npm install + ``` + +2. **Start the server** + + ```bash + npm start + ``` + +3. **Server runs at** + + ``` + http://localhost:3000 + ``` + +4. **See logs in terminal** + + ``` + {"level":30,"time":1729325400000,"msg":"Server running and listening on PORT: 3000","pid":12345,"hostname":"localhost"} + ``` + +--- + +## ๐Ÿ“ Project Structure + +``` +logging/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ app.js # Main Express server file +โ”‚ โ””โ”€โ”€ logging/ +โ”‚ โ””โ”€โ”€ logger.js # Centralized logger configuration +โ”œโ”€โ”€ package.json # Dependencies and scripts +โ”œโ”€โ”€ .gitignore # Git ignore file +โ””โ”€โ”€ README.md # Documentation +``` + +--- + +## ๐Ÿ“ก Example Usage + +### app.js + +```javascript +import express from "express"; +import logger from "./logging/logger.js"; + +const app = express(); +const PORT = process.env.PORT || 3000; + +app.get("/", (req, res) => { + logger.info("User hit home route"); + res.status(200).json({ success: true, message: "Welcome to the server" }); +}); + +app.listen(PORT, () => { + logger.info("Server running and listening on PORT: " + PORT); +}); +``` + +### logger.js + +```javascript +import pino from "pino"; + +const logger = pino({ + level: "info", +}); + +export default logger; +``` + +--- + +## ๐Ÿ’ป Code Comparison + +### โŒ Old Way (Using `console.log`) + +```javascript +app.listen(PORT, () => { + console.log("Server running on port " + PORT); +}); +``` + +### โœ… New Way (Using `logger.info`) + +```javascript +app.listen(PORT, () => { + logger.info("Server running and listening on PORT: " + PORT); +}); +``` + +--- + +## ๐Ÿ“š Learning Outcomes + +### Skills Practiced + +- โœ… Structured logging in Node.js +- โœ… Using Pino for performance logging +- โœ… Creating reusable log modules +- โœ… Logging best practices + +### Concepts Learned + +- Importance of centralized logging +- Structured vs. unstructured logs +- Logging levels (`info`, `warn`, `error`, `debug`) +- Environment-based logging strategies + +--- + +## ๐ŸŽจ Enhancement Ideas + +Want to improve this project? Try adding: + +1. **Pretty Logs** โ€“ Use `pino-pretty` for human-readable logs + + ```bash + npm install pino-pretty + npm start | npx pino-pretty + ``` + +2. **File Logging** โ€“ Pipe logs into a file: + + ```bash + node src/app.js > server.log + ``` + +3. **Environment-specific Levels** โ€“ Use `debug` level in dev, `info` in prod +4. **HTTP Request Logging** โ€“ Combine Pino with `pino-http` +5. **Error Tracking** โ€“ Send logs to monitoring tools like Logtail, Datadog, or Sentry + +--- + +## ๐Ÿงช Testing + +### Using curl + +```bash +curl http://localhost:3000/ +``` + +**Terminal Output:** + +```bash +{"level":30,"time":1729325400000,"msg":"User hit home route","pid":12345,"hostname":"localhost"} +``` + +--- + +## ๐Ÿš€ Future Enhancements + +- [ ] Add pretty-print logs in development +- [ ] Add log file rotation +- [ ] Add request logging middleware +- [ ] Add error logging middleware +- [ ] Add environment-based log filtering + +--- + +## ๐Ÿ“„ License + +MIT License โ€” Free to use and modify! + +--- + +## ๐Ÿค Contributing + +This project is open-source and created to help developers learn **how to replace `console.log` with a proper logger** in Node.js applications. +Feel free to: + +- Fork and enhance +- Report issues +- Suggest improvements +- Use it as a logging starter template + +--- diff --git a/Domains/Backend/MiniProjects/Logging/package-lock.json b/Domains/Backend/MiniProjects/Logging/package-lock.json new file mode 100644 index 00000000..773558f3 --- /dev/null +++ b/Domains/Backend/MiniProjects/Logging/package-lock.json @@ -0,0 +1,971 @@ +{ + "name": "logging", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "logging", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "express": "^5.1.0", + "pino": "^10.1.0" + } + }, + "node_modules/@pinojs/redact": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", + "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==", + "license": "MIT" + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/body-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", + "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", + "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.0", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/finalhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", + "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/pino": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-10.1.0.tgz", + "integrity": "sha512-0zZC2ygfdqvqK8zJIr1e+wT1T/L+LF6qvqvbzEQ6tiMAoTqEVK9a1K3YRu8HEUvGEvNqZyPJTtb2sNIoTkB83w==", + "license": "MIT", + "dependencies": { + "@pinojs/redact": "^0.4.0", + "atomic-sleep": "^1.0.0", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^2.0.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^5.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^3.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-2.0.0.tgz", + "integrity": "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==", + "license": "MIT", + "dependencies": { + "split2": "^4.0.0" + } + }, + "node_modules/pino-std-serializers": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz", + "integrity": "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==", + "license": "MIT" + }, + "node_modules/process-warning": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz", + "integrity": "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.1.tgz", + "integrity": "sha512-9G8cA+tuMS75+6G/TzW8OtLzmBDMo8p1JRxN5AZ+LAp8uxGA8V8GZm4GQ4/N5QNQEnLmg6SS7wyuSmbKepiKqA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.7.0", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sonic-boom": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.0.tgz", + "integrity": "sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==", + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/thread-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz", + "integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==", + "license": "MIT", + "dependencies": { + "real-require": "^0.2.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + } + } +} diff --git a/Domains/Backend/MiniProjects/Logging/package.json b/Domains/Backend/MiniProjects/Logging/package.json new file mode 100644 index 00000000..bbc80fd2 --- /dev/null +++ b/Domains/Backend/MiniProjects/Logging/package.json @@ -0,0 +1,17 @@ +{ + "name": "logging", + "version": "1.0.0", + "description": "", + "license": "ISC", + "author": "", + "type": "module", + "main": "app.js", + "scripts": { + "start": "node src/app.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "express": "^5.1.0", + "pino": "^10.1.0" + } +} diff --git a/Domains/Backend/MiniProjects/Logging/src/app.js b/Domains/Backend/MiniProjects/Logging/src/app.js new file mode 100644 index 00000000..d4b7b4c9 --- /dev/null +++ b/Domains/Backend/MiniProjects/Logging/src/app.js @@ -0,0 +1,27 @@ +import express from "express"; +import logger from "./logging/logger.js"; + +const app = express(); +const PORT = process.env.PORT || 3000; + +// Info Logging +app.get("/", (req, res) => { + logger.info("User hit home route"); + res.status(200).json({ success: "true", message: "Welcome to the server" }); +}); + +// Error Logging +app.get("/error", (req, res) => { + try { + logger.info("Error Route hit"); + logger.info("This Route forces an error"); + throw new Error("Forced Error"); + } catch (e) { + logger.error(e, "Force Error Route Hit"); + res.status(500).json({ success: "false", message: "Server Error" }); + } +}); + +app.listen(PORT, () => { + logger.info("Server running and listening on PORT: " + PORT); +}); diff --git a/Domains/Backend/MiniProjects/Logging/src/logging/logger.js b/Domains/Backend/MiniProjects/Logging/src/logging/logger.js new file mode 100644 index 00000000..944b3ff7 --- /dev/null +++ b/Domains/Backend/MiniProjects/Logging/src/logging/logger.js @@ -0,0 +1,7 @@ +import pino from "pino"; + +const logger = pino({ + levels: "info", +}); + +export default logger; diff --git a/Domains/Frontend/MiniProjects/Pomodoro/README.md b/Domains/Frontend/MiniProjects/Pomodoro/README.md new file mode 100644 index 00000000..2f242461 --- /dev/null +++ b/Domains/Frontend/MiniProjects/Pomodoro/README.md @@ -0,0 +1,232 @@ +# Pomodoro Timer + +A modern, SaaS-level Pomodoro timer application built with vanilla HTML, CSS, and JavaScript. Stay focused and boost productivity with customizable work and break intervals. + +## Features + +โœจ **Modern UI Design** + +- Clean, professional interface with gradient background +- Smooth animations and transitions +- Fully responsive design (desktop, tablet, mobile) + +โฑ๏ธ **Timer Functionality** + +- Default 25-minute work sessions and 5-minute breaks +- Customizable work and break durations +- Real-time timer display with MM:SS format +- Session indicators showing work/break mode + +๐ŸŽฎ **Controls** + +- Start, Pause, and Reset buttons +- Resume functionality to continue paused sessions +- Automatic session switching between work and break + +๐Ÿ“Š **Statistics & Tracking** + +- Track completed work sessions +- Monitor total focus time accumulated +- Stats update automatically after each work session + +๐Ÿ”Š **Audio Notifications** + +- Sound alert when sessions complete +- Smooth tone-based notification system + +## File Structure + +``` +pomodoro-timer/ +โ”œโ”€โ”€ index.html # HTML markup and structure +โ”œโ”€โ”€ styles.css # Styling, animations, and responsive design +โ”œโ”€โ”€ script.js # Timer logic and interactivity +โ””โ”€โ”€ README.md # Project documentation +``` + +## Getting Started + +### Prerequisites + +- Any modern web browser (Chrome, Firefox, Safari, Edge) +- No additional dependencies or installation required + +### Installation + +1. Clone or download the project files: + +```bash +git clone +cd pomodoro-timer +``` + +2. Open the application: + + - Simply open `index.html` in your web browser + - Or use a local server for best results: + + ```bash + # Using Python 3 + python -m http.server 8000 + + # Using Python 2 + python -m SimpleHTTPServer 8000 + + # Using Node.js (http-server) + npx http-server + ``` + + - Then navigate to `http://localhost:8000` + +## Usage + +1. **Start a Session** + + - Click the "Start" button to begin a 25-minute work session + - Watch the timer count down in MM:SS format + +2. **Pause or Resume** + + - Click "Pause" to temporarily stop the timer + - Click "Resume" to continue where you left off + +3. **Reset Timer** + + - Click "Reset" to restart the current session + +4. **Customize Durations** + + - Enter desired minutes in the "Work Duration" input field + - Enter desired minutes in the "Break Duration" input field + - Click "Apply" to update the timer with new values + +5. **Track Progress** + + - View the count of completed work sessions + - Monitor accumulated focus time (displayed in hours) + - Stats update automatically when work sessions complete + +6. **Automatic Session Switching** + - When a work session completes, the timer automatically switches to break mode + - When a break completes, it automatically returns to work mode + - A notification sound plays when each session ends + +## How It Works + +The Pomodoro Technique is a time-management method that uses timed intervals: + +- Work for a focused period (default: 25 minutes) +- Take a short break (default: 5 minutes) +- Repeat the cycle + +This timer automates the process, helping you maintain focus and avoid burnout. + +## Customization + +### Change Default Durations + +Edit `script.js` and modify these variables: + +```javascript +let workDuration = 25; // Work session in minutes +let breakDuration = 5; // Break session in minutes +``` + +### Modify Colors and Theme + +Edit `styles.css` to change the design: + +```css +/* Primary gradient color */ +background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + +/* Accent color */ +color: #667eea; +``` + +### Adjust Notification Sound + +Edit `script.js` in the `playNotification()` function: + +```javascript +oscillator.frequency.value = 800; // Frequency in Hz +gainNode.gain.setValueAtTime(0.3, audioContext.currentTime); // Volume +``` + +## Browser Compatibility + +- โœ… Chrome 90+ +- โœ… Firefox 88+ +- โœ… Safari 14+ +- โœ… Edge 90+ +- โœ… Mobile browsers (iOS Safari, Chrome Mobile) + +## Technical Details + +### Technologies Used + +- **HTML5** - Semantic markup and SVG +- **CSS3** - Flexbox, Grid, gradients, animations, and media queries +- **Vanilla JavaScript** - No frameworks or external dependencies + +### Key Features + +- Real-time timer with 1-second precision +- Web Audio API for notifications +- In-memory state management +- Mobile-first responsive design + +## Performance + +- Lightweight: ~15KB total (uncompressed) +- Instant load time +- Smooth animations +- Minimal memory footprint +- No external API calls or network requests + +## Accessibility + +- Semantic HTML structure +- High contrast color scheme +- Clear, descriptive button labels +- Visible visual feedback for interactions +- Responsive design for all screen sizes + +## Troubleshooting + +**Sound notification not playing?** + +- Check browser audio permissions +- Some browsers require user interaction before playing audio +- Ensure system volume is not muted + +**Timer not updating?** + +- Refresh the page +- Check browser console for errors +- Ensure JavaScript is enabled + +**Styling looks incorrect?** + +- Clear browser cache and refresh +- Try a different browser +- Verify CSS file is in the same directory as index.html + +## License + +This project is open-source and available for personal and commercial use. + +## Support + +For issues or questions: + +1. Check the troubleshooting section above +2. Review the code comments in `script.js` +3. Test in a different browser +4. Clear browser cache and retry + +--- + +**Happy focusing! ๐Ÿ…โฒ๏ธ** + +Use the Pomodoro Technique to boost your productivity and achieve your goals through structured, focused work sessions. diff --git a/Domains/Frontend/MiniProjects/Pomodoro/index.html b/Domains/Frontend/MiniProjects/Pomodoro/index.html new file mode 100644 index 00000000..e1e1e164 --- /dev/null +++ b/Domains/Frontend/MiniProjects/Pomodoro/index.html @@ -0,0 +1,97 @@ + + + + + + Pomodoro Timer + + + +
+
+

Pomodoro Timer

+

Stay focused, stay productive

+
+
Work
+
Break
+
+
+ + + + + + +
+
25:00
+
Work Session
+
+ +
+ + + +
+ +
+
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+
+
0
+
Sessions
+
+
+
0h
+
Focus Time
+
+
+
+
+ + + + diff --git a/Domains/Frontend/MiniProjects/Pomodoro/script.js b/Domains/Frontend/MiniProjects/Pomodoro/script.js new file mode 100644 index 00000000..c4b9bb41 --- /dev/null +++ b/Domains/Frontend/MiniProjects/Pomodoro/script.js @@ -0,0 +1,169 @@ +let workDuration = 25; +let breakDuration = 5; +let timeLeft = workDuration * 60; +let isRunning = false; +let isWorkSession = true; +let timerInterval = null; +let sessionsCompleted = 0; +let totalFocusTime = 0; + +const timerDisplay = document.getElementById("timerDisplay"); +const timerLabel = document.getElementById("timerLabel"); +const startBtn = document.getElementById("startBtn"); +const pauseBtn = document.getElementById("pauseBtn"); +const progressCircle = document.getElementById("progressCircle"); +const workBadge = document.getElementById("workBadge"); +const breakBadge = document.getElementById("breakBadge"); + +const circumference = 2 * Math.PI * 90; +progressCircle.style.strokeDasharray = circumference; + +/** + * Updates the timer display with formatted time and progress ring + */ +function updateDisplay() { + const minutes = Math.floor(timeLeft / 60); + const seconds = timeLeft % 60; + timerDisplay.textContent = `${String(minutes).padStart(2, "0")}:${String( + seconds + ).padStart(2, "0")}`; + + const totalTime = isWorkSession ? workDuration * 60 : breakDuration * 60; + const progress = 1 - timeLeft / totalTime; + progressCircle.style.strokeDashoffset = circumference * (1 - progress); +} + +/** + * Updates the session badges and label + */ +function updateBadges() { + if (isWorkSession) { + workBadge.classList.add("active"); + breakBadge.classList.remove("active"); + timerLabel.textContent = "Work Session"; + } else { + breakBadge.classList.add("active"); + workBadge.classList.remove("active"); + timerLabel.textContent = "Break Time"; + } +} + +/** + * Starts the timer countdown + */ +function startTimer() { + if (isRunning) return; + isRunning = true; + startBtn.textContent = "Running"; + startBtn.disabled = true; + pauseBtn.disabled = false; + + timerInterval = setInterval(() => { + if (timeLeft > 0) { + timeLeft--; + updateDisplay(); + } else { + completeSession(); + } + }, 1000); +} + +/** + * Pauses the timer + */ +function pauseTimer() { + if (!isRunning) return; + isRunning = false; + clearInterval(timerInterval); + startBtn.textContent = "Resume"; + startBtn.disabled = false; + pauseBtn.disabled = true; +} + +/** + * Resets the timer to its initial state + */ +function resetTimer() { + isRunning = false; + clearInterval(timerInterval); + timeLeft = isWorkSession ? workDuration * 60 : breakDuration * 60; + updateDisplay(); + startBtn.textContent = "Start"; + startBtn.disabled = false; + pauseBtn.disabled = true; +} + +/** + * Handles session completion and switches between work/break + */ +function completeSession() { + clearInterval(timerInterval); + isRunning = false; + + if (isWorkSession) { + sessionsCompleted++; + totalFocusTime += workDuration; + document.getElementById("sessionsCompleted").textContent = + sessionsCompleted; + document.getElementById("focusTime").textContent = `${Math.floor( + totalFocusTime / 60 + )}h`; + } + + isWorkSession = !isWorkSession; + timeLeft = isWorkSession ? workDuration * 60 : breakDuration * 60; + updateDisplay(); + updateBadges(); + + startBtn.textContent = "Start"; + startBtn.disabled = false; + pauseBtn.disabled = true; + + playNotification(); +} + +/** + * Applies new duration settings and resets the timer + */ +function applySettings() { + const newWork = parseInt(document.getElementById("workDuration").value); + const newBreak = parseInt(document.getElementById("breakDuration").value); + + if (newWork > 0 && newWork <= 60) workDuration = newWork; + if (newBreak > 0 && newBreak <= 30) breakDuration = newBreak; + + resetTimer(); +} + +/** + * Plays a notification sound when a session completes + */ +function playNotification() { + try { + const audioContext = new (window.AudioContext || + window.webkitAudioContext)(); + const oscillator = audioContext.createOscillator(); + const gainNode = audioContext.createGain(); + + oscillator.connect(gainNode); + gainNode.connect(audioContext.destination); + + oscillator.frequency.value = 800; + oscillator.type = "sine"; + + gainNode.gain.setValueAtTime(0.3, audioContext.currentTime); + gainNode.gain.exponentialRampToValueAtTime( + 0.01, + audioContext.currentTime + 0.5 + ); + + oscillator.start(audioContext.currentTime); + oscillator.stop(audioContext.currentTime + 0.5); + } catch (e) { + console.log("Audio notification not supported"); + } +} + +// Initialize the timer display +updateDisplay(); +updateBadges(); diff --git a/Domains/Frontend/MiniProjects/Pomodoro/style.css b/Domains/Frontend/MiniProjects/Pomodoro/style.css new file mode 100644 index 00000000..32410b57 --- /dev/null +++ b/Domains/Frontend/MiniProjects/Pomodoro/style.css @@ -0,0 +1,275 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", sans-serif; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; + padding: 20px; +} + +.container { + background: white; + border-radius: 24px; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); + padding: 60px 40px; + width: 100%; + max-width: 500px; + animation: slideIn 0.5s ease-out; +} + +@keyframes slideIn { + from { + opacity: 0; + transform: translateY(20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.header { + text-align: center; + margin-bottom: 40px; +} + +.title { + font-size: 28px; + font-weight: 700; + color: #2d3748; + margin-bottom: 8px; +} + +.subtitle { + font-size: 14px; + color: #a0aec0; +} + +.session-indicator { + display: flex; + justify-content: center; + gap: 8px; + margin-top: 20px; + flex-wrap: wrap; +} + +.session-badge { + padding: 6px 12px; + background: #f7fafc; + border-radius: 12px; + font-size: 12px; + font-weight: 600; + color: #718096; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.session-badge.active { + background: #667eea; + color: white; +} + +.timer-display { + text-align: center; + margin: 50px 0; +} + +.timer-text { + font-size: 72px; + font-weight: 700; + color: #2d3748; + font-variant-numeric: tabular-nums; + letter-spacing: -2px; +} + +.timer-label { + font-size: 14px; + color: #a0aec0; + margin-top: 12px; + text-transform: uppercase; + letter-spacing: 1px; +} + +.progress-ring { + width: 200px; + height: 200px; + margin: -100px auto 40px; + display: none; +} + +.progress-ring.active { + display: block; +} + +.progress-ring-circle { + transition: stroke-dashoffset 0.3s linear; + transform: rotate(-90deg); + transform-origin: 50% 50%; + stroke: #667eea; + stroke-width: 8; + fill: none; + stroke-linecap: round; +} + +.controls { + display: flex; + gap: 12px; + margin-bottom: 30px; +} + +button { + flex: 1; + padding: 14px 24px; + border: none; + border-radius: 12px; + font-size: 14px; + font-weight: 600; + cursor: pointer; + transition: all 0.2s ease; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.btn-primary { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + color: white; +} + +.btn-primary:hover { + transform: translateY(-2px); + box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4); +} + +.btn-primary:active { + transform: translateY(0); +} + +.btn-secondary { + background: #f7fafc; + color: #2d3748; +} + +.btn-secondary:hover { + background: #edf2f7; + transform: translateY(-2px); +} + +.btn-secondary:active { + transform: translateY(0); +} + +.settings { + background: #f7fafc; + border-radius: 16px; + padding: 24px; +} + +.setting-group { + margin-bottom: 20px; +} + +.setting-group:last-child { + margin-bottom: 0; +} + +.setting-label { + font-size: 12px; + font-weight: 600; + color: #718096; + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 10px; + display: block; +} + +.input-group { + display: flex; + gap: 8px; + align-items: center; +} + +input[type="number"] { + flex: 1; + padding: 10px 12px; + border: 1px solid #e2e8f0; + border-radius: 8px; + font-size: 14px; + font-weight: 600; + color: #2d3748; +} + +input[type="number"]:focus { + outline: none; + border-color: #667eea; + box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); +} + +.btn-small { + padding: 10px 12px; + background: white; + color: #2d3748; + border: 1px solid #e2e8f0; + border-radius: 8px; + font-weight: 600; + cursor: pointer; + transition: all 0.2s ease; +} + +.btn-small:hover { + background: #edf2f7; + border-color: #cbd5e0; +} + +.stats { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 16px; + margin-top: 24px; +} + +.stat { + background: white; + padding: 16px; + border-radius: 12px; + text-align: center; +} + +.stat-value { + font-size: 24px; + font-weight: 700; + color: #667eea; +} + +.stat-label { + font-size: 12px; + color: #a0aec0; + margin-top: 4px; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.hidden { + display: none; +} + +@media (max-width: 480px) { + .container { + padding: 40px 24px; + } + + .timer-text { + font-size: 56px; + } + + .title { + font-size: 24px; + } +}