Hypha Stack
Components made to fit together.
Designed from the ground up to build software that matters.
HTTP and APIs
An RFC-strict web framework, typed end to end, fast and multi-core by design. OpenAPI docs via Scalar.
Data contracts
Unified JSON contracts, strict by the standard, for backend, frontend and agents. Printed as JSON Schema and Zod.
Data and persistence
Typed Postgres queries, checked against the database schema. Migrations built in, on a native driver with TLS, pooling and failover.
Observability
OpenTelemetry-compatible logs, traces and metrics, from the first request into every query. Health checks for any orchestrator, and no secret ever logged.
Identity and access
Sessions, CSRF and CORS, secure by default. Standard credentials and per-route rate limits.
Jobs
A durable job queue in your own Postgres that scales. Scheduled, prioritised and resilient.
Front end
Reactive front ends on SolidJS, with accessible components. Same language and shared types, from the browser to the database.
Analytics
Typed dataframes and an embedded OLAP engine.
WIP
Integrations
Webhooks, notifications and SDKs for third-party services.
WIP
The Ontology.
An explicit model of what an application is built from: its concepts, what each one means, and how they relate. People and agents work from the same definitions. No one has to guess what a word means.
- Page is built from Component.
- Page is served by Route.
- Component shows State.
- Query calls Route.
- Query fills State.
- Form is a Component.
- Form is checked by Client schema.
- Route answers Request.
- Route returns Response.
- Refusal is a Response.
- Handler serves Route.
- Route is typed by Data shape.
- Client schema printed from Data shape.
- API spec printed from Route.
- Handler runs Statement.
- Statement returns Row.
- Statement runs on Database.
- Migration changes Database.
- Connection pool connects to Database.
- Transaction groups Statement.
- Trace follows Request.
- Span is part of Trace.
- Span records Statement.
- Metric counts Request.
- Log records Request.
- Health check checks Database.
- Identity has Permission.
- Permission guards Route.
- Request carries Session.
- Session proves Identity.
- Identity acts for Tenant.
- Rate limit throttles Request.
- Audit log records Request.
- Handler reads Config.
- Config holds Secret.
- Feature flag gates Handler.
- Handler reads Cache.
- Handler emits Event.
- Event waits in Queue.
- Queue feeds Job.
- Schedule starts Job.
- Webhook delivers Event.
- Webhook arrives as Request.
- Job runs Statement.
- Handler stores File.
- Event triggers Notification.
- Notification sent as Email.
What the language cannot say,the system cannot get wrong.
OCaml meets every need at once, and the stack is built within its limits. It makes contracts and failure cases explicit, but it does not make an application correct on its own.
- Types that model the domain
- Variants and records name each state, pattern matching handles each one, and the compiler warns of a case left out.
- Boundaries in the language
- Module signatures and abstract types say what a component exposes, and the compiler holds every caller to it.
- Code that reads as its model
- Concise, with types inferred, keeping intent and failure cases in plain sight.
- Feedback while the work is fresh
- Builds and tests stay quick enough for the compiler to answer inside the loop an agent works in.
- Native and managed
- Compiled to native code, with a garbage collector and a simple runtime.
- Effects for I/O
- Concurrency without async and await: code reads in order, and every task is bound to the work that started it.
OCaml in production at
- Jane Street
- Bloomberg
- Meta
- Docker
- Ahrefs
- Tezos
- LexiFi
- Citrix
Practices that hold the boundaries.
Rules for how the code is written and worked on, the same for every part, and checked on every change.
- A single source of truth.
- The rules, the practices and the ontology live in a shared Vault. Nothing is copied, so nothing drifts, and code by a person or an agent reads as if one hand wrote it.
- An architecture that scales.
- Carefully crafted from years of building complex systems, it brings the best ideas of enterprise software into one solid design that grows with the product.
- Decided before it is built.
- Agents question a request until nothing is left to guess, and the work is written as requirements with scenarios, signed before any code.
- A spec that stays true.
- What the application is gets written again from what was built, at every landing, so it never falls behind the code.
- A harness that knows the code.
- Agents read each module's contract, see every error the compiler raises, and search the code, reading what it means from its types rather than guessing from its text.
- Computed, not guessed.
- What can be worked out is worked out: generated, parsed, validated, compiled. A model is asked only where judgement is needed.
Build with Hypha.
Talk to us
Bring a product or an idea.
Read the code
The components are open: source, tests and documentation.
Read the principles
The argument in full, in seven propositions.
