refactor: remove Phoenix content (moved to rodin/phoenix-patterns)

This commit is contained in:
Aaron Weiker
2026-04-29 23:10:14 -07:00
parent 2e7a822b6b
commit a1eebb48a5
4 changed files with 7 additions and 692 deletions
+7 -39
View File
@@ -1,47 +1,15 @@
# Idiomatic Elixir & Phoenix Patterns
# Elixir Patterns
Patterns, conventions, and code smells extracted directly from the Elixir and Phoenix source code — with citations to specific files and line numbers.
This is not opinion. This is what the source actually does.
## Source Versions
- **Elixir:** `main` branch (cloned 2026-04-29)
- **Phoenix:** `main` branch (cloned 2026-04-29)
Idiomatic Elixir patterns extracted from the [Elixir source code](https://github.com/elixir-lang/elixir) with verified file:line citations.
## Structure
### Core Patterns (`patterns/`)
- [GenServer Patterns](patterns/genserver.md) — Client/server separation, callbacks, state design
- [Error Handling](patterns/error-handling.md) — Error tuples, raise vs return, `with` chains
- [Data Transforms](patterns/data-transforms.md) — Pipelines, Enum/Stream idioms, reduce patterns
- [Process Design](patterns/process-design.md) — Supervision trees, process lifecycle, naming
- [Testing](patterns/testing.md) — ExUnit patterns, assertions, test organization
- [Documentation](patterns/documentation.md) — @moduledoc, @doc, @spec conventions
- [Typespecs](patterns/typespecs.md) — Type definitions, opaque types, when to use what
- [Macros](patterns/macros.md) — Macro patterns, hygiene, compile-time work
- [Behaviours](patterns/behaviours.md) — Behaviour design, callbacks, optional callbacks
- [Modules](patterns/modules.md) — Module organization, naming, structure
### Phoenix Patterns (`phoenix/`)
- [Phoenix Patterns](phoenix/patterns.md) — Endpoint, Router, Controller, Channel, PubSub
- [Phoenix Deviations](phoenix/deviations.md) — Where Phoenix differs from Elixir core
### Comparison (`comparison/`)
- [Elixir vs Phoenix](comparison/elixir-vs-phoenix.md) — Side-by-side comparison of approaches
### Code Smells (`smells/`)
- [Anti-Patterns](smells/anti-patterns.md) — Things the source avoids and why
- [Common Mistakes](smells/common-mistakes.md) — What "bad Elixir" looks like
- `patterns/` Core patterns (GenServer, error handling, data transforms, processes, testing, docs, typespecs, macros, behaviours, modules)
- `smells/` — Anti-patterns and common mistakes the Elixir team avoids
- `changelog/` — Daily digest of merged Elixir PRs with discussion summaries
## Philosophy
Every pattern here is backed by a source citation. If a pattern can't point to where the Elixir or Phoenix team actually does it, it doesn't belong here.
These rules are derived from what the Elixir source code *actually does*, not opinions or blog posts. Every pattern cites specific files and line numbers.
## Contributing
Found a pattern worth adding? Open a PR with:
1. The pattern name
2. The exact file path and line range
3. Why it matters
4. What the anti-pattern looks like
When unsure how to do something in Elixir, look at how Elixir core does it. This is how we define what "idiomatic" actually means.