A Clojure/Script RPC library for web applications that makes async server calls feel like expression evaluation.
Castra is an RPC library for Clojure and ClojureScript that enables developers to call server-side functions from the client as if they were local expressions. It abstracts HTTP communication into a seamless programming model, allowing thoughts like 'evaluate this expression on the server' instead of 'send a POST request to this endpoint.'
Clojure and ClojureScript developers building full-stack web applications who want a unified programming model across client and server, especially those using or interested in unidirectional dataflow and CQRS patterns.
Developers choose Castra for its elegant abstraction over HTTP RPC, reducing boilerplate and mental context switching between client and server code. Its integration with Javelin cells provides built-in state management for asynchronous operations, promoting clean architecture and developer productivity.
HTTP remote procedure call handler for Clojure.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Castra allows calling server functions directly from the client using Clojure expressions, abstracting HTTP details as shown in examples like `(update-record 123 {:x 1 :y 2})`, reducing boilerplate.
Integrates with Javelin cells to automatically manage loading, error, and success states for remote calls, demonstrated in client code with `record`, `error`, and `loading` cells.
Easily plugs into Ring-based Clojure servers via `wrap-castra`, requiring minimal configuration for server-side setup without additional HTTP handling.
Embraces CQRS and unidirectional patterns, promoting scalable architecture by separating commands and queries, as highlighted in the philosophy and Hoplon examples.
The project is at version 3.0.0-alpha7, indicating pre-release status with potential breaking changes, bugs, and incomplete features unsuitable for risk-averse production use.
Castra tightly couples with Javelin for state management, forcing adoption of Javelin even if teams prefer alternatives like Re-frame or plain Reagent, adding framework rigidity.
The README admits gaps with TODO items for explaining `defrpc` endpoints and validation, which can hinder onboarding and advanced usage without community resources.