How jaikanth-r/verifiable-state-layer works
VSL is an integrity layer for versioned application state: users create records and evidence events, the API derives chained state hashes and persists them, batches evidence into Merkle commitments, anchors roots to Fabric, and supports later independent verification and audit. The graph also preserves the Overview, tenant/role access, and participant capabilities documented by the README. Arrows use sampled source references or README statements; some unsampled route-to-service details are omitted rather than inferred.
Main entry points: server.ts Fastify API · database.ts PostgreSQL · main.tsx Web app · api.ts API client
Components 24
Web workspaces
- Web app
apps/web/src/main.tsx - Records workspace
apps/web/src/views/RecordsView.tsx - Overview workspace
apps/web/src/views/DashboardView.tsx - Verify workspace
apps/web/src/views/VerifyView.tsx - Audit workspace
apps/web/src/views/AuditView.tsx - API client
apps/web/src/api.ts
API and access
- Fastify API
apps/api/src/server.ts - Resource management
apps/api/src/services/resource-service.ts - Tenant access
apps/api/src/services/authorization.ts - Resource participants
apps/api/src/services/resource-participant-service.ts - Authentication
apps/api/src/services/authenticator-factory.ts - Audit querying
apps/api/src/services/audit-query-service.ts
Evidence integrity
- Evidence service
apps/api/src/services/evidence-service.ts - Evidence creation
packages/vsl-core/src/evidence.ts - Canonical hashing
packages/crypto/src/hash.ts - Evidence repository
packages/vsl-core/src/repository/evidence-repository.ts
Persistence
- PostgreSQL
apps/api/src/config/database.ts
Anchoring and verification
- Merkle batching
packages/vsl-core/src/anchoring/batch-service.ts - Merkle tree and proofs
packages/merkle/src/merkle.ts - Independent verification
packages/vsl-core/src/verification/merkle-verifier.ts - Fabric adapter
packages/vsl-core/src/blockchain/fabric-anchor-adapter.ts
Other components
- User
- Hyperledger Fabric
- OIDC provider
Connections 31
- User → Web app: uses
README.md - Web app → Records workspace: renders
apps/web/src/main.tsx - Web app → Overview workspace: renders
apps/web/src/main.tsx - Web app → Verify workspace: renders
apps/web/src/main.tsx - Web app → Audit workspace: renders
apps/web/src/main.tsx - Records workspace → API client: requests
apps/web/src/views/RecordsView.tsx - Overview workspace → API client: requests
apps/web/src/views/DashboardView.tsx - Verify workspace → API client: requests
apps/web/src/views/VerifyView.tsx - Audit workspace → API client: requests
apps/web/src/views/AuditView.tsx - API client → Fastify API: HTTP requests
README.md - Fastify API → Resource management: routes
apps/api/src/server.ts - Fastify API → Evidence service: routes
apps/api/src/server.ts - Fastify API → Resource participants: routes
apps/api/src/server.ts - Fastify API → Audit querying: routes
apps/api/src/server.ts - Fastify API → PostgreSQL: checks readiness
apps/api/src/server.ts - Evidence service → PostgreSQL: persists events
apps/api/src/services/evidence-service.ts - Evidence service → Evidence creation: creates event
apps/api/src/services/evidence-service.ts - Evidence service → Merkle batching: protects evidence
apps/api/src/services/evidence-service.ts - Evidence creation → Canonical hashing: hashes state
README.md - Merkle batching → PostgreSQL: reads and writes batches
packages/vsl-core/src/anchoring/batch-service.ts - Merkle batching → Merkle tree and proofs: builds commitment
packages/vsl-core/src/anchoring/batch-service.ts - Merkle batching → Fabric adapter: submits root
packages/vsl-core/src/anchoring/batch-service.ts - Fabric adapter → Hyperledger Fabric: anchors root
README.md - Independent verification → Merkle tree and proofs: checks proofs
packages/vsl-core/src/verification/merkle-verifier.ts - Independent verification → Canonical hashing: checks hashes
packages/vsl-core/src/verification/merkle-verifier.ts - Audit querying → PostgreSQL: queries events
apps/api/src/services/audit-query-service.ts - Resource participants → PostgreSQL: reads and writes
apps/api/src/services/resource-participant-service.ts - Resource management → Tenant access: enforces access
- Fastify API → Authentication: authenticates requests
- Authentication → OIDC provider: validates tokens
README.md - Evidence repository → PostgreSQL: stores evidence