API-Programming Paradigm
By using dependent types, Stellar allows you to manipulate APIs like never before, allowing sequencing, parallel and concurrent calls, and augmenting existing API with new calls.
A library for API programming in Idris2. Build interactive programs declaratively by composing APIs.
By using dependent types, Stellar allows you to manipulate APIs like never before, allowing sequencing, parallel and concurrent calls, and augmenting existing API with new calls.
APIs are abstract over the substrate you run them on, define your API first and extend it to support HTTP, CLI, JSONRPC, or MCP without touching your core logic.
Stellar is build on category theory and type theory. Nothing is hardcoded, nothing is hacked together, nothing is a heuristic, we are fully precise in our definitions with no room for uncertainty.
-- Describe the API once, as data
APP : API
APP = GET_ALL + MARK_DONE + CREATE_TODO
-- Back it with a SQL database
todos : APP =&> SQL
todos = execDB queries-- given an implementation of your application
appRuntime : APP =&> End
-- You can serve an HTTP API for it
serveHTTP : HTTP =&> End
serveHTTP = routeHTTP |&> map appRuntime |&> maybeEnd
-- ...or provie a command line interface
runCLI : CLI =&> End
runCLI = parseCLI |&> map appRuntime |&> maybeEnd-- Your application
appRuntime : APP =&> End
-- API that returns your server's details
serverInfo : MCPINIT =&> End
-- transform your API into one that runs through MCP
runMCP : JSONRPC =&> End
runMCP = instanciateMCP appRuntime ServerInfo
-- instanciate MCP via HTTP
runMCPHTTP : HTTP =&> End
runMCPHTTP = jsonRPCHTTP |&> map runMCP |&> maybeEndLearn how Stellar works, build your first app, discover a new foundation for software.