Connect Your Server
This Scala.js application operates a Graviton server that you provide. GitHub Pages does not host a backend, so this page begins disconnected unless you start a server and configure its endpoint. It has no offline dataset, generated metrics, or substitute success state.
The console supports:
- streaming a selected file to
POST /api/v1/blobs - listing persisted manifests from
GET /api/v1/blobs - inspecting the exact block layout from
GET /api/v1/blobs/{id}/metadata - reading and hashing stored bytes through
POST /api/v1/blobs/{id}/verify - downloading the stored bytes
- deleting a blob manifest while retaining shared CAS blocks
- reading live health and process counters
Start the service
GRAVITON_BLOB_BACKEND=fs \
GRAVITON_FS_ROOT=/tmp/graviton-data \
GRAVITON_HTTP_PORT=8081 \
./sbt "server/run"The default unsecured local server enables CORS so a locally served documentation console can call it. Security-enabled deployments can use an exact allowed origin or a same-origin reverse proxy. Canonical blob routes answer validated bearer-token preflights without making the actual API anonymous.
Build and serve the console in another terminal:
./sbt buildFrontend
npm ci --prefix docs
npm run docs:dev --prefix docsUse the API endpoint field below to connect. The selected endpoint is stored in browser local storage. For a secured server, paste a bearer token into the optional password field. The token exists only in page memory, is attached to API requests and fetch-based downloads, and is cleared on reload. Connection failures remain visible and do not trigger a fallback. For a self-contained public interaction, use the CAS Playground.
Verify without a browser
printf 'hello graviton\n' > /tmp/graviton-input.txt
BLOB_ID="$(
curl -fsS -X POST \
-H 'content-type: application/octet-stream' \
--data-binary @/tmp/graviton-input.txt \
http://localhost:8081/api/v1/blobs | jq -r '.blob.id'
)"
curl -fsS http://localhost:8081/api/v1/blobs | jq .
curl -fsS "http://localhost:8081/api/v1/blobs/$BLOB_ID/metadata" | jq .
curl -fsS -X POST "http://localhost:8081/api/v1/blobs/$BLOB_ID/verify" | jq .
curl -fsS "http://localhost:8081/api/v1/blobs/$BLOB_ID" -o /tmp/graviton-output.txt
cmp /tmp/graviton-input.txt /tmp/graviton-output.txt