Mozilla PDF.js is a comprehensive, web-standards-based PDF rendering library and viewer built entirely in JavaScript. It parses and renders PDF documents in the browser using HTML5 Canvas and SVG, with a worker thread for heavy parsing to keep the UI responsive. The library supports PDF versions 1.0 through 2.0, including encryption, digital signatures, XFA forms, Acrobat JavaScript scripting, and a full annotation editing suite (free text, ink, highlight, stamp, signature). It also provides a complete web viewer application with sidebar, find bar, presentation mode, and printing, plus a Chrome extension and Firefox integration. The architecture is modular: a core worker thread handles parsing, font rendering, and image decoding (using WebAssembly for JPEG2000, JBIG2, Brotli, and ICC color management), while the display layer manages canvas rendering, text extraction, and annotation overlays. The viewer layer provides UI components with an event bus for decoupled communication. The codebase demonstrates exceptional craftsmanship with clean abstractions (factory patterns, base classes, lazy initialization), extensive unit and integration tests, and a sophisticated build system that targets generic web, legacy browsers, Chrome, and Firefox. Key reusable patterns include a PostScript-to-typed-array compiler with fallback interpreter, a TrueType glyf table parser/writer, an operator list optimizer using state machines, a generic message handler for worker communication, and image processing utilities for signature extraction. The project is actively maintained with frequent commits, low technical drift, and a large community.
Certifi is a minimal Python library that provides Mozilla's curated collection of root CA certificates for SSL/TLS verification. It exposes two functions: `where()` returns the filesystem path to the bundled `cacert.pem` file, and `contents()` returns its contents as a string. The library handles both modern Python 3.11+ importlib.resources API and older versions, with careful management of context managers and atexit cleanup to support zipimport scenarios. It is a dependency of many popular Python packages (e.g., requests) and is automatically updated daily via a GitHub Actions workflow that fetches the latest Mozilla CA bundle. The codebase is small, well-tested, and demonstrates high craftsmanship in resource management and backward compatibility.
cubeb is a cross-platform C library for low-latency audio playback and recording, originally developed by Mozilla for Firefox. It provides a simple callback-based API and supports a wide range of backends including ALSA, PulseAudio, WASAPI, CoreAudio, OpenSL ES, AAudio, JACK, and others. The library handles device enumeration, resampling (via vendored Speex), channel mixing, and real-time streaming. Its architecture uses a vtable pattern ('cubeb_ops') to abstract backend implementations, and includes several high-quality lock-free data structures. While primarily a production library, it includes extensive test suites and debugging tools like audio dumping. The codebase is actively maintained, with ongoing migrations of some backends to Rust, but retains legacy backends (WinMM, OSS) with limited functionality.
Floorp is a Firefox-based browser that extends Gecko with a comprehensive feature layer including workspaces, split-view tiling, panel sidebar, PWA/SSB management, mouse gestures, keyboard shortcuts, command palette, tab stacks, design theming, private containers, external browser integration, notes, profile manager, and more. The architecture is hybrid: chrome components are built with SolidJS and injected via a custom loader into Firefox's XUL, while settings, new tab, notes, welcome wizard, and profile manager pages are standalone React/Vite web applications served within the browser. Configuration is stored in Firefox preferences with io-ts runtime validation, and cross-process communication uses a birpc bridge. The build system is Deno-based, orchestrating Vite builds, Firefox runtime patching, and platform-specific packaging (macOS App Shim in C++, Windows Tauri stub installer). The codebase demonstrates strong engineering practices with extensive test coverage (colocated browser tests, unit tests, integration tests), clean reactive state management patterns, and well-structured feature modules. However, it carries technical debt from multiple legacy migration paths, duplicated UI components across page apps, and tight coupling to Firefox internal APIs that require version-specific workarounds.
This repository is a collection of over 60 simple, installable WebExtension examples, primarily maintained by Mozilla. The codebase is not a single application but a set of independent browser extensions, each in its own directory, demonstrating specific WebExtensions APIs such as tabs, storage, webRequest, menus, and declarativeNetRequest. The examples cover both Manifest V2 and V3, with patterns for background scripts, content scripts, popups, sidebars, and options pages. The repository also includes a shared examples.json metadata file with schema validation, ESLint configuration, and a GitHub Actions workflow for linting and validation. The practical value lies in being a reference and starting point for developers building browser extensions, rather than a production-ready deployable system.