What is rlinks?
rlinks is the authoritative control plane and global edge runtime for the rmax.to redirect fabric.
It is an identity infrastructure system, not a marketing shortener or multi-tenant SaaS.
It provides a typed, schema-first redirect system managed via a CLI-first workflow, ensuring strict safety guarantees for high-value links.
Architecture & Planes
The system is divided into strict responsibility planes:
- Infrastructure Plane: Managed by Terraform.
- Control Plane: The rlinks CLI handles validation and mutation.
- Runtime Plane: Stateless Cloudflare Workers serving from KV at the edge.
Redirect Lifecycle & Schema
Every redirect is a typed object that moves through a strict lifecycle: Creation via CLI β Validation β KV Write β Worker Lookup β Hit Logging β Disable/Rotate.
The schema enforces invariants (no loops, no reserved words, HTTPS only) and supports forward-only versioning. Key fields include:
v: Schema versioncode: The short pathtarget: Destination URLrules: Routing logicstats: Observability metrics
Safety Guarantees
We treat redirects as critical infrastructure. Our safety guarantees include:
- No Loops: Strictly enforced by validation logic.
- Reserved Names: Critical paths cannot be overwritten.
- Disable-over-Delete: History is preserved; bad links are disabled, not erased.
- Append-only Logs: Full audit trail of hits and mutations.
- No Silent Failures: All errors are explicit.
CLI & Operations
The rlinks CLI is the only approved way to mutate state. It enforces the write pipeline:
rlinks-cli β rlinks-core β rlinks-kv β Cloudflare KV.
# Create a new redirect
rlinks set --code "infra" --target "https://github.com/rmax-ai/infra"
# Disable a redirect
rlinks disable "infra"
# Inspect redirect details
rlinks get "infra" --json
Development & Contribution
Developers must adhere to strict guidelines:
- Schema-First: All changes start with the schema.
- Invariants: Tests must verify safety guarantees.
- Local Dev: Use local Cloudflare KV emulation; no direct production KV writes.
- Performance: Respect runtime guardrails (<10ms target).
Review GUIDELINES.md and DEVELOPMENT.md before contributing.
Standard cargo test, clippy, and fmt rules apply.
Roadmap
Planned capabilities for the rlinks fabric:
- Analytics pipeline
- Canary routing
- Temporal redirects
- Signed links
- Geo-aware routing