Skip to main content
This guide walks through the complete local setup: starting infrastructure, configuring environment variables, running the API, issuing a credential, and verifying it publicly. By the end you will have a working Certiva instance and a verified credential response.
You need Node.js 20+, pnpm 9+, and Docker with Docker Compose installed before starting.
1

Clone and install dependencies

2

Start infrastructure

This starts PostgreSQL 16 on port 5432 and Redis 7 on port 6379. Both have health checks configured — wait a few seconds before proceeding.
3

Configure environment variables

Copy the example files for each app:
Minimum values to set in apps/api/.env for local development:
STORAGE_DRIVER=local is only allowed in development. Staging and production require STORAGE_DRIVER=r2 with Cloudflare R2 credentials. See Configuration for the full variable reference.
4

Run migrations and start the API

Prisma migrations are applied automatically on startup via prisma migrate deploy. The API listens on port 4000 by default.Confirm it is running:
5

Start the web dashboard and worker

In two separate terminals:
The dashboard is available at http://localhost:3000.
6

Seed the database and issue a credential

Create the initial Owner admin account:
Log in and get a token:
The API also sets an httpOnly cookie (certiva_access_token). Browser-based dashboard requests use the cookie automatically — no manual header needed.
Issue a credential:
anchorStatus starts as PENDING and transitions to ANCHORED after the worker processes the blockchain job. This happens asynchronously and does not block the credential from being verified immediately.
7

Verify the credential publicly

Anyone can verify without a Certiva account:
A result of VALID confirms the credential is active and unrevoked. Once the worker anchors the credential, blockchainVerified becomes true and the response includes txHash, blockNumber, and anchoredAt.

Next steps

Concepts

Credential lifecycle, verification modes, roles, and blockchain anchoring.

Configuration

Every environment variable with validation rules and production requirements.

Workflows

Bulk issuance, revocation, document proofs, and admin management.

API Reference

All endpoints with request/response shapes.