# junobuild/juno architecture

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

- Interactive diagram: https://gitdiagram.com/junobuild/juno
- Repository: https://github.com/junobuild/juno

## Overview

##### Main System Components

The system architecture should be divided into these key components:

a. Frontend Layer:
- Console UI (SvelteKit application)
- Client SDKs
- Authentication interfaces
- Analytics dashboard

b. Backend Services:
- Console Canister (main management service)
- Mission Control Canister (monitoring and control)
- Observatory Canister (analytics and monitoring)
- Orbiter Canister (analytics collection)
- Satellite Canister (core functionality)

c. Core Features:
- Authentication system
- Datastore
- File Storage
- Hosting
- Serverless Functions
- Analytics

##### Component Relationships

**Client Layer**
- ↓↑
**Console UI (Frontend) → Authentication**
- ↓↑
**Console Canister**
- ↓↑
**Mission Control Canister → Observatory Canister**
- ↓↑                        ↓↑
**Orbiter Canister   ←→    Satellite Canister**

##### Specific Implementation Details

Technical elements:
- Internet Computer blockchain integration
- WebAssembly (Rust) backend services
- SvelteKit frontend framework
- Docker containerization
- Certified assets system
- Custom domain handling
- ICP/Cycles management

##### Key Features to Highlight

Platform capabilities:
- Blockchainless development approach
- Zero-knowledge architecture
- Decentralized storage
- Serverless functions
- Analytics collection
- Authentication flows

##### Infrastructure Layer

Infrastructure components:
- Internet Computer Protocol (ICP) integration
- Canister smart contracts
- Storage management system
- Monitoring and observability

##### Security Layer

Security features:
- Authentication mechanisms
- Certified assets
- Controller management
- Access control

For the principal software engineer, emphasize:
##### The monitoring and observability architecture

This will provide a comprehensive view of the system while highlighting its key architectural decisions and implementation details.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        SDK[Client SDKs]
        Auth["Authentication Interface"]:::auth
        click Auth "https://github.com/junobuild/juno/tree/main/src/frontend/src/lib/api/actors/"
    end

    subgraph Frontend
        ConsoleUI["Console UI"]:::frontend
        click ConsoleUI "https://github.com/junobuild/juno/tree/main/src/frontend/src/lib/"
        AuthComp["Authentication System"]:::auth
        click AuthComp "https://github.com/junobuild/juno/tree/main/src/frontend/src/lib/components/auth/"
        Analytics["Analytics Dashboard"]:::analytics
        click Analytics "https://github.com/junobuild/juno/tree/main/src/frontend/src/lib/components/analytics/"
        Monitor["Monitoring System"]:::monitor
        click Monitor "https://github.com/junobuild/juno/tree/main/src/frontend/src/lib/components/monitoring/"
        Wallet["Wallet Management"]:::wallet
        click Wallet "https://github.com/junobuild/juno/tree/main/src/frontend/src/lib/components/wallet/"
    end

    subgraph Features
        DataStore["Datastore"]:::feature
        click DataStore "https://github.com/junobuild/juno/tree/main/src/frontend/src/routes/(split)/datastore/"
        Storage["File Storage"]:::feature
        click Storage "https://github.com/junobuild/juno/tree/main/src/frontend/src/routes/(split)/storage/"
        Hosting["Hosting"]:::feature
        click Hosting "https://github.com/junobuild/juno/tree/main/src/frontend/src/routes/(split)/hosting/"
    end

    subgraph "Core Services"
        Console["Console Canister"]:::core
        click Console "https://github.com/junobuild/juno/tree/main/src/console/"
        MissionControl["Mission Control Canister"]:::core
        click MissionControl "https://github.com/junobuild/juno/tree/main/src/mission_control/"
        Observatory["Observatory Canister"]:::analytics
        click Observatory "https://github.com/junobuild/juno/tree/main/src/observatory/"
        Orbiter["Orbiter Canister"]:::analytics
        click Orbiter "https://github.com/junobuild/juno/tree/main/src/orbiter/"
        Satellite["Satellite Canister"]:::satellite
        click Satellite "https://github.com/junobuild/juno/tree/main/src/satellite/"
    end

    subgraph Libraries
        CoreLibs["Core Libraries"]:::lib
        click CoreLibs "https://github.com/junobuild/juno/tree/main/src/libs/"
        StorageLib["Storage Implementation"]:::lib
        click StorageLib "https://github.com/junobuild/juno/tree/main/src/libs/storage/"
        SharedUtils["Shared Utilities"]:::lib
        click SharedUtils "https://github.com/junobuild/juno/tree/main/src/libs/shared/"
        Collections["Collections Management"]:::lib
        click Collections "https://github.com/junobuild/juno/tree/main/src/libs/collections/"
    end

    %% Connections
    SDK --> Auth
    Auth --> ConsoleUI
    ConsoleUI --> AuthComp
    ConsoleUI --> Analytics
    ConsoleUI --> Monitor
    ConsoleUI --> Wallet
    ConsoleUI --> Features
    Features --> Console
    Console --> MissionControl
    MissionControl --> Observatory
    MissionControl --> Orbiter
    Orbiter <--> Satellite
    Observatory <--> Satellite
    CoreLibs --> Console
    StorageLib --> Storage
    SharedUtils --> Console
    Collections --> DataStore

    %% Styles
    classDef frontend fill:#3498db
    classDef auth fill:#f1c40f
    classDef analytics fill:#e67e22
    classDef monitor fill:#2ecc71
    classDef wallet fill:#9b59b6
    classDef feature fill:#1abc9c
    classDef core fill:#2ecc71
    classDef satellite fill:#8e44ad
    classDef lib fill:#95a5a6

    %% Legend
    subgraph Legend
        Frontend_L["Frontend Components"]:::frontend
        Auth_L["Authentication Components"]:::auth
        Analytics_L["Analytics Components"]:::analytics
        Monitor_L["Monitoring Components"]:::monitor
        Wallet_L["Wallet Components"]:::wallet
        Feature_L["Platform Features"]:::feature
        Core_L["Core Services"]:::core
        Satellite_L["Satellite Services"]:::satellite
        Lib_L["Libraries"]:::lib
    end
```
