Current section
Files
Jump to
Current section
Files
mix.exs
defmodule Fief.MixProject do
use Mix.Project
@source_url "https://github.com/hansihe/fief"
def project do
[
app: :fief,
version: "0.1.0",
elixir: "~> 1.20",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
name: "Fief",
description: description(),
package: package(),
source_url: @source_url,
docs: docs()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp aliases do
[
seams: "cmd bash scripts/check_seams.sh"
]
end
defp description do
"CP key ownership for Elixir clusters: at most one node owns a given key, " <>
"in every failure mode."
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
defp deps do
# Amendment to the zero-runtime-deps principle (M7, user-authorized
# 2026-07-07): ecto_sql/postgrex as OPTIONAL deps for the Postgres
# adapter. Fief itself compiles and runs without them — the adapter
# duck-types the user's repo (`repo.query/2`, no Ecto API calls), and
# `Fief.Authority.Postgres.Migrations` is guarded by
# `Code.ensure_loaded?(Ecto.Migration)`.
[
{:ecto_sql, "~> 3.10", optional: true},
{:postgrex, "~> 0.18", optional: true},
{:ex_doc, "~> 0.34", only: :dev, runtime: false}
]
end
# Docs config (documentation-plan.md D0, §7). `extras` lists every guide
# page from the §4 page inventory; `groups_for_extras` groups them by
# audience tier (§3); `groups_for_modules` is the rough §5 module triage —
# grouping only, does not touch moduledocs.
defp docs do
[
main: "overview",
extras: [
"guides/overview.md",
"guides/guarantees.md",
"guides/concepts/ownership.md",
"guides/concepts/leases.md",
"guides/concepts/authority.md",
"guides/concepts/instances.md",
"guides/getting-started.md",
"guides/key-lifecycle.md",
"guides/fencing-modes.md",
"guides/delivery-and-errors.md",
"guides/configuration.md",
"guides/cache.md",
"guides/protocols/join-leave.md",
"guides/protocols/transfer.md",
"guides/protocols/failure.md",
"guides/protocols/netsplit-matrix.md",
"guides/operations/postgres.md",
"guides/operations/tuning.md",
"guides/operations/runbook.md",
"guides/extending/authority-adapters.md",
"guides/extending/vnode-impls.md",
"guides/extending/migration-embedding.md",
"guides/internals/verification.md",
"guides/internals/architecture.md"
],
groups_for_extras: [
Overview: [
"guides/overview.md",
"guides/guarantees.md"
],
Concepts: [
"guides/concepts/ownership.md",
"guides/concepts/leases.md",
"guides/concepts/authority.md",
"guides/concepts/instances.md"
],
"Using Fief.Key": [
"guides/getting-started.md",
"guides/key-lifecycle.md",
"guides/fencing-modes.md",
"guides/delivery-and-errors.md",
"guides/configuration.md"
],
"Using Fief.Cache": [
"guides/cache.md"
],
Protocols: [
"guides/protocols/join-leave.md",
"guides/protocols/transfer.md",
"guides/protocols/failure.md",
"guides/protocols/netsplit-matrix.md"
],
Operations: [
"guides/operations/postgres.md",
"guides/operations/tuning.md",
"guides/operations/runbook.md"
],
"Extending Fief": [
"guides/extending/authority-adapters.md",
"guides/extending/vnode-impls.md",
"guides/extending/migration-embedding.md"
],
Internals: [
"guides/internals/verification.md",
"guides/internals/architecture.md"
]
],
groups_for_modules: [
"Core API": [
Fief,
Fief.Key,
Fief.Cache,
Fief.Hasher,
Fief.Hasher.Default
],
"Authority contracts": [
Fief.StateStore,
Fief.Leadership,
Fief.Leadership.Store,
Fief.Presence
],
Adapters: [
Fief.Authority.Postgres,
Fief.Authority.Postgres.Migrations,
Fief.Authority.Local,
Fief.Leadership.FromStore
],
"Vnode layer (experimental)": [
Fief.Vnode,
Fief.Cache.VnodeImpl
],
"Transfer engine": [
Fief.Transfer,
Fief.Transfer.Donor,
Fief.Transfer.Recipient,
Fief.Transfer.Channel,
Fief.Transfer.Channel.InBand
],
Internal: [
Fief.Node,
Fief.Node.ConfigMismatchError,
Fief.Node.JoinError,
Fief.Router,
Fief.Router.Cache,
Fief.Planner,
Fief.Planner.Supervisor,
Fief.Planner.Elector,
Fief.Vnode.Agent,
Fief.Vnode.Manager,
Fief.Vnode.Manager.Tracker,
Fief.Key.Server,
Fief.Key.VnodeImpl,
Fief.Key.Limbo,
Fief.Key.Limbo.Tracker,
Fief.Wire,
Fief.Instance,
Fief.Supervisor
],
Seams: [
Fief.Seam,
Fief.Seam.Real,
Fief.Seam.Sim,
Fief.Sim,
Fief.Sim.ManualClock,
Fief.Sim.Scheduler
]
]
]
end
end