# sparkdevnetwork/slingshot architecture

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

- Interactive diagram: https://gitdiagram.com/sparkdevnetwork/slingshot
- Repository: https://github.com/sparkdevnetwork/slingshot

## Overview

##### Main Components

a. Source Systems Layer:
- Separate modules for each supported system:
- CCB (Church Community Builder)
- F1
- ACS
- PCO (Planning Center Online)
- Breeze
- ServantKeeper
- ElexioCommunity

b. Core Processing Layer:
- Slingshot.Core module
- Data transformation utilities
- Model mapping system

c. Export Layer:
- .slingshot file generator
- Rock import format handler

##### Component Relationships

**[Source Systems] → [Translators] → [Core Processing] → [Export Layer] → [.slingshot file]**

##### Detailed Component Breakdown

a. For each source system module, show:
- API/Database connectors
- Authentication handlers
- Data extractors
- System-specific translators

b. For the Core Processing layer, show:
- Model definitions (from Slingshot.Core/Models)
- Data transformation utilities
- Validation handlers
- Extension methods

c. For the Export layer, show:
- File format handlers
- Data serialization
- Import package creation

##### Key Integration Points

Highlight:
- API interfaces (CcbApi.cs, F1Api.cs, etc.)
- Model translators (in each source system's Translators folder)
- Core data models (in Slingshot.Core/Models)

##### Technical Details

Specific components for:
- WPF UI interfaces (MainWindow.xaml, Login.xaml)
- Authentication handlers
- Data transformation utilities
- File format processors

##### Architecture Patterns

Emphasize:
- Modular design (separate projects for each source system)
- Common core library (Slingshot.Core)
- Translator pattern implementation
- Extension method utilities

##### Export Generation

- Component types
- Data flow directions
- Integration points
- File formats

This system design should emphasize the extensible nature of the platform, showing how new source systems can be added while maintaining the core processing and export functionality.

Remember to include notes about the Creative Commons ShareAlike license requirements, as this is an important aspect of the project's architecture and usage terms.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef sourceSystem fill:#b3d1ff,stroke:#333
    classDef core fill:#b3ffb3,stroke:#333
    classDef export fill:#ffd9b3,stroke:#333
    classDef ui fill:#e6e6e6,stroke:#333
    classDef api fill:#ffb3b3,stroke:#333
    classDef translator fill:#d9b3ff,stroke:#333

    %% UI Layer
    subgraph UI
        MainWindow["Main Window"]
        Login["Login Interface"]
    end
    click MainWindow "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot/MainWindow.xaml"
    click Login "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot/Login.xaml"

    %% Source Systems Layer
    subgraph SourceSystems
        CCB["CCB"]:::sourceSystem
        F1["F1"]:::sourceSystem
        ACS["ACS"]:::sourceSystem
        PCO["PCO"]:::sourceSystem
        Breeze["Breeze"]:::sourceSystem
        ServantKeeper["ServantKeeper"]:::sourceSystem
        ElexioCommunity["ElexioCommunity"]:::sourceSystem
    end

    %% API Connectors
    subgraph APIConnectors
        CCBApi["CCB API"]:::api
        F1Api["F1 API"]:::api
        ACSApi["ACS API"]:::api
        PCOApi["PCO API"]:::api
        BreezeApi["Breeze API"]:::api
        SKApi["ServantKeeper API"]:::api
        ECApi["ElexioCommunity API"]:::api
    end
    click CCBApi "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.CCB/Slingshot.CCB/Utilities/CcbApi.cs"
    click F1Api "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.F1/Slingshot.F1/Utilities/API/F1Api.cs"
    click ACSApi "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.ACS/Slingshot.ACS/Utilities/AcsApi.cs"
    click PCOApi "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.PCO/Utilities/PCOApi/PCOApi.cs"
    click BreezeApi "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.Breeze/Slingshot.Breeze/Utilities/BreezeApi.cs"
    click SKApi "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.ServantKeeper/Slingshot.ServantKeeper/Utilities/ServantKeeperApi.cs"
    click ECApi "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.ElexioCommunity/Slingshot.ElexioCommunity/Utilities/ElexioCommunityApi.cs"

    %% Translators
    subgraph Translators
        CCBTrans["CCB Translators"]:::translator
        F1Trans["F1 Translators"]:::translator
        ACSTrans["ACS Translators"]:::translator
        PCOTrans["PCO Translators"]:::translator
        BreezeTrans["Breeze Translators"]:::translator
        SKTrans["ServantKeeper Translators"]:::translator
        ECTrans["ElexioCommunity Translators"]:::translator
    end
    click CCBTrans "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.CCB/Slingshot.CCB/Utilities/Translators/"
    click F1Trans "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.F1/Slingshot.F1/Utilities/Translators/"
    click ACSTrans "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.ACS/Slingshot.ACS/Utilities/Translators/"
    click PCOTrans "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.PCO/Utilities/Translators/"
    click BreezeTrans "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.Breeze/Slingshot.Breeze/Utilities/Translators/"
    click SKTrans "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.ServantKeeper/Slingshot.ServantKeeper/Utilities/Translators/"
    click ECTrans "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.ElexioCommunity/Slingshot.ElexioCommunity/Utilities/Translators/"

    %% Core Processing Layer
    subgraph CoreProcessing
        CoreModels["Core Models"]:::core
        CoreUtils["Core Utilities"]:::core
        DataTransform["Data Transformation"]:::core
    end
    click CoreModels "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.Core/Slingshot.Core/Models/"
    click CoreUtils "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.Core/Slingshot.Core/Utilities/"
    click DataTransform "https://github.com/SparkDevNetwork/Slingshot/tree/master/Slingshot.Core/Slingshot.Core/Utilities/ExtensionMethods/"

    %% Export Layer
    subgraph ExportLayer
        ImportPackage["Import Package Handler"]:::export
        SlingshotFile[".slingshot file"]:::export
    end
    click ImportPackage "https://github.com/SparkDevNetwork/Slingshot/blob/master/Slingshot.Core/Slingshot.Core/Utilities/ImportPackage.cs"

    %% Connections
    MainWindow --> Login
    CCB --> CCBApi
    F1 --> F1Api
    ACS --> ACSApi
    PCO --> PCOApi
    Breeze --> BreezeApi
    ServantKeeper --> SKApi
    ElexioCommunity --> ECApi

    CCBApi --> CCBTrans
    F1Api --> F1Trans
    ACSApi --> ACSTrans
    PCOApi --> PCOTrans
    BreezeApi --> BreezeTrans
    SKApi --> SKTrans
    ECApi --> ECTrans

    CCBTrans & F1Trans & ACSTrans & PCOTrans & BreezeTrans & SKTrans & ECTrans --> CoreProcessing
    CoreProcessing --> ImportPackage
    ImportPackage --> SlingshotFile

    %% Legend
    subgraph Legend
        L1["Source System"]:::sourceSystem
        L2["Core Component"]:::core
        L3["Export Component"]:::export
        L4["API Connector"]:::api
        L5["Translator"]:::translator
        L6["UI Component"]:::ui
    end
```
