This repository is the official implementation of the Elixir programming language. It contains the full compiler chain (Elixir-to-Erlang AST via Erlang source files in `lib/elixir/src/`), the standard library (`lib/elixir/lib/`), the Mix build tool (`lib/mix/`), the ExUnit test framework (`lib/ex_unit/`), the IEx interactive shell (`lib/iex/`), the Logger application (`lib/logger/`), and the EEx template engine (`lib/eex/`). The compiler is self-hosting: Elixir modules are compiled first by a bootstrap Erlang compiler, then later by the compiled Elixir itself. The standard library provides all core data types (String, List, Map, Tuple, etc.), concurrency primitives (Agent, Task, GenServer, Supervisor), I/O (File, IO), and utilities for JSON, URI, Regex, Calendar, etc. Mix is a complete build tool supporting dependency management (Hex, Git, paths), compilation (Elixir, Erlang, Leex, Yecc), testing, profiling, release creation, and archive/escript packaging. Architecturally, the system follows the Erlang/OTP conventions: each component is an OTP application with its own supervision tree, configuration, and lifecycle. The compiler backend is written in Erlang (e.g., `elixir_tokenizer.erl`, `elixir_expand.erl`, `elixir_erl.erl`) and produces Core Erlang for the BEAM VM. The runtime supports distributed process management, hot code swapping, and fault-tolerant supervision. The entire codebase is dual-licensed under Apache 2.0 with the Elixir trademark policy. Key entry points include the `elixir` and `iex` command-line scripts in `bin/`, the Mix CLI (`Mix.CLI`), the Erlang application start (`elixir.erl`), and the REPL server (`IEx.Server`). The system depends only on the Erlang/OTP runtime (OTP 27+), with no other external runtime dependencies. The repository is actively maintained by the Elixir core team with rigorous CI (Linux, macOS, Windows), code quality checks, and license compliance (ORT).
Plausible Analytics is a production-grade, privacy-first web analytics platform implemented as a full-stack SaaS application. The backend is built with Elixir/Phoenix (LiveView, Ecto, Oban) and uses ClickHouse as the primary analytics data store alongside PostgreSQL for transactional metadata. The frontend is a React/TypeScript single-page application with Tailwind CSS, and a separate JavaScript tracker script is distributed via npm and self-hosted CDN. The system handles event ingestion, session management, real-time dashboards, goal/funnel tracking, billing/subscriptions via Paddle, team collaboration, SSO/SAML authentication, data imports from Google Analytics, and a public Plugins API. The codebase is dual-licensed (Community Edition and Enterprise Edition) with conditional compilation for EE features like consolidated views, customer support tools, and audit logging. The architecture is modular with clear contexts (stats, ingestion, billing, teams, auth, shields) and extensive use of Oban workers for background jobs, ConCache for distributed caching, and OpenTelemetry for observability. The repository demonstrates high engineering craftsmanship with comprehensive test coverage (ExUnit, Playwright, k6 load tests), well-structured abstractions (cache behaviour, rate limiter, write buffers, session balancer), and a clear separation of concerns between the Phoenix web layer, LiveView components, and the React dashboard.
BullMQ is a high-performance, distributed job queue library. It manages the lifecycle of background jobs (add, process, retry, fail, complete) using Redis as the primary backend, with an optional PostgreSQL backend. The library supports advanced features including delayed jobs, prioritized queues, recurring jobs via schedulers, parent-child job flows, deduplication, rate limiting, concurrency control, stalled job recovery, and real-time event streaming. The architecture is driven by a set of Lua scripts (for Redis) and SQL functions (for PostgreSQL) that act as the single source of truth for all atomic state transitions. The core Node.js/TypeScript implementation features a clean backend abstraction (`IQueueBackend`) allowing transparent swapping of storage backends. Official ports exist for Python, Elixir, Rust, .NET, and PHP, all sharing the same underlying Lua/SQL semantics. The codebase demonstrates high craftsmanship with several safely reusable components, including a generic Lua script loader with include resolution, a standalone backoff strategy calculator, a cooperative cancellation token, and a batch lock renewal manager. The project is actively maintained with extensive CI/CD, semantic versioning, and a large community. The primary maintenance risk is the inherent complexity of keeping six language ports in perfect feature parity.
Ergo Framework is a Go implementation of the Erlang/OTP actor model for building concurrent, distributed, and fault-tolerant systems. It provides a complete actor runtime with processes, supervision trees, message passing (local and remote), service discovery, and network transparency. The architecture is library-based: applications import the framework and define actors, supervisors, and applications. Key entry points include `ergo.StartNode()` and the `gen`, `act`, `meta`, and `net` packages. The framework has zero core dependencies and uses a custom binary serialization (EDF) for inter-node communication. It is production-grade, with extensive testing, documentation, and a growing ecosystem of extra libraries (registrars, loggers, meta-processes). The codebase demonstrates high craftsmanship with lock-free data structures, efficient buffer pooling, and well-abstracted patterns. The last commit date appears anomalous (2026-09-04), but the repository is actively maintained with many stars and forks.
Thousand Island is a pure Elixir, OTP-based socket server library inspired by Ranch. It provides a supervision tree (Server → Listener + AcceptorPoolSupervisor → AcceptorSupervisor → Acceptor/DynamicSupervisor → Handler) that handles TCP and SSL connections with configurable concurrency, connection draining, and shutdown semantics. The library exposes a clean `ThousandIsland.Handler` behaviour for application-level protocol logic, and a `ThousandIsland.Socket` abstraction that decorates underlying transport sockets with automatic telemetry instrumentation. It emits rich telemetry spans for listeners, acceptors, and individual connections, supports suspend/resume of connection acceptance, and handles transient network errors and file descriptor exhaustion without crashing the acceptor tree. The code is thoroughly tested and free of external dependencies beyond telemetry, making it both a production-ready server and an exemplar of idiomatic Elixir/OTP patterns.
Scholar is a comprehensive machine learning library for Elixir, built directly on Nx (Numerical Elixir). It provides a scikit-learn-inspired API with fit/predict/transform patterns across supervised learning (linear/logistic/ridge/Bayesian ridge regression, SVM, naive Bayes variants, discriminant analysis), unsupervised learning (KMeans, DBSCAN, OPTICS, HDBSCAN, GMM, hierarchical clustering, PCA, KernelPCA, t-SNE, MDS, TriMap), preprocessing (scalers, encoders, imputers), metrics (classification, regression, clustering, ranking, distance), model selection (cross-validation, grid search), optimization (BFGS, Nelder-Mead, Brent), interpolation, and numerical integration. The library is designed for JIT/GPU execution via EXLA, with all numerical kernels written as Nx defn functions and models as Nx.Container structs. The included Livebook notebooks are educational demos, not the primary artifact, so the repository is fundamentally an application/library rather than a data-research project.
Logflare is a production-grade, multi-tenant log management platform (now part of Supabase) built with Elixir/Phoenix. It ingests logs via HTTP, gRPC (OTLP), WebSockets, and platform-specific drains, processes them through a rule engine, and routes them to user-configured backends including BigQuery, ClickHouse, Postgres, S3, and many more. The architecture is a monolithic Elixir application with internal subsystems: an ETS-backed ingest queue for high troughput, Broadway pipelines for batched ingestion, a behaviour-driven adaptor system for pluggable storage backends, a custom query languagte (LQL) with a parser and dialect transformers, a distributed cache layer via Cachex and WAL busting, and Rust NIFs for performance-critial mapping and Arrow IPC. It includes a full web UI (Phoenix LiveView), a REST API (OpenAPI-documented), billing with Stripe, team management, and alerting. The codebase is largte (1700+ files) and mature (100+ database migrations), with extensive test coverage, benchmarks, and CI/CD pipelines. While predominantly an application, it also exhibits data engineerig aspects with its focus on high-volume log ingstion, schema evolution, and query optimization.
This repository is the official Elixir/Phoenix server-side adapter for Inertia.js (v3). It enables Phoenix developers to build modern server-driven single-page applications without constructing a separate JSON API. The library intercepts HTTP requests via a Plug, detects Inertia.js headers, and renders page data as JSON for XHR requests or embeds it in an HTML template for the initial load. It handles asset versioning (409 responses), partial reloads, server-side rendering (SSR) via a Node.js worker pool, and provides a rich set of controller helpers for managing props (deferred, shared, once, scroll, merge, etc.). The architecture is centered around a core Plug (`Inertia.Plug`), controller macros (`Inertia.Controller`), HEEx components (`Inertia.HTML`), an SSR supervisor (`Inertia.SSR`), and a Mix task for scaffolding (`inertia.install`). It achieves extensibility through Elixir protocols for pagination (`Inertia.Paginated`), error handling (`Inertia.Errors`), and SSR adapters (`Inertia.SSR.Adapter`), allowing seamless integration with libraries like Scrivener, Flop, and Ecto. The codebase exhibits high craftsmanship. The prop resolution engine in `controller.ex` uses a sophisticated system of tagged tuples and recursive resolution to handle lazy evaluation, caching, merging, and transformation—a non-obvious and elegant functional pattern. The SSR adapter pattern cleanly isolates the Node.js worker pool management behind a behaviour. The testing module provides comprehensive helpers for integration testing. The library is actively maintained, tracks upstream Inertia.js changes (Laravel parity), and uses modern Elixir/Phoenix conventions. This library is ideal for Phoenix teams who want the development speed of a modern SPA framework (React, Vue, Svelte) with the server-side control and simplicity of a traditional server-rendered application. It eliminates the need for a dedicated frontend API layer while providing features like partial page rendering, lazy-loaded components, and server-side rendering for SEO and initial load performance.
Gettext is an internationalization (i18n) and localization (l10n) library for Elixir applications. It provides macros for marking strings in source code that need translation, extracts these strings into POT (Portable Object Template) files, and merges them with PO (Portable Object) files for different locales. At runtime, it looks up translations based on the current locale and supports features like pluralization, context-based translations, domain-specific messages, and string interpolation with compile-time optimization. The architecture follows a library pattern with clear separation between the API (Gettext module), backend behavior (Gettext.Backend), compilation (Gettext.Compiler), extraction (Gettext.Extractor), merging (Gettext.Merger), and specialized components for interpolation, pluralization, and fuzzy matching.
Protox is an Elixir library for Google Protocol Buffers (protobuf) that provides encoding/decoding to/from binary wire format, code generation from .proto schemas, and compile-time schema compilation. It supports both proto2 and proto3 syntaxes. The library is used by defining a module with `use Protox` and providing either an inline schema string or a list of .proto files; this macro triggers protoc to parse the definitions and generates Elixir structs with encode/decode functions, unknown field handling, and schema introspection. The generated code is self-contained and only requires the protox runtime for encoding/decoding primitives. The architecture is a mix of compile-time code generation (via Elixir macros) and runtime encoding/decoding primitives. Key entry points include the `Protox` macro, `Protox.encode/1`, `Protox.decode/2`, and the `mix protox.generate` task for generating standalone source files. The library relies on `protoc` (the protobuf compiler) only at compile time to produce a binary descriptor; all runtime operations are pure Elixir. External dependencies are minimal: protoc must be in PATH during development, and the runtime has no non-OTP dependencies. Protox emphasizes correctness and performance: it passes Google's official conformance test suite, uses property-based testing with StreamData, mutation testing with Muex, and maintains near-100% test coverage. The encoding/decoding paths are heavily optimized with unrolled varint loops, inline binary pattern matching, and careful accumulator management to minimize allocations. The library also supports unknown fields, message merging, proto2 required fields, nested extensions, and proto3 optional fields.
Boundary is an Elixir library that enables developers to define and enforce architectural boundaries within their applications. By specifying which modules belong to which boundaries and what dependencies are allowed between them, teams can prevent unwanted coupling and maintain clean architectural layers (e.g., keeping the web layer from directly accessing database modules). The library works as a mix compiler that hooks into Elixir's compilation process using compilation tracers. During compilation, it records all module/function calls, then validates these calls against the defined boundary rules. Violations are reported as compiler warnings, allowing developers to identify and fix dependency issues early in the development process. Beyond enforcement, Boundary provides a suite of mix tasks for visualizing and analyzing dependencies. These include tools to generate dependency graphs at both the module and function level, identify external dependencies, and create documentation groupings. The implementation demonstrates advanced Elixir techniques including effective use of GenServer for state management, ETS for efficient data storage during compilation, and clever tricks for incremental analysis to maintain performance in large projects.
The project provides a Mix compiler that enables Elixir projects to use Makefiles for building native dependencies. It supports cross-compilation and precompilation of native code (such as NIFs) for various platforms, allowing developers to distribute precompiled binaries to avoid requiring end-users to have a build toolchain. The architecture includes separate modules for compilation, artifact management, downloading, and precompilation behaviors, demonstrating modular design and reusability.
Rustler is a Rust library for writing safe, efficient Native Implemented Functions (NIFs) for the Erlang VM (BEAM), primarily used from Elixir. It provides a high-level, type-safe API that abstracts away the low-level C NIF interface, allowing developers to write NIFs in idiomatic Rust with automatic encoding/decoding of Erlang terms. The architecture consists of three main crates: `rustler` (core runtime and type system), `rustler_codegen` (procedural macros for NIF export and derive traits), and `rustler_mix` (Elixir Mix integration for building and loading NIFs). Key entry points include the `init!` macro to register NIFs, the `#[nif]` attribute macro to define functions, and derive macros like `NifStruct`, `NifMap`, and `NifTaggedEnum` for automatic term conversion. Data flows involve Rust functions receiving decoded Erlang terms (via the `Decoder` trait) and returning encoded terms (via the `Encoder` trait), with support for complex types, resources, threading, and serde serialization. External dependencies include the Erlang/OTP NIF API (dynamically loaded), the `inventory` crate for static registration, and optional `serde` and `num-bigint` crates.
Bamboo is a mature, well-architected Elixir library for composing and delivering emails through adapters. It provides a clean functional API for building email structs, a powerful address normalization system via the `Bamboo.Formatter` protocol, and built-in adapters for Mailgun, Mandrill, SendGrid, local in-memory storage, and testing. The library supports background delivery, email interceptors, attachments, plug-based preview of sent emails, and comprehensive test helpers. Production code is separated from optional Phoenix view integration (extracted to bamboo_phoenix). The architecture uses behaviours for adapters and delivery strategies, making it extensible. It is actively maintained, with recent commits and CI passing on Elixir 1.17-1.19.
Blockscout is an open-source blockchain explorer for EVM-compatible chains, written in Elixir using the Phoenix framework. It indexes and serves on-chain data including blocks, transactions, internal transactions, token transfers, token balances, contract code, and more. The system is composed of four umbrella apps: `explorer` (database schemas, chain import pipeline, caching), `block_scout_web` (Phoenix web server with REST API v2, JSON-RPC, GraphQL, and real-time WebSocket channels), `indexer` (background fetchers that pull data from Ethereum nodes using JSON-RPC), and `ethereum_jsonrpc` (transport abstraction with chain-specific variants for Geth, Nethermind, Besu, etc.). The architecture is a monolith with clear separation of concerns, using PostgreSQL as the primary store, ETS/ConCache for caching, and Oban for async job processing. It supports multiple chain types (Ethereum, Optimism, Arbitrum, Celo, ZkSync, Scroll, and more) via compile-time and runtime configuration, with chain-specific data models and import pipelines. External dependencies include a PostgreSQL database, an Ethereum JSON-RPC endpoint, optional microservices for smart contract verification (Rust verifier, Sourcify), and third-party market data providers (CoinGecko, DefiLlama). The frontend is a single-page application built with jQuery and custom JavaScript, with real-time updates via Phoenix Channels. The codebase is well-structured with extensive use of Elixir behaviours (BufferedTask, Import.Runner, FillingMigration) and a sophisticated caching layer. It is actively maintained with frequent releases, thorough CI/CD, and a large community.
Bandit is a production-grade HTTP server library for Elixir, implementing HTTP/1 (RFC 9112), HTTP/2 (RFC 9113), and WebSocket (RFC 6455) protocols. It is built on the Thousand Island connection management library and serves as the default HTTP server for the Phoenix web framework (since version 1.7.11). The library is designed for correctness, security, and performance, achieving 100% conformance in the h2spec (HTTP/2) and Autobahn (WebSocket) test suites, while outperforming alternatives like Cowboy in benchmark comparisons. Architecturally, Bandit uses a protocol-sniffing initial handler that dispatches incoming connections to either an HTTP/1 or HTTP/2 handler based on the client preface. HTTP/2 connections follow a process-per-connection model with a separate stream process for each concurrent request, while HTTP/1 and WebSocket connections operate within a single process. The library exposes a small public API centered on the `Bandit` module, which validates options and delegates to Thousand Island. Internally, it defines clear abstractions such as the `Bandit.HTTPTransport` protocol for shared transport logic, a reusable `Bandit.Extractor` state machine for frame parsing, and telemetry spans for observability. Key features include support for HTTP/1 keepalive, HTTP/2 flow control and HPACK header compression, WebSocket permessage-deflate compression, content-encoding negotiation (gzip, deflate, zstd), Unix socket binding, and comprehensive error handling with clear RFC citations. The library is actively maintained with frequent releases addressing security vulnerabilities and edge cases, and includes extensive CI workflows for conformance testing, benchmarking, and regression prevention.
Excellent Migrations is an Elixir library that analyzes Ecto migration files to detect potentially dangerous database operations that could cause downtime or data loss. It provides a Credo check, Mix tasks, and direct API usage to identify issues such as adding columns with default values, removing columns, running raw SQL, and more. The tool allows marking operations as safe via special comments or configuration to avoid false positives. The architecture is centered around AST parsing of migration files, with separate modules for detecting dangers, parsing safety comments, and filtering results. Key components like the AST parser and comment parser are well-crafted and reusable in other contexts.
Spark is a sophisticated Elixir library designed for building compile-time domain-specific languages (DSLs). It provides a structured, metaprogramming-driven framework for defining DSL extensions, entities, sections, transformers, verifiers, and persisters, and it automatically generates documentation, formatter support, IDE autocomplete (via ElixirSense), and test helpers. Spark is the foundation for all DSLs in the Ash framework, making it a critical, battle-tested component of the Elixir ecosystem. The library is implemented as a pure, reusable library with no runtime service or data pipeline; its primary input is Elixir source code and its output is augmented modules, generated docs, and introspection metadata. Architecturally, Spark exposes a clear extension pipeline: declarations (`use Spark.Dsl.Extension`) define sections and entities, transformations and verifications run at compile time, and persisted state is stored via process-bound keys and metadata. The library also includes a builder API (`Spark.Builder`) for declarative DSL schemas, an options validation system (`Spark.Options`) forked from NimbleOptions with enhanced typespec and documentation generation, and utility modules for formatting, cheat sheet generation, and source annotation tracking. Key entry points include `Spark.Dsl.Extension`, `Spark.Dsl`, `Spark.InfoGenerator`, and the testing helpers in `Spark.Test`. External dependencies are minimal (ExDoc, ElixirSense, Sourceror), with conditional compilation to support version variations. Spark’s design emphasizes elegance and reusability: the DSL metacontract (entities, sections, transformers, verifiers) is a proven pattern for anyone building a domain-specific language in Elixir. The codebase is well‑structured, heavily tested, and accompanied by comprehensive documentation and tutorials. However, it relies on deep metaprogramming and a vendored options library, which introduces some complexity and drift risk. The project is actively maintained, with frequent releases and a low issue count, and the tooling it provides (formatter, autocomplete, test capture) is exceptionally useful for DSL authors. While not a data processing tool, it is an exemplary model of how to build a robust developer-facing library.
asdf is a command-line application that manages multiple runtime versions (Node.js, Python, Ruby, etc.) per project using a plugin architecture. The Go binary dispatches commands like install, set, current, exec, and reshim; it reads `.tool-versions` files searched from the current directory upward, resolves versions via environment variables, plugin callbacks, and legacy version files, then invokes plugin-provided Bash scripts for listing, downloading, and installing tools. It generates shim executables that proxy to `asdf exec` at runtime, and supports shell completions, hooks, and extension commands. Architecturally, asdf is a modular single-binary Go application with internal packages for plugins, versions, shims, resolution, configuration, Git operations, execution, and plugin index lookups. Key external runtime dependencies are bash (plugin callbacks and hooks), git (plugin repository cloning/updating), and the asdf-plugins index. The codebase reflects a rewrite from Bash to Go (v0.16+), preserving the plugin extension model while introducing typed errors, interfaces, and more maintainable package boundaries. Some legacy BATS integration tests and in-progress cleanup comments remain, but the core implementation is clean and well-organized.
MyXQL is a MySQL database adapter for Elixir that provides connection pooling, query execution, prepared statements, transaction support, and streaming results. It implements the DBConnection behaviour for pooling and handles both text and binary protocols. The library features robust type conversion for MySQL data types (including JSON, geometric types, and custom types like DateTime and Decimal) and includes comprehensive error handling. The architecture separates concerns into modules for connection management (MyXQL.Connection), low-level protocol handling (MyXQL.Client and MyXQL.Protocol), and data type conversion (MyXQL.Protocol.Values).