Skip to main content

Architecture Overview

Veylent is a monorepo containing four main components, managed by Nx.

veylent/
├── apps/
│ ├── desktop/ Tauri 2 (Rust + React) desktop app
│ ├── api/ NestJS backend server
│ ├── web/ Verification web app (React + Vite)
│ ├── verify/ Mobile verification app (Expo)
│ └── docs/ This documentation (Docusaurus)
├── libs/
│ └── shared/
│ ├── types/ Shared TypeScript types (signing record, API results)
│ └── crypto/ Record decryption and scan check (verifyAnchor)
└── contracts/ Solidity smart contracts (Hardhat)

Data Flow​

Architecture data flow

Communication Protocols​

PathProtocolData
Desktop -> APIHTTPS POSTAnchor ID, composite hash, previous anchor ID, encrypted payload
API -> BlockchainJSON-RPCanchorDocument transaction; anchorBlock and event lookups
API -> DatabasePrisma/SQLAnchor record (anchor ID, tx hash, encrypted payload)
Phone -> Web AppHTTPS GETVerification URL from QR
Web App / Mobile / Desktop -> APIHTTPS GETVerification query by anchor ID

The verification query only needs the server's database for the encrypted payload. The on-chain part (block, composite hash, previous anchor ID, timestamp) can be read directly from the contract by anyone.

Technology Stack​

ComponentTechnologyWhy
Desktop frontendReact 19, TypeScriptComponent model, ecosystem
Desktop backendRust (Tauri 2)PDF manipulation, cryptography, security
API serverNestJS, TypeScriptStructured backend, validation, modules
DatabasePostgreSQL (Prisma)Relational data, migrations
BlockchainEthereum-compatible (Hardhat for dev)Smart contracts, public verifiability
Verification webReact, ViteLightweight, fast loading for mobile
MonorepoNx 22Task orchestration, caching, dependencies