How cardano-foundation/cf-identity-wallet works
Project Type and Purpose
• The Identity Wallet is a full‐stack, cross-platform (Android, iOS, and web) self‐sovereign identity application that leverages the Key Event Receipt Infrastructure (KERI). Its purpose is to manage identifiers, credentials, and secure communications, integrating Cardano-specific protocols (e.g., CIP-45) and supporting SSI principles.
• The README emphasizes native biometrics, secure enclave usage, KERI cloud agents, and a reference implementation of KERI on Cardano. This shows that the system is both client-facing (mobile/web) and service-oriented with multiple backend components.
File Structure to Identify Architectural Components
• Mobile Applications: Look at the “android” and “ios” directories. They contain platform-specific code, configuration (e.g., Gradle, Xcode projects), and native assets that show the native mobile client layer.
• Web/Frontend: The “src/ui” folder (with components, pages, hooks, styles, etc.) clearly delineates the React (or similar) web application used for the wallet’s user interface.
• Core Logic & Agent: The “src/core” directory houses critical business logic (agent, storage, configuration), showing that a core SSI agent is embedded in the app.
• Services/Microservices: Under “services” you see various subfolders such as “credential-server”, “credential-server-ui”, “cip45-sample-dapp”, and others. These are containerized with Docker configurations, run as independent microservices that handle credential management, API endpoints, and integration with external KERI cloud agents.
• Configuration & Testing: Config files (Docker compose, environment examples, CI workflows) and comprehensive tests (in “tests” directory) illustrate support infrastructure and quality assurance.
• External Integration: External directories such as “keria-config” and “services/external” suggest integration with third-party KERI agent configurations and witness data.
a. Components to Include:
• Mobile Clients (Android & iOS native apps)
• Web Client (React-based or similar UI from “src/ui”)
• Core SSI Agent & Business Logic (from “src/core/agent”, “src/core/storage”, and “src/core/configuration”)
• Backend Services:
• Credential Server and APIs (from “services/credential-server”, “services/credential-server-ui”)
• CIP-45 dApp integration service (from “services/cip45-sample-dapp”)
• Additional microservices (if applicable, e.g., for notifications or connection management)
• External Services & Agents:
• KERI Cloud Agent (reference to external KERIA service)
• Cardano Backer / Signify TS edge client integration as per the README’s references
• Data Storage Layers:
• Secure storage (including modules for secure, SQLite, or Ionic storage under “src/core/storage”)
• Redux Store in “src/store” for client-side state management
b. Relationships and Data Flows:
• That the backend credential server communicates with external KERI services (and by extension, the Cardano blockchain ecosystem) for credential issuance and identity verification.
• Secure storage mechanisms within the client and core agent components.
c. Architectural Patterns and Design Principles:
• A microservices architecture on the backend—the “services” folder clearly separates concerns (credential issuance, dApp integration, legacy UI) that communicate over defined API interfaces.
• Separation of presentation (frontend UI), business logic (core agent), and data/storage layers, reflecting modern layered and modular design.
• The project leverages containerization (Docker, Docker Compose) for service deployment and Continuous Integration (GitHub workflows) for deployment management.
d. Technologies, Frameworks, and Libraries:
• Mobile: Native Android (Java/Kotlin with Gradle) and iOS (Swift/Xcode).
• Web/Frontend: Likely React with TypeScript, enhanced by Redux state management, as seen in “src/store” and “src/ui”.
• Backend: Node.js services (from the “services” directories with package.json files), Docker-based deployments, and potentially Express (in credential-server) for API endpoints.
• SSI Components: Integration with libraries conforming to KERI, CESR protocols, and Cardano-specific libraries.
• Component is clearly labeled (e.g., “Mobile Client - Android”, “Web Client”, “Credential Server”, “Core SSI Agent”, “KERI Cloud Agent”).
• Finally, provide annotations or legends that explain connection protocols (REST APIs, WebSockets, Docker orchestration) and deployment strategies (CI/CD pipelines).