Comprehensive Node.js solutions for task orchestration, real-time collaboration, and operational log analysis. The workspace hosts three independent services that share common engineering principles: consistent validation, observable error handling, and automation-friendly tooling.
task-management-api/– RESTful service that secures, schedules, and monitors tasks for distributed teams.websocket-chat/– Event-driven WebSocket gateway enabling instant messaging and presence updates.log-parser-cli/– Command-line utility for parsing application logs and extracting actionable metrics.
- Purpose: Delivers authenticated CRUD endpoints for tasks, providing filtering, prioritisation, and deadline management.
- Stack: Node.js 18+, Express, Mongoose, JSON Web Tokens, express-validator, Jest.
- Key Capabilities:
- Token-based authentication with role-ready structure.
- Centralised validation middleware and consistent problem-detail responses.
- MongoDB persistence with lifecycle hooks for password hashing.
- Quick Start:
cd task-management-apinpm install- Copy
.env.exampleto.envand setMONGO_URI,JWT_SECRET. npm run dev
- Testing:
npm test
- Purpose: Provides bi-directional real-time messaging with room-based isolation.
- Stack: Node.js, ws (WebSocket library), Redis (optional) for pub/sub scaling.
- Key Capabilities:
- Broadcast and direct messaging channels.
- Connection lifecycle hooks for join/leave notifications.
- Extensible event schema for future moderation features.
- Quick Start:
cd websocket-chatnpm installnpm start
- Integration Tip: Use the provided sample HTML client or integrate via native WebSocket clients with JSON payloads.
- Purpose: Extracts insights from structured and semi-structured logs to support operational reporting.
- Stack: Node.js, commander, chalk.
- Key Capabilities:
- Pluggable parsers for JSON, CSV, and delimited formats.
- Filters by severity, timestamp, and custom predicates.
- Export to CSV or JSON for downstream analytics.
- Quick Start:
cd log-parser-clinpm installnode ./src/index.js --help
- Example:
node ./src/index.js parse --input ./logs/app.log --format json --level error
- Code Quality: ESLint and Prettier configurations ensure consistent formatting and linting across projects.
- Testing: Unit and integration suites run via
npm test; new features require coverage extensions. - Security: Environment variables hold secrets; avoid committing
.envfiles. JWT secrets must be strong and rotated periodically. - Observability: Each service includes structured logging helpers ready for integration with centralized log platforms.
This repository is distributed under the MIT License. See LICENSE for details.