How auvoid/ssimon works
Project type and purpose
• SSIMON is an open-source TypeScript library (not a monolithic app or microservice).
• Purpose: provide a modular, plug-and-play framework for creating, managing, and storing W3C Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs).
File structure
• Top-level:
• package.json, tsconfig.json, config files, docs/ (user/developer docs), .github/ (CI/CD + templates)
• src/ (all implementation code)
• src/NetworkAdapter/ (abstract and concrete adapters for DID methods)
• src/Storage/ (abstract and concrete stores, GenericStore)
• src/identity-manager.ts & .types.ts (core orchestration API)
• src/index.ts (public export entry point)
• Patterns:
• Adapter Pattern for pluggable DID methods (NetworkAdapter)
• Repository/Strategy-style for storage backends (Storage/GenericStore)
• Single responsibility in CredentialsManager and IdentityAccount submodules
• Tests in src/tests/ using Vitest, build scripts in .github/workflows
README
• Highlights adapter ecosystem, W3C compliance, “plug and play,” and simple API.
a. Main components:
• SSIMON Core API – exposed by src/index.ts & identity-manager.ts
• NetworkAdapter Layer – CredentialsManager, IdentityAccount adapters
• Storage Layer – GenericStore and other store implementations
• Utilities – codec, crypto
• External Systems – DID networks, data storage backends (e.g., local FS, cloud DB)
b. Relationships & data flow:
1. Client code → SSIMON Core API (initialize, issue DID/VC, query)
2. Core → NetworkAdapter(s) to interact with blockchain/ledger for DIDs & VCs
3. Core → StorageAdapter(s) to persist DIDs/VCs locally or remotely
4. Utility modules support both layers (e.g., crypto.js for signing)
c. Architectural patterns/design principles:
• Adapter pattern enables multiple DID methods
• Open/closed principle: new adapters added without touching core
• Separation of concerns: identity orchestration vs. network vs. storage
d. Key technologies/frameworks:
• TypeScript (src/, .types.ts)
• Node.js modules (package.json)
• Vitest for tests (vitest.config.ts)
Key detail pointers
• CredentialsManager and IdentityAccount as distinct sub-adapters under NetworkAdapter.
• GenericStore’s index.types.ts interface as the contract for all storage backends.
• Testing suite as a separate “Quality” artifact (Vitest) if desired.
Putting it together
• Layer 1 (top): Client Application (consumes @tanglelabs/ssimon)
• Layer 2: SSIMON Core API
• Layer 3a: NetworkAdapter
• CredentialsManager
• IdentityAccount
• Layer 3b: StorageAdapter
• GenericStore
• Layer 4 (bottom): External Systems
• DID Ledger / VC Registry
• Persistent DB / File System
• Utilities (side-bar feeding into Core & Adapters)