# lumii-syslab/viziquer architecture

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

- Interactive diagram: https://gitdiagram.com/lumii-syslab/viziquer
- Repository: https://github.com/lumii-syslab/viziquer

## Overview

##### Main Components
- Frontend Client:
– Located in directories such as app/client and app/imports/client.
- Backend Server:
– Found in app/server and app/imports/server.
– Contains Meteor-specific server code including methods, publications, and integrations (with subfolders for “platform” and “custom/vq”).
- Shared/Imported Components:
– The app/imports folder groups shared code that can be used by both client and server (for example, collections, libraries, and configuration utilities).
- External Services:
– PostgreSQL Database: Used by the DSS for storing data schemas.
- Supporting Infrastructure:
– The Dockerfile and docker-compose.yml indicate containerized deployment options.
– Build and workflow pipelines are defined within the .github/workflows directory.
– Additional directories like data, doc, and libs support documentation, sample schemas, and third-party libraries.

##### Interactions and Relationships
- Shared Code Usage: Indicate that both client and server layers rely on the “imports” folder components to maintain modularity.
- External Integration: Show how the server layer interacts with the DSS, which in turn communicates with an external PostgreSQL instance for schema storage.
- Docker and CI/CD: Optionally, include a side note or a container representing deployment pipelines as well as Dockerized environments for development, testing, and production.

##### Architectural Patterns and Technologies
- Meteor’s Full-Stack Paradigm: Emphasize that the project handles both frontend (UI rendering with Blaze templates) and backend through an integrated JavaScript framework.
- Separation of Concerns: Note the clear division between presentation (client/templates), business logic (server/methods and libraries), and persistence (database interactions through Meteor collections and external PostgreSQL for DSS).
- Modular Design: The structure in “imports” and separate directories for platform features and custom extensions reflect a modularized and extensible design.
- Docker and CI/CD: Integration with containerization and GitHub Actions (in the workflows folder) indicates a modern approach to deployment and continuous integration.

##### Detailed Recommendations
– Include any architectural patterns that are visible, such as the MVC-like separation (view templates vs. server methods) or micro-modular design through the “imports” division.
– Emphasize clarity in data flow (for example, show how a query defined on the client is processed by the server, manipulated using custom libraries, and passed on to the DSS).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        FC["Frontend Client (Meteor+Blaze)"]:::frontend
        UI["UI Assets (app/client)"]:::frontend
        CC["Custom ViziQuer Components (app/imports/client/custom/vq)"]:::frontend
    end

    %% Application/Business Layer
    subgraph "Application/Business Layer"
        BS["Backend Server (Meteor Methods/Publications)"]:::backend
        PS["Platform Services (app/server/platform)"]:::backend
        CS["Custom ViziQuer Logic (app/imports/server/custom/vq)"]:::backend
    end

    %% Shared Modules
    subgraph "Shared Modules"
        SC["Shared Code (app/imports)"]:::shared
    end

    %% Data & Integration Layer
    subgraph "Data & Integration Layer"
        DSS["Data Shape Server (DSS)"]:::external
        PG["PostgreSQL Database"]:::database
    end

    %% Deployment & CI/CD
    subgraph "Deployment & CI/CD"
        DOCK["Docker & Containerization (Dockerfile,docker-compose)"]:::infra
        CICD["CI/CD Pipelines (.github/workflows)"]:::infra
    end

    %% Connections
    %% Client to Server Communication via DDP calls
    FC -->|"DDP"| BS
    UI -->|"triggers"| BS
    CC -->|"executes"| CS

    %% Shared code usage by Client and Server
    SC ---|"shared"| FC
    SC ---|"shared"| BS

    %% Server internal dependencies
    BS -->|"uses"| PS
    BS -->|"routes"| CS

    %% External Integration
    BS -->|"integrates"| DSS
    DSS -->|"stores"| PG

    %% Deployment and CI/CD flows
    CICD -->|"builds"| DOCK
    DOCK -->|"deploys"| BS

    %% Click Events
    click UI "https://github.com/lumii-syslab/viziquer/tree/development/app/client"
    click CC "https://github.com/lumii-syslab/viziquer/tree/development/app/imports/client/custom/vq"
    click BS "https://github.com/lumii-syslab/viziquer/tree/development/app/server"
    click CS "https://github.com/lumii-syslab/viziquer/tree/development/app/imports/server/custom/vq"
    click PS "https://github.com/lumii-syslab/viziquer/tree/development/app/server/platform"
    click SC "https://github.com/lumii-syslab/viziquer/tree/development/app/imports"
    click DSS "https://github.com/lumii-syslab/viziquer/tree/development/app/private/jsons"
    click DOCK "https://github.com/lumii-syslab/viziquer/tree/development/Dockerfile"
    click CICD "https://github.com/lumii-syslab/viziquer/tree/development/.github/workflows"

    %% Styles
    classDef frontend fill:#AEDFF7,stroke:#005F94,stroke-width:2px;
    classDef backend fill:#F7D6AE,stroke:#A65D00,stroke-width:2px;
    classDef shared fill:#D5F7AE,stroke:#4F9400,stroke-width:2px;
    classDef external fill:#F7AECF,stroke:#94004F,stroke-width:2px;
    classDef database fill:#FFF7AE,stroke:#949400,stroke-width:2px;
    classDef infra fill:#E5E5E5,stroke:#555,stroke-width:2px;
```
