# sharpmars/inkschedule-3 architecture

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

- Interactive diagram: https://gitdiagram.com/sharpmars/inkschedule-3
- Repository: https://github.com/sharpmars/inkschedule-3

## Overview

##### Main Components

a) Frontend Layer:
- React-based UI components (src directory)
- Entry components for different game modes
- Styling system (UnoCSS)

b) Backend Layer:
- Tauri Rust backend (src-tauri directory)
- System tray integration
- API communication handler

c) External Services:
- splatoon3.ink API integration

**┌─────────────────────────────────────────────────┐**
- Frontend (UI)                   │
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
- Entries   │ │   Navbar    │ │    App      │ │
- Components  │ │  Component  │ │  Component   │ │
- ┘ └─────────────┘ └─────────────┘ │
- ┬─────────────────────────┘

**┌───────────────────────▼─────────────────────────┐**
- Tauri Backend (Rust)               │
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
- System     │ │    API      │ │   State     │ │
- Tray      │ │  Client     │ │  Manager    │ │
- ┘ └─────────────┘ └─────────────┘ │
- ┬─────────────────────────┘

**┌───────────────────────▼─────────────────────────┐**
- External Services                   │
- ┌─────────────────────────────────────────────┐ │
- splatoon3.ink API                 │ │
- ┘ │
- ┘

##### Component Details

Frontend Layer:
- Different entry components (AnarchyEntry, BigRunEntry, etc.)
- Relationship between EntryList and individual entries
- Styling system (UnoCSS) and configuration files

Tauri Backend Layer:
- System tray integration
- API communication handling
- State management for schedule data

External Services Layer:
- Splatoon3.ink API endpoint
- Relevant API authentication or rate limiting

##### Additional Elements

- Version information
- Build/deployment flow
- Development vs production environments

##### Technical Stack Indicators

- React/TypeScript for frontend
- Rust for backend
- Tauri for desktop integration
- Vite for build system
- UnoCSS for styling

Remember to maintain a balance between showing enough detail to understand the system's architecture while keeping it clean and readable. The focus should be on the interaction between the three main layers and how they work together to deliver the schedule information to the user's taskbar.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Frontend
        App["App Component"]
        Navbar["Navigation Bar"]
        EntryList["Entry List"]
        
        subgraph Entries
            AnarchyEntry["Anarchy Entry"]
            RegularEntry["Regular Entry"]
            SalmonEntry["Salmon Run Entry"]
            XEntry["X Battle Entry"]
            BigRunEntry["Big Run Entry"]
            ChallengeEntry["Challenge Entry"]
            FestEntry["Fest Entry"]
        end
        
        subgraph Styling
            UnoCSS["UnoCSS System"]
            BaseStyles["Base Styles"]
        end
        
        subgraph Handlers
            ScheduleHandler["Schedule Handler"]
            StageInfo["Stage Information"]
            GameModes["Game Modes Definition"]
        end
    end
    
    subgraph Backend
        TauriBackend["Tauri Backend"]
        SystemTray["System Tray"]
        TauriConfig["Tauri Configuration"]
        BuildConfig["Build Configuration"]
    end
    
    subgraph External
        SplatoonAPI["splatoon3.ink API"]
    end
    
    %% Frontend Relationships
    App --> Navbar
    App --> EntryList
    EntryList --> AnarchyEntry
    EntryList --> RegularEntry
    EntryList --> SalmonEntry
    EntryList --> XEntry
    EntryList --> BigRunEntry
    EntryList --> ChallengeEntry
    EntryList --> FestEntry
    
    %% Styling Relationships
    UnoCSS --> App
    BaseStyles --> App
    
    %% Handler Relationships
    ScheduleHandler --> EntryList
    StageInfo --> EntryList
    GameModes --> EntryList
    
    %% Backend Relationships
    TauriBackend --> SystemTray
    TauriBackend --> TauriConfig
    TauriBackend --> BuildConfig
    
    %% External Communication
    ScheduleHandler -.-> SplatoonAPI
    TauriBackend -.-> SplatoonAPI
    
    %% Click Events
    click App "https://github.com/SharpMars/inkschedule-3/blob/main/src/App.tsx"
    click Navbar "https://github.com/SharpMars/inkschedule-3/blob/main/src/Navbar.tsx"
    click EntryList "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/EntryList.tsx"
    click AnarchyEntry "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/AnarchyEntry.tsx"
    click RegularEntry "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/RegularEntry.tsx"
    click SalmonEntry "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/SalmonEntry.tsx"
    click XEntry "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/XEntry.tsx"
    click BigRunEntry "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/BigRunEntry.tsx"
    click ChallengeEntry "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/ChallengeEntry.tsx"
    click FestEntry "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/FestEntry.tsx"
    click TauriBackend "https://github.com/SharpMars/inkschedule-3/blob/main/src-tauri/src/main.rs"
    click TauriConfig "https://github.com/SharpMars/inkschedule-3/blob/main/src-tauri/tauri.conf.json"
    click ScheduleHandler "https://github.com/SharpMars/inkschedule-3/blob/main/src/schedule.ts"
    click GameModes "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/modes.ts"
    click StageInfo "https://github.com/SharpMars/inkschedule-3/blob/main/src/entries/stage.ts"
    click UnoCSS "https://github.com/SharpMars/inkschedule-3/blob/main/uno.config.ts"
    click BaseStyles "https://github.com/SharpMars/inkschedule-3/blob/main/src/styles.css"
    click BuildConfig "https://github.com/SharpMars/inkschedule-3/blob/main/vite.config.mts"
    
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#e67e22,stroke:#d35400,color:white
    classDef external fill:#2ecc71,stroke:#27ae60,color:white
    classDef handler fill:#9b59b6,stroke:#8e44ad,color:white
    
    class App,Navbar,EntryList,AnarchyEntry,RegularEntry,SalmonEntry,XEntry,BigRunEntry,ChallengeEntry,FestEntry,UnoCSS,BaseStyles frontend
    class TauriBackend,SystemTray,TauriConfig,BuildConfig backend
    class SplatoonAPI external
    class ScheduleHandler,StageInfo,GameModes handler
```
