close-with-grace is a Node.js library that provides graceful shutdown handling for applications. It listens for system signals (SIGTERM, SIGINT, etc.) and process events (uncaughtException, unhandledRejection, beforeExit), giving applications a configurable timeout to perform cleanup operations before exiting. If the same signal occurs again during cleanup, it forces immediate termination. The library supports both callback and promise-based cleanup functions, custom logging, and the ability to skip specific events. It's designed as a simple, self-contained utility that can be easily integrated into any Node.js application needing reliable shutdown handling.
express-slow-down is an Express.js middleware library that rate-limits clients by slowing down responses instead of blocking them outright. It wraps `express-rate-limit` internally, using a custom handler that computes a delay based on request count and configurable options like `delayAfter`, `delayMs`, and `maxDelayMs`. The middleware increments a per-client counter (via a store, defaulting to an in-memory store), and when the count exceeds a threshold, it delays subsequent responses. It supports custom stores, async functions for dynamic delays, and standard/legacy rate-limit headers. The codebase is well-structured TypeScript with comprehensive unit and integration tests, and follows modern ES module and TypeScript practices.
@fastify/cookie is a Fastify plugin that adds cookie handling capabilities to Fastify applications. It provides automatic parsing of incoming cookies via Fastify hooks and methods to set, clear, and sign cookies on responses. The plugin integrates with Fastify's lifecycle through decorators and hooks, supporting various hook points for cookie parsing (onRequest, preParsing, etc.). It includes robust security features like cookie signing with HMAC, key rotation support, and protection against timing attacks. The implementation follows Fastify plugin best practices and provides both high-level convenience methods and low-level utilities for direct use.
This is a TypeScript library (v3.1.5) that wraps the Steam Web API, providing a clean, fully typed interface to interact with Steam's official and some undocumented endpoints. It is distributed as an ES module on npm under the name 'steamapi'. The library is architected around a single main class (`SteamAPI`) instantiated with an API key, which exposes methods for resolving Steam IDs, fetching game details, user profiles, achievements, badges, friends, bans, servers, and more. All API responses are parsed into strongly typed structure classes (e.g., `GameDetails`, `UserSummary`, `NewsPost`). It includes built-in configurable in-memory caching for game details and user resolution to reduce repeated API calls, and supports custom caching via a simple interface. The code is well-structured with clear separation of concerns between API logic, data models, and utility functions, and uses modern TypeScript features like interfaces, generics, and accessors. While it is not architecturally groundbreaking, it is a solid, professional-grade SDK that effectively encapsulates a complex external API with consistent error handling, caching strategies, and comprehensive type definitions. There are no significant reusable components that could be cleanly extracted to a new project, as the value lies in the integration with Steam's API, but the caching implementation and structure patterns provide a good reference for similar API wrapper projects.
Outline is a collaborative knowledge base platform built with React and Node.js. It provides real-time document editing via ProseMirror/Yjs, team workspaces with granular permissions, and extensibility through a plugin system. The application features rich text editing, document organization into collections, search functionality, notifications, and integrations with services like Slack, GitHub, and Notion. Architecture follows a monorepo structure with frontend (React/MobX/Styled Components), backend (Node.js/Koa/Sequelize), and shared utilities. Key entry points include the React root (app/index.tsx), Koa server (server/index.ts), and API routes (server/routes/api/). The system relies on PostgreSQL for primary data storage, Redis for caching and job queues, and S3/local storage for file attachments.
Gulp is a streaming build system for automating development workflows. It provides a minimal API surface (src, dest, watch, task, series, parallel) that allows developers to define tasks as asynchronous functions and compose them into pipelines. The core library is a thin wrapper around several specialized modules: Undertaker for task orchestration, vinyl-fs for file I/O, glob-watcher for file watching, and gulp-cli for command-line interaction. The architecture is modular and dependency-heavy, with the main index.js file creating a Gulp instance that inherits from Undertaker and delegates file operations to vinyl-fs. The system is designed to be used programmatically or via the CLI, and it supports both CommonJS and ESM imports. The codebase is well-maintained and has recently undergone a major version 5 release with significant updates to stream handling, globbing, and dependency management.
AIClient2API (A2) is a production-grade API proxy/gateway that converts proprietary AI provider APIs (Gemini, Claude/Kiro, Qwen, Codex, Grok, OpenAI, and more) into standard OpenAI-compatible endpoints (`/v1/chat/completions`, `/v1/messages`, `/v1beta/models`). It supports multi-account OAuth credential pools with automatic token refresh, health checks, and fallback routing, enabling clients to break free-tier restrictions. The server is built on Node.js with a master-worker architecture for process management, a plugin system for extensibility (authentication, monitoring, usage statistics, API key sharing), and a Go-based TLS sidecar for JA3/JA4 bypass. A full web management console (static HTML/CSS/JS) provides configuration, provider management, credential file upload, interactive playground, and usage monitoring. The codebase demonstrates strong patterns (strategy, factory, adapter, converter) but suffers from some monolithic utility files, hardcoded provider mappings, and high maintenance overhead from multiple OAuth implementations.
Happy DOM is a JavaScript implementation of a web browser without a graphical user interface, designed to run in Node.js. It provides a comprehensive simulation of browser APIs including the DOM, HTML/SVG elements, CSSOM, Fetch, WebSocket, Canvas, Custom Elements, Shadow DOM, and more. The library is primarily used as a test environment for JavaScript frameworks (React, Vue, Angular, Lit, etc.) and supports server-side rendering via an optional server-renderer package. The codebase is a monorepo containing the core happy-dom package along with companion packages for global registration, Jest environment, server rendering, and a pluggable canvas adapter. It is actively maintained with thousands of tests and a large community. However, it exhibits moderate technical drift: some APIs are incomplete, there is significant boilerplate duplication across SVG/HTML element implementations, and a few deprecated settings linger. Overall, it is a solid, well-structured library but not exceptional in craftsmanship due to the repetitive patterns and some incomplete implementations.
chrome-remote-interface is a well-crafted Node.js library that provides a clean, dynamic API for interacting with the Chrome DevTools Protocol (CDP). It connects to a remote debugging endpoint (e.g., Chrome with --remote-debugging-port), fetches the full protocol descriptor dynamically, and generates typed JavaScript methods and events for every domain, command, and notification. The library supports callback and Promise patterns, includes a comprehensive CLI with an interactive REPL, and works across multiple implementations (Chrome, Node.js, Edge, Firefox, etc.). It does not bundle a browser; instead, it focuses on low-level protocol access, making it a foundational tool for browser automation, debugging, and custom DevTools clients.
Coral is an open-source, multi-tenant comment moderation platform developed by Vox Media. It provides a full-stack application with embedded commenting widgets (stream), a comprehensive admin panel for moderation, configuration, and community management, an authentication system supporting local, OAuth2/OIDC, Google, Facebook, SSO, and account management pages. The system architecture consists of a Node.js/Express server with Apollo GraphQL, MongoDB for persistence, Redis for caching and pub/sub, and Bull for job queues. The client uses React with Relay for GraphQL data fetching, and is organized into several bundles: stream (the embeddable comment widget), admin, auth, account, install, count, and embed. The core data flow involves comments being submitted via GraphQL mutations, processed through a modular pipeline (spam detection, word list filtering, toxicity analysis via Perspective API, external moderation phases, and pre-moderation rules), stored in MongoDB, and then distributed via GraphQL subscriptions and notifications (email, Slack, webhooks). The codebase is extensive and well-tested, though it exhibits some legacy patterns (recompose HOCs, partial migration from class components to hooks, duplicated utility code between client and server scripts).
Notifme SDK is a Node.js library for sending transactional notifications across multiple channels (email, SMS, push, webpush, Slack, WhatsApp, voice). It provides a unified interface with a provider pattern, allowing users to configure one or more providers per channel with built-in multi-provider strategies (fallback, round-robin, no-fallback). The library handles authentication, request formatting, and error handling for each provider, and includes a development mode with a notification catcher for local testing. The architecture is centered around a Sender class that dispatches requests to channel-specific strategies, which in turn call provider instances. External dependencies include nodemailer, node-fetch, web-push, winston, and node-pushnotifications. The codebase uses Flow for type checking and Babel for transpilation, with comprehensive Jest tests achieving 100% coverage thresholds.
This is a personal dotfiles repository for macOS, automating the setup of a developer environment. It is not a traditional application but a configuration management system using dotbot to symlink config files and Homebrew to install software. The repository manages shell configuration (zsh with oh-my-zsh and zplug), editor settings (VS Code, nano, hyper), browser hardening (Firefox/Zen with arkenfox user.js), macOS system preferences, and a curated set of CLI tools and applications. The core entry point is a bash install script that runs dotbot pipelines. The codebase is well-organized, follows minimalism and security principles, and is actively maintained by a single developer. It demonstrates thoughtful patterns for fzf integration, Docker-based AI agent runners, and peripheral auto-launching, though it remains a personal configuration rather than a reusable library.
Steam Achievement Notifier (SAN) is a feature-rich Electron desktop application that monitors Steam and RetroAchievements unlock events and displays highly customizable on-screen notifications. It leverages the Steamworks API for real-time achievement tracking without requiring an API key, and integrates with RetroAchievements via emulator log file parsing. The application provides extensive customisation – multiple notification presets (consoles, Steam Deck, custom), per-type themes (colors, fonts, icons, glow, masks, positions), screenshot overlays, streaming overlays for OBS, Discord webhook posting, game completion timer, and a diagnostics troubleshooter. Architecture is multi-process: a main process handles window management and IPC, a renderer process displays the settings/customiser UI, a worker process continuously polls Steam for game state and achievements, and a RetroAchievements worker monitors emulator logs. Communication is event-driven with well-defined IPC channels. The project includes Rust native modules for keypress simulation, HDR screenshot capture, and high-performance process watchers, bundled as precompiled binaries. The codebase is actively maintained with regular releases, comprehensive localization (25+ languages), and detailed inline documentation (tooltips). While architecturally sound with clean separation of concerns, some modules (e.g., sanhelper.ts) are monolithic and tightly coupled to the application's config and UI, which may hinder isolated reuse. The translation files are large and duplicative, requiring coordinated updates across languages.
This repository is a Node.js GitHub Bot that automates tasks in response to GitHub and Jenkins webhooks. It uses an Express.js server to receive webhooks, validates GitHub signatures, and emits normalized events via a central event emitter. Scripts in the `scripts` directory listen for these events to perform actions such as commenting on pull requests, updating GitHub status checks based on Jenkins builds, and enforcing CODEOWNERS reviews. The architecture separates webhook reception from processing, allowing for extensibility through additional scripts.
pnpm-patch-i is a CLI tool that enhances the `pnpm patch` workflow by providing an interactive, user-friendly experience. It wraps pnpm's native patch command, placing the edit directory locally under `node_modules/.patch-edits/` with a human-readable name, automatically opening the editor, and waiting for user confirmation before committing the patch. The tool also supports applying patches directly from a source directory, with optional build and pack steps, and intelligently resolves `workspace:` and `catalog:` dependency specifiers from the source package's `pnpm-workspace.yaml`. The codebase is a single-module TypeScript application using `cac` for CLI parsing, `execa` for running pnpm commands, and `prompts` for user interaction. It is well-structured, actively maintained, and demonstrates solid engineering practices with clean async/await patterns and proper error handling.
TermUI is a comprehensive TypeScript monorepo providing a full-featured terminal UI framework for building rich, interactive command-line applications. It includes a custom JSX runtime with hooks, reconciliation, and portals; a theme engine (TSS) with CSS-like syntax and 26 built-in themes; a widget library spanning layout, input, display, data visualization, and feedback components; a motion system with spring physics and composable animations; a client-side router; a Zustand-like state store; adapters for external integrations (AI, Git, GitHub, clipboard, keychain); real-time system data hooks (CPU, memory, disk, Docker); a CLI scaffolding tool; and a dev server with hot reload. The framework is designed to offer a React-like development experience for terminal UIs, supporting JSX/TSX, keyboard and mouse input, focus management, accessibility (OSC 133), and unicode/ASCII fallbacks across 14+ packages with over 5000 tests.
Foundry is an opinionated toolkit that centralizes and automates the configuration of code quality tools for JavaScript/TypeScript projects. It bundles and exposes composable ESLint flat configs, Biome configuration, Stylelint configuration, Husky hooks, and lint-staged setup. The CLI (`foundry init`) detects installed frameworks and dependencies (React, Next.js, Jest, etc.), generates tailored config files, and updates package.json scripts. The package primarily serves as a shared, versioned dependency that enforces consistent linting and formatting across multiple projects within an organization. The architecture is a library of configuration objects combined with a thin CLI wrapper, and the code is well-structured, modular, and thoroughly tested.
Crabpot is a compatibility testing and regression detection framework for the OpenClaw AI agent plugin ecosystem. It validates plugin fixtures (59 plugins, 119 entrypoints) against the OpenClaw API surface by capturing contract registrations, running synthetic probes, measuring cold-import readiness, and profiling resource usage. The system is driven by a modular collection of Node.js scripts (ES modules) that orchestrate inspection, report generation, and CI policy enforcement. It integrates deeply with GitHub Actions for automated checks, track dashboards, and resource campaign execution via Docker. The architecture is script-based rather than a monolithic application, with each script performing a focused task (e.g., capture-contracts.mjs, synthetic-probes.mjs, generate-report.mjs) and producing JSON+Markdown reports. External dependencies include the OpenClaw plugin-inspector library, npm/git for fixture materialization, and GitHub Actions for CI. The framework is designed to catch contract drift before external plugin authors encounter it, and it maintains a dashboard of live issues, compat gaps, and profile regressions.
NW.js is a desktop application runtime that integrates Chromium and Node.js, enabling developers to build native desktop applications using web technologies (HTML, CSS, JavaScript). The codebase functions as a hybrid framework where web content can access native OS APIs and Node.js modules can be loaded directly into the browser context. It operates on a multi-process architecture typical of Chromium-based projects, with distinct browser, renderer, and utility processes. The system relies heavily on upstream Chromium and Node.js versions, requiring constant synchronization to maintain compatibility and security. It supports cross-platform deployment (Windows, macOS, Linux) with platform-specific implementations for UI components, file dialogs, and system integration.
This repository implements a WeatherStar 4000+ simulator web application that recreates the nostalgic Weather Channel display from the 1990s. It fetches live weather data from NOAA's api.weather.gov, radar.weather.gov, and SPC outlook services, then renders it through a retro-styled single-page application with CRT scanlines, custom fonts, and animated icons. The architecture is a Node.js/Express server (or static nginx deployment) with a built-in caching proxy that reduces API load, plus a client-side module system for weather displays (current conditions, forecasts, radar, alerts, almanac, travel forecast, etc.). Key entry points are index.mjs (server) and server/scripts/index.mjs (client bootstrap). Data flows from NOAA APIs through the proxy to the client, augmented with precomputed city/station JSON files for location lookup. External dependencies include NOAA API endpoints, ArcGIS geocoding, and Mesonet radar tiles. The codebase demonstrates solid engineering with modular utilities, a generic settings system, and a well-structured build pipeline (Gulp, Webpack, SASS). However, it is tightly coupled to specific NOAA APIs and relies on static data files that require manual regeneration, introducing moderate technical drift risk.