How getmeemaw/meemaw works
Major Components
• Client Applications:
– Web Client (located under client/web/meemaw-js and client/web/wasm)
– iOS Client (located under client/ios/meemaw-ios)
– A Go-based client (client/client.go and client/tss_add.go) that might be used for ancillary functionality.
• Server-Side Components:
– Main server application (server/main.go and server/cmd/main.go)
– Auth providers (server/auth_providers.go)
– Database layer (server/database including models, queries, and SQLC integration with schema.sql and query.sql)
– TSS operations (multiple files in server like tss_add.go, tss_dkg.go, tss_recover.go, tss_sign.go)
– Vault operations (server/vault)
• Utilities and Common Services:
– TSS and transaction related utilities (under utils/tss, utils/tx)
– Configuration utilities (utils/config) and custom types (utils/types)
– WebSocket functionality (utils/ws)
• Infrastructure & Deployment Artifacts:
– Dockerfile and docker-compose.yml for containerization
– GitHub Actions workflows (in .github/workflows) for testing, build, documentation, and releases
– Go releaser configuration (.goreleaser.yml)
• Documentation:
– The complete docs folder with Docusaurus configuration (docs folder) that also houses the blog and guides.
Relationships and Interactions
• Client-to-Server Communication:
– The Web and iOS client SDKs integrate with the backend server via exposed APIs.
– The interactions involve wallet creation, recovery, and cryptographic operations without transmitting actual private keys.
• Server’s Internal Architecture:
– The server handles authentication (integrates with external Auth Providers) and processes wallet operations using TSS logic.
– It interacts with a database module for persistent storage (models and queries).
– It likely also mediates signing operations, connecting with lower-level utilities (TSS and vault services) to create and sign transactions.
• Auxiliary Services & Utilities:
– Utilities in the “utils” directory orchestrate tasks like configuration management, transaction processing, and peer coordination in TSS.
• Deployment Pipeline:
– CI/CD configurations and container files indicate automated builds and releases with Docker and GitHub Actions.
Architectural Patterns and Design Principles
• Separation of Concerns:
– User-facing client SDKs are separated from the backend service that handles secure wallet operations.
• Modular Design:
– Individual directories for TSS, database, and utilities suggest modular design that isolates cryptographic processing, configuration, and domain logic.
• Microservices-Like Boundaries (Logical):
– Even if deployed as a single service, the clear separation of “client”, “server”, and “utils” implies logical boundaries that might be decomposed in the future into specialized microservices.
• Security and Trustlessness:
– Emphasis on a trustless design where the server never directly accesses private keys, using MPC-TSS protocols.
• Use of CI/CD and Containerization:
– Docker and GitHub actions denote a continuous integration and deployment approach.
Diagramming the Architecture
– “Web Client SDK” (with JavaScript/WebAssembly aspects)
– “iOS Client SDK”
– “Backend Server” with sub-components: Authentication, Database, TSS Management, Vault Services.
– “Utilities” illustrating shared services like transaction processing, configuration, and WebSockets.
– Illustrate API calls from the web/iOS clients to the backend server.
– Show internal data flows from the server’s authentication module to the database and TSS modules.
– Use a distinct style for infrastructure elements (containerization/CI pipelines).
• External Dependencies:
– Optionally, show integration with third-party Auth providers if applicable.