$ show FGRibreau/mailchecker
MailChecker is a cross-platform library for determining whether an email address is from a disposable or temporary email provider. It is implemented in 10+ languages (Node.js, PHP, Python, Ruby, Rust, Go, Java, Elixir, Clojure, etc.) via a centralized template-based code generation system. The library's core is a curated blacklist of over 55,000 disposable email domains stored in a plain text file (`list.txt`). Each platform provides a tiny API: `isValid(email)` returns `true` if the email format is valid AND its domain is not in the blacklist, and `blacklist()` to retrieve the domain list. The code generation pipeline (`lib/generator.js`) uses Mustache templates (`*.tmpl.*`) to produce optimized platform-specific code. The repository also includes domain cleanup scripts and comprehensive per-platform tests run in Docker containers. This is a purely application-oriented library; it does not contain data pipelines, ML models, or research artifacts.
The LLM identified 2 files worth highlighting for reuse:
A self-contained template-based code generator that compiles Mustache templates into platform-specific source files. It discovers templates via glob, loads the domain list from list.txt, and renders each template with domain data (listJSON, listSTR, listPHP, unanchoredRegexpString). The generator is completely isolated from the rest of the system and can be extracted to create data-driven multi-language libraries for any blacklist/whitelist dataset. It demonstrates non-obvious skill in meta-programming and multi-target code generation.
A simple but effective domain list cleaner that removes invalid domains using the Public Suffix List (psl). It reads list.txt, deduplicates, sorts, filters out entries not listed in the PSL (e.g., malformed or non-existent TLDs), and writes back the cleaned list. This script is reusable for any project that maintains a domain list and needs basic validity filtering.