Skip to content

digital-substrate/dsviper-node-web-cdbe

Repository files navigation

dsviper-web-cdbe (Node)

A Node/Express web application that demonstrates how to build a Commit Database Editor on top of @digitalsubstrate/dsviper — pure HTML5, no client JavaScript. It is the Node twin of the Python web-cdbe reference app, and doubles as a real-consumer validation of the dsviper read and write surface (commit-state browsing, DocumentNode rendering, and an in-place edit that commits a mutation back).

Prerequisites

  • Node.js >= 22
  • @digitalsubstrate/dsviper >= 1.2.3 (the Node binding)
  • A Viper commit database (.rapmc or equivalent) to point the server at

Install

npm install

Usage

The server opens the database pointed to by the database.link symlink in the project root. Create it first:

ln -sf /path/to/your/database.rapmc database.link
npm start

Then browse http://localhost:5000/ — the three views are:

Route View
/ Abstractions — the database's concepts / clubs / any-concept
/keys/:abstractionRuntimeId Keys — the instance keys of one abstraction
/documents/:abstractionRuntimeId/:conceptRuntimeId/:instanceId Documents — the collapsible attached-document tree, with in-place editing

Editing a scalar and pressing Update posts to /update, which commits the mutation back to the database (CommitMutableStatecommitMutations) and redirects to the edited node.

macOS note: the default port 5000 is taken by AirPlay Receiver (which answers 403). Either disable it (System Settings → General → AirDrop & Handoff → AirPlay Receiver) or run on another port: PORT=8080 npm start.

Scope

This is a reference app, cloned and run — not published to npm. It ports the headless web surface of the Python web-cdbe; the underlying binding is consumed as a peer dependency.

About

Node/Express reference app — a Commit Database Editor on @digitalsubstrate/dsviper, pure HTML5, no client JavaScript

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors