# wizicer/maskmeta architecture

> Architecture diagram of the GitHub repository wizicer/maskmeta, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wizicer/maskmeta
- Repository: https://github.com/wizicer/maskmeta

## Overview

##### High-Level Architecture Components

The system should be represented as a full-stack application with the following main components:

a. Frontend Layer (Quasar/Vue.js):
- Main application container
- Views (Explore, Graph, Mask, Meta, ProofRequest pages)
- Component structure for dialogs and UI elements

b. Backend Layer (Node.js/Express):
- API endpoints
- Integration services for Web5, Arcblock, and Pinata
- Storage management

c. External Services:
- TBD (Web5)
- Arcblock
- Pinata IPFS
- Blockchain networks

##### Key Architectural Elements

a. Core Concepts (represented as distinct modules):
- Mask Management System
- Meta (VC) Management System
- ZKP Processing Module
- DID Integration Hub

b. Data Flow Paths:
- User Authentication Flow
- VC Issuance Flow
- ZKP Generation/Verification Flow
- Storage Operations (Online/Offline)

##### Detailed Component Breakdown

Frontend Components (from src/):
- Pages Layer
- Explore
- Graph
- Mask
- Meta
- ProofRequest
- Components Layer
- Dialogs (Detail/QR/ZKP)
- Core Components
- Stores Layer
- Vault Management

Backend Services (from server/):
- API Services
- Integration Services
- TBD Connector
- Arcblock Connector
- Pinata Connector
- Storage Management

##### Integration Points

Clearly mark:
- API endpoints
- External service connections
- Storage interfaces
- Blockchain interactions

##### Key Workflows

Four main scenarios:

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        MainLayout["Main Layout"]
        Router["Router"]
        GlobalConfig["Global Config"]

        subgraph Views
            Explore["Explore View"]
            Graph["Graph View"]
            Mask["Mask View"]
            Meta["Meta View"]
            ProofRequest["Proof Request View"]
        end

        subgraph Components
            DidDialog["DID Detail Dialog"]
            MaskDialog["Mask Detail Dialog"]
            MetaDialog["Meta Detail Dialog"]
            ZkpDialog["ZKP Dialog"]
            QrDialog["QR Code Dialog"]
            IssueProofDialog["Issue Proof Dialog"]
        end

        subgraph DataManagement
            VaultStore["Vault Store"]
            EntityModels["Entity Models"]
        end

        subgraph Extension
            Background["Background Process"]
            ContentScript["Content Script"]
            ExtManifest["Extension Manifest"]
        end
    end

    subgraph Backend
        Server["Main Server"]
        EnvConfig["Environment Config"]

        subgraph Services
            APIService["API Services"]
            TBDConnector["TBD Connector"]
            ArcblockConnector["Arcblock Connector"]
            PinataConnector["Pinata Connector"]
            StorageManager["Storage Management"]
        end
    end

    subgraph ExternalServices
        Web5["TBD Web5"]
        Arcblock["Arcblock"]
        IPFS["Pinata IPFS"]
        Blockchain["Blockchain Networks"]
    end

    %% Connections
    MainLayout --> Router
    Router --> Views
    Views --> Components
    Components --> DataManagement
    Extension --> MainLayout

    Server --> Services
    Services --> ExternalServices

    %% Click events
    click MainLayout "https://github.com/wizicer/MaskMeta/blob/main/src/layouts/MainLayout.vue"
    click Router "https://github.com/wizicer/MaskMeta/blob/main/src/router/routes.ts"
    click GlobalConfig "https://github.com/wizicer/MaskMeta/blob/main/src/boot/global.ts"
    click Explore "https://github.com/wizicer/MaskMeta/blob/main/src/pages/ExplorePage.vue"
    click Graph "https://github.com/wizicer/MaskMeta/blob/main/src/pages/GraphPage.vue"
    click Mask "https://github.com/wizicer/MaskMeta/blob/main/src/pages/MaskPage.vue"
    click Meta "https://github.com/wizicer/MaskMeta/blob/main/src/pages/MetaPage.vue"
    click ProofRequest "https://github.com/wizicer/MaskMeta/blob/main/src/pages/ProofRequestPage.vue"
    click DidDialog "https://github.com/wizicer/MaskMeta/blob/main/src/components/DidDetailDialog.vue"
    click MaskDialog "https://github.com/wizicer/MaskMeta/blob/main/src/components/MaskDetailDialog.vue"
    click MetaDialog "https://github.com/wizicer/MaskMeta/blob/main/src/components/MetaDetailDialog.vue"
    click ZkpDialog "https://github.com/wizicer/MaskMeta/blob/main/src/components/MetaZkpDialog.vue"
    click QrDialog "https://github.com/wizicer/MaskMeta/blob/main/src/components/MetaQrCodeDialog.vue"
    click IssueProofDialog "https://github.com/wizicer/MaskMeta/blob/main/src/components/IssueProofDialog.vue"
    click VaultStore "https://github.com/wizicer/MaskMeta/blob/main/src/stores/vault.ts"
    click EntityModels "https://github.com/wizicer/MaskMeta/blob/main/src/models/entity.ts"
    click Background "https://github.com/wizicer/MaskMeta/blob/main/src-bex/background.ts"
    click ContentScript "https://github.com/wizicer/MaskMeta/blob/main/src-bex/my-content-script.ts"
    click ExtManifest "https://github.com/wizicer/MaskMeta/blob/main/src-bex/manifest.json"
    click Server "https://github.com/wizicer/MaskMeta/blob/main/server/server.js"
    click EnvConfig "https://github.com/wizicer/MaskMeta/blob/main/server/.env.example"

    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef external fill:#f1c40f,stroke:#f39c12,color:black
    
    class MainLayout,Router,GlobalConfig,Explore,Graph,Mask,Meta,ProofRequest,DidDialog,MaskDialog,MetaDialog,ZkpDialog,QrDialog,IssueProofDialog,VaultStore,EntityModels,Background,ContentScript,ExtManifest frontend
    class Server,EnvConfig,APIService,TBDConnector,ArcblockConnector,PinataConnector,StorageManager backend
    class Web5,Arcblock,IPFS,Blockchain external
```
