Server

The webycash-server is an open-source implementation of the webcash protocol server. MIT license.

Source

The server is open source and available on GitHub under the MIT license.

github.com/webycash/webycash-server

Architecture

Written in Rust with the ractor actor framework. The server uses a free monad effect system for pure functional request handling with swappable backends.

Inbound HTTP (hyper)
  |
Router -> Handler (pure effect program)
  |
Effect interpreter (Redis / DynamoDB / FoundationDB)
  |
Actor system (Ledger, Miner, Stats, Supervisor)

The actor model provides fault isolation. Each actor owns its state. No shared mutable memory, no locks, no global singletons.

Database backends

Redis

Default backend. Fast, simple. Suitable for single-node and testnet deployments.

DynamoDB

AWS managed backend. Auto-scaling, pay-per-request.

FoundationDB

Distributed ACID transactions. For self-hosted deployments requiring strong consistency.

Redis + FoundationDB

Redis for hot path, FoundationDB for durable storage. High throughput with strong consistency.

Run locally with Docker Compose

Start Redis

docker compose up redis

Run the server

cargo run -- --config config/testnet.toml

Or build from source

git clone https://github.com/webycash/webycash-server.git cd webycash-server && cargo build --release

Run with Redis backend

WEBCASH_DB=redis REDIS_URL=redis://127.0.0.1:6379 ./target/release/webycash-server

Configuration

All configuration is through environment variables or TOML config files. See the repository README for the full list.

Deploy on Kubernetes

The webcash-server-k8s Terraform module deploys a high-availability webcash server cluster with Redis and FoundationDB on any Kubernetes cluster.

Supported providers

GCP (GKE)
AWS (EKS)
Azure (AKS)
DigitalOcean
OVH
Generic k8s

What it deploys

  • HA webycash-server pods with autoscaling
  • Redis cluster for hot path
  • FoundationDB cluster for durable storage
  • Ingress, TLS, and health checks
  • Monitoring and alerting (Prometheus-compatible)
module "webcash_server" {
  source  = "webycash/webcash-server-k8s"
  version = "~> 1.0"

  namespace      = "webcash"
  replicas       = 3
  db_backend     = "redis-fdb"
  network_mode   = "testnet"
  domain         = "webcash.example.com"
}