Skip to content

Latest commit

Β 

History

History
105 lines (81 loc) Β· 3.14 KB

File metadata and controls

105 lines (81 loc) Β· 3.14 KB

DID WebVH Server

A comprehensive DID WebVH (Decentralized Identifier Web Verifiable History) server implementation with web explorer interface.

Features

  • DID Management: Create, resolve, and manage DIDs with WebVH method
  • Resource Management: Upload and manage attested resources (AnonCreds schemas, credential definitions, etc.)
  • Witness Registry: Manage known witness services and their invitation URLs
  • Policy Enforcement: Configurable policies for witness requirements, portability, prerotation, and endorsement
  • Web Explorer: Interactive web interface for browsing DIDs, resources, and witness network
  • AnonCreds Support: Publish and resolve AnonCreds objects as Attested Resources
  • Multiple Storage: Support for SQLite and PostgreSQL backends
  • Customizable Branding: Configurable UI themes and branding

Quick Start

Using uv

# Install dependencies
cd server
uv sync

# Copy example environment file
cp env.example .env

# Edit .env with your configuration
# Then run server
uv run python main.py

Using Docker

docker build -t didwebvh-server .
docker run -p 8000:8000 \
  -e WEBVH_DOMAIN=did.example.org \
  -e WEBVH_ADMIN_API_KEY=your-secret-key \
  didwebvh-server

Configuration

Create a .env file in the server directory. See env.example for all available options.

Minimum required configuration:

WEBVH_DOMAIN=did.example.org
WEBVH_ADMIN_API_KEY=your-secret-key

For complete configuration details, see the Configuration Guide in the user manual.

API Endpoints

For complete API documentation, see:

  • API Endpoints Guide - Detailed endpoint reference
  • Swagger UI - Interactive API docs at /docs when server is running

Quick reference:

  • GET / - Root endpoint (DID requests, invitation lookup, explorer)
  • GET /?namespace={ns}&alias={alias} - Request DID parameters
  • POST /{namespace}/{alias} - Create/update DID
  • GET /{namespace}/{alias}/did.json - Resolve DID
  • POST /{namespace}/{alias}/resources - Upload resource
  • POST /admin/witnesses - Manage witnesses
  • GET /explorer - Web explorer interface

Documentation

πŸ“š See the User Manual for comprehensive documentation:

  • Getting Started & Configuration
  • API Endpoints & Protocols
  • Roles (Admin, Witness, Controller, Watcher)
  • Admin Operations & DID Operations
  • AnonCreds Support
  • Examples

Interactive API Docs: Swagger UI at /docs when server is running

Development

Running Tests

cd server
uv run pytest

Code Structure

server/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ routers/      # API route handlers
β”‚   β”œβ”€β”€ plugins/      # Core plugins (didwebvh, storage, invitations)
β”‚   β”œβ”€β”€ models/       # Data models and schemas
β”‚   β”œβ”€β”€ db/           # Database models and storage
β”‚   └── templates/    # Jinja2 templates for explorer UI
β”œβ”€β”€ config.py         # Configuration settings
β”œβ”€β”€ main.py           # Application entry point
└── env.example        # Example environment file

License

Apache License 2.0