How walt-id/waltid-identity works
Project type and purpose
• This is a monorepo for “Identity by walt.id”: a full-stack, multi-platform identity solution.
• It contains:
– Kotlin/Java and JavaScript libraries (crypto, DID, credentials, protocols, auth, permissions).
– REST microservices (Issuer API, Verifier API, Wallet API, Web3-login service).
– White-label applications (Web wallet, Portal, CLI, Android & iOS sample apps).
– Docker-compose configuration for local end-to-end deployment.
File structure
• Top-level directories:
– waltid-libraries/… – core SDK modules (crypto, did, credentials, sdJwt, openid4vc, authnz, permissions) organized by domain.
– waltid-services/… – REST service projects each with config/, src/, Dockerfile, k8s/.
– waltid-applications/… – front-end apps and the CLI under separate subfolders.
– docker-compose/ – orchestrates services & apps via Docker Compose.
• Each microservice in waltid-services follows a similar Ktor-based MVC/web plugin structure with config files, main entrypoint, controllers, services, persistence models and tests.
• The libraries are multi-module, multi-platform (commonMain, jvmMain, iosMain, jsMain, with tests).
• README and .github/workflows define CI/CD and releases.
Insights from README
• The README enumerates functional blocks:
– SDKs: Crypto, DID, W3C credentials, mdoc, OpenID4VC, SD-JWT, Auth/NZ, Permissions.
– REST APIs: Issuer, Verifier, Wallet.
– Apps: Web-wallet (nuxt/PWA), Portal (Next.js), CLI, Android & iOS test apps.
Main components
a. Multi-Platform Libraries (SDK layer)
– Crypto, DID, Credential parsers & signers, Protocol implementations.
b. REST Services (Backend layer)
– Issuer API
– Verifier API
– Wallet API
– (Optional) Web3-login microservice
c. Applications (Frontend & CLI)
– Waltid-CLI (Kotlin Multiplatform command-line tool)
– Waltid-Web-Portal (Next.js issuer/verifier UI)
– Waltid-Web-Wallet (Nuxt.js PWA)
– Mobile samples (Android, iOS)
d. Orchestration & Infrastructure
– Docker-Compose group, Caddy reverse‐proxy, Vault, databases (Postgres/MSSQL/SQLite options), configuration.
– Kubernetes manifests under each service’s k8s/ folder for prod/dev.
Relationships & interactions
• SDK libraries are dependencies of the microservices and apps.
• Frontends talk to their respective REST APIs (Wallet UI → Wallet API, Portal → Issuer & Verifier APIs).
• Issuer API uses Crypto & DID SDK to sign/issue credentials, persists state in DB.
• Verifier API fetches credential presentations, uses Credential & Policy SDKs.
• Wallet API orchestrates user accounts, stores credentials, interacts with DID resolver and key-management SDKs.
• CLI invokes underlying libraries directly and can call REST endpoints.
• docker-compose.yml wires all services + Vault + Caddy + DB into a local testbed.
Architectural patterns & principles
• Modular monorepo: clear separation by domain.
• Microservice pattern for backend APIs, each with its own database and config.
• MPP (Kotlin Multiplatform) for shared code across JVM, JS, iOS.
• MVC/web-plugin structure in Ktor-based services.
• Infrastructure as code: Docker Compose for local dev, Kubernetes manifests for cloud.