Developer Reference

Docs

Implementation Map

System

Architecture

Next.js hosts the operator console and API routes. The API validates Cases, stores MVP state in memory, runs mock or OpenRouter consensus, and prepares GenLayer registry payloads.

Lifecycle

Resolution Flow

A Case moves through creation, evidence collection, validator evaluation, consensus, verdict issuance, and GenLayer anchoring. Each material action appends an audit event.

Contract

API

POST /api/resolutions creates a Case. GET /api/resolutions lists Cases. GET /api/resolutions/{id} returns detail. POST /api/resolutions/{id}/resolve runs the resolver.

AI Consensus

OpenRouter

When enabled, independent validator prompts request structured JSON outputs. Demo mode can fall back to fixtures; operational modes return unresolved when real consensus is unavailable.

Trust Anchor

GenLayer

The ResolutionRegistry Intelligent Contract is the intended canonical registry. The current adapter is server-only and disabled by default until deployment credentials are configured.

Deployment Path

GenLayer Simulator

Use docs/genlayer-simulator.md and scripts/genlayer/* to start localnet, deploy ResolutionRegistry, and verify get_case_count without exposing secrets.

Developer Surface

Future SDK

A future SDK should package Case creation, policy definitions, evidence references, GenLayer payload mapping, and registry reads for consuming intelligent contracts.

Primitives

Core Vocabulary

Case
Verdict
Evidence
Consensus
Audit Trail
Validator
Policy
Intelligent Contract

Runtime

Operational Mode

Current Mode

loading

Demo mode preserves the judge flow. Local mode uses configured OpenRouter and in-memory state. Production mode refuses mock evidence and returns unresolved until real requirements are present.

OpenRouter

Not configured

AI Consensus

Disabled

GenLayer

Disabled

Evidence

loading

Getting Started

Quick Start

Clone the repository and install dependencies:

cd apps/web
npm install
npm run dev

Open http://localhost:3000 to access the Resolution Console.

Environment configuration:

# AI Consensus (optional)
OPENROUTER_API_KEY=
OPENROUTER_SITE_URL=
OPENROUTER_APP_NAME=GenLayer AI Resolution
OPENROUTER_MODEL=~openai/gpt-latest
AI_CONSENSUS_ENABLED=false

# Evidence Pipeline (disabled by default)
EVIDENCE_PIPELINE_ENABLED=false
EVIDENCE_FETCH_TIMEOUT_MS=8000
EVIDENCE_MAX_SOURCES=6
EVIDENCE_ALLOWED_DOMAINS=
EVIDENCE_BLOCKED_DOMAINS=
EVIDENCE_USER_AGENT=GenLayerAIResolution/0.1

# GenLayer (disabled by default)
GENLAYER_ENABLED=false
GENLAYER_RPC_URL=
GENLAYER_PRIVATE_KEY=
GENLAYER_CONTRACT_ADDRESS=