Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

⚡ FLASHY DOCUMENTATION — The Complete Reference for a Consent-Gated Economy

Everything you need to understand, build, and deploy the Flashy ecosystem. From core concepts to production patterns.

Comprehensive guides and references for Ledger, Rails, Magician, and FlashyID. Learn how the four systems integrate to build append-only settlement, consent-gated transfers, trust routing, and delegated identity. Every guide's samples name the exports the packages actually have, measured against a named commit.

🚀 Quick Start (30 minutes)

New to Flashy? Read in this order:

  1. ⚡ System Architecture (10 min) — How all four systems fit together
  2. 📊 Ledger Basics (5 min) — Append-only settlement
  3. ✅ Rails Consent (5 min) — The approval gate
  4. 🧭 Magician Trust (5 min) — Trust graphs and routing
  5. 🔐 FlashyID Assertions (5 min) — Verified assertions and delegation chains

Then run the working examples:

npm install && npm run examples:ledger
npm run examples:rails
npm run examples:magician
npm run examples:flashyid
npm run examples:combined

Documentation Structure

Every link below points at a page that exists; npm test fails otherwise.

Architecture (docs/architecture/)

  • overview.md — How all four systems work together; data flow diagrams

Guides (docs/guides/)

API Reference (docs/api/)

Each page is measured against a named commit of its package's source and says so at the top. Where a guide and an API page disagree, the API page was measured.

  • ledger-api.md — @flashylabs/ledger: post, the store port, entries, errors
  • rails-api.md — @flashylabs/rails: RailsService, draft → execute, grants, error codes
  • magician-api.md — @magician-network/core: trust/1, the router, consent, introduction/1
  • flashyid-api.md — @flashyid/sdk: verify, authorize, the grant kernel, rail tokens

Deployment (docs/deployment/)

  • patterns.md — Deployment patterns for each system and the full stack

Programme and principles

Planned pages

Named here so the plan is visible, and linked from nowhere until each one exists. No dates: a page is added when someone writes it from the source.

  • Architecture: ledger-design.md, rails-consent.md, magician-routing.md, flashyid-identity.md, integration-patterns.md
  • Troubleshooting: faq.md, debugging.md, errors.md, performance.md
  • Deployment: runbook.md, security.md, monitoring.md, production-patterns.md

🏗️ The Four Systems at a Glance

System What It Does Invariant
📊 Ledger Multi-asset settlement engine (append-only, hash-chained) Balance never goes negative; a replay settles once
✅ Rails Consent-gated movement of Flashy Gold, with attenuated grants Value leaves a holder only through execute with their consent
🧭 Magician Trust routing and sealed introductions Declined intro is opaque to requester
🔐 FlashyID OIDC provider + SDK for assertions and delegation chains Chains narrow only, never widen

All four systems work together — FlashyID signs the assertion and the consent, Magician routes through trust, Rails gates the transfer, Ledger records it immutably.

Running the Examples

All concepts are taught through runnable examples in flashy-examples:

npm run examples:ledger           # Ledger basics
npm run examples:rails            # Rails consent
npm run examples:magician         # Magician routing
npm run examples:flashyid         # FlashyID OAuth
npm run examples:combined         # Combined workflow
npm test                          # All tests

House Rules

True in every Flashy repository:

  • Amounts are Minor (branded integer), never raw numbers. Convert at the edge with the ledger's fromDecimal() / toDecimal(), or Rails' toMinor() / toGold() for Flashy Gold
  • Consent is explicit; never auto-approve. Every Rails execute requires a consent bound to that exact draft
  • Grants narrow, never widen. Attenuation is the only allowed delegation operation
  • Sealed means sealed. Outcomes use portable sha256; replayed digests are refused
  • Identity is opaque. No hardcoded names; holders are unforgeable identifiers
  • No unverified claims. Every number is measured, not assumed

Repository Layout

.
├── README.md                 # You are here
├── CLAUDE.md                 # Repository rules
├── docs/
│   ├── architecture/         # System design
│   ├── guides/               # Tutorials and how-tos
│   ├── api/                  # API reference, measured against source
│   ├── deployment/           # Production setup
│   └── STATUS.md             # Generated: what the sibling checkouts declare
├── tools/
│   ├── check-links.mjs       # Every relative link resolves to a file
│   ├── check-samples.mjs     # Every ```js / ```mjs fence parses (node --check)
│   └── status.mjs            # Writes docs/STATUS.md
└── .github/workflows/        # doc-checks.yml runs both checkers; secret-scan.yml

Worked examples live in the separate flashy-examples repository.

Contributing

Documentation improvements welcome. Before opening a pull request:

  • npm test passes: every relative link resolves and every JavaScript sample parses
  • TypeScript samples are checked by hand — nothing here type-checks them
  • Every claim about a package names the commit it was read from
  • No unverified audience claims or hardcoded figures

See CONTRIBUTING.md for details.

License

Apache-2.0. Holder: Flashy Labs.


Quick Links:

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages