Arc is a beta Rust framework for event-sourced web applications.
It uses Actix Web, Tera, SQLite or Postgres, NATS JetStream, and Benthos. Browser routes use cookie sessions; API routes use JWT bearer authentication.
You do not need to clone this repository. Install the generator and create a minimal application:
cargo install arc-web-cli
arc new my-app
cd my-app
make setup
make devOpen http://127.0.0.1:8080/health.
For a browser UI with Tera views and assets:
arc new my-app --uiThe generated application owns its migrations, .env.example, Makefile, routes, and domain skeleton. make setup creates .env with a random local secret, creates SQLite, and runs migrations. It is safe to run again and does not replace an existing secret.
Generate a complete event-sourced resource from the application root:
arc generate resource Product --api
make migrateThis creates and registers the aggregate, commands, events, projector, read-model migration, focused tests, and JSON CRUD routes. Existing resources are never overwritten.
Requirements: stable Rust, SQLite development libraries, and make.
Clone this repository only when developing Arc itself:
cp .env.example .env
make setup
make frontend-build
make serveRun make deps-check to verify the repository’s Rust, Node.js, SQLite, and OpenSSL requirements.
Port 8080 must be free. If it is busy, edit .env:
APP_PORT=8081Then run make dev and open http://127.0.0.1:8081.
To find the process using port 8080 on Linux:
ss -ltnp '( sport = :8080 )'The quick start copies safe development defaults from .env.example.
The generated .env.example includes:
APP_URL=127.0.0.1
APP_PORT=8080
DATABASE_DRIVER=sqlite
DATABASE_URL=database/database.sqlite
SECRET_KEY=generate-memake setup replaces generate-me with a random 64-byte secret in .env. Never commit .env.
make setup # Create local config, database, and migrations
make dev # Run the server
make serve # Run the server (alias)
make migrate # Apply database migrations
make test # Run the full test suite
make check # Compile without runningRun make help for the complete command list.
arc-core: aggregates, commands, events, projections, sessions, audit, and integrity primitivesarc-es-sqlite: SQLite event, read-model, snapshot, and session storesarc-es-postgres: Postgres event, read-model, and snapshot storesarc-es-nats: NATS JetStream event publisherarc-web: reusable Actix runtime and framework helpersarc-web-cli: the published package that installs thearc newapplication and resource generatorarc-app: application-owned domains, routes, templates, validation, and migrations
Benthos is the only durable distributed event router. It consumes events.> and delivers to HTTP or NATS handlers; it never writes Arc databases directly.