SmokeDetector is a headless chatbot that monitors Stack Exchange for spam and abusive content in real time. It connects to the Stack Exchange WebSocket to receive new and edited posts, then runs them through a multi-layered detection engine that checks against extensive blacklists (keywords, websites, usernames, phone numbers, IP ranges, nameservers, ASNs) and applies heuristic rules including DNS lookups, homoglyph detection, and similarity analysis. Detected spam is reported to designated chat rooms on Stack Exchange Chat, where moderators can provide feedback that feeds back into the system via the Metasmoke statistics service. The architecture is event-driven: the main loop in `ws.py` listens for WebSocket events, enqueues posts for scanning via `bodyfetcher.py`, and dispatches results to `spamhandling.py` for chat reporting. A command system in `chatcommands.py` allows operators to manage blacklists, inspect posts, and control the bot through chat messages. Persistent state is stored in pickle files, and the bot integrates with GitHub for automated blacklist pull requests. The detection logic in `findspam.py` is rule-based with over 100 rules registered via a decorator pattern, each with configurable filters for site, reputation, and score. Key reusable components include a generic TTL cache (`metasmoke_cache.py`), an extensible blacklist parser hierarchy (`blacklists.py`), a phone number matching module with homoglyph support (`phone_numbers.py`), and a command registration decorator. The codebase is well-tested with extensive parametrized tests and has CI/CD pipelines. While the core detection file is large and tightly coupled, many supporting modules are cleanly separated and could be extracted for other projects.
This is a static documentation website built with VuePress that aggregates links to Chinese social media discussions and articles about companies with controversial labor practices (e.g., 996 work schedule, wage theft, equity fraud) targeting Chinese software engineers. The repository's primary value is the curated list of external references, not the codebase itself. The application layer consists of a VuePress configuration, a custom theme with Vue components (Navbar, Sidebar, Page, SearchBox, etc.), and a set of Markdown files that serve as the site's content. There are no backend services, APIs, or dynamic data pipelines. The theme components are standard VuePress customizations and are not independently reusable beyond the context of this specific site. The build process generates a static HTML site deployed via the `push.sh` script. The repository is actively maintained with recent commits, and the dependencies (vuepress, axios) are current enough. However, the code quality is averageβit is mostly configuration and boilerplate theme code with no unit tests or original architectural patterns.