# theverystarlk/athan architecture

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

- Interactive diagram: https://gitdiagram.com/theverystarlk/athan
- Repository: https://github.com/theverystarlk/athan

## Overview

##### Component Breakdown

Presentation Layer (Top):
- Create sub-components for each feature module:
- Welcome Module
- Prayers Module
- Settings Module
- Offline Module
- Use rounded rectangles for views and associated viewmodels

Business Logic Layer (Middle):
- Core services:
- NavigationService
- NotificationService
- SettingsService
- PrayerService (application-level)

Services Layer (Bottom):
- External Services:
- LocationService
- Prayer API Service
- HTTP Client Services

##### Detailed Elements

For each major component, include:
- Component name
- Key responsibilities
- Major dependencies
- Interface boundaries

##### The initialization process through the Bootstrapper

Key Relationships to Highlight:
- How the ShellViewModel orchestrates other ViewModels
- How the NotificationService interacts with the OS for prayer time alerts
- How the LocationService feeds into the PrayerService
- How the offline mode interacts with the main prayer time functionality

Remember to:
- Use a consistent visual language
- Notes for any non-obvious architectural decisions

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Presentation
        Shell["Shell Container"]
        Welcome["Welcome Module"]
        Prayers["Prayers Module"]
        Settings["Settings Module"]
        Offline["Offline Module"]
        
        Shell --> Welcome
        Shell --> Prayers
        Shell --> Settings
        Shell --> Offline
    end

    subgraph Business
        NavService["Navigation Service"]
        NotifService["Notification Service"]
        SetService["Settings Service"]
        PrayerService["Prayer Service"]
        Bootstrap["Bootstrapper"]
        ViewExt["View Extenders"]
        
        Bootstrap --> NavService
        Bootstrap --> NotifService
        Bootstrap --> SetService
        Bootstrap --> PrayerService
    end

    subgraph Services
        LocService["Location Service"]
        PrayerAPI["Prayer API Service"]
        HTTPClient["HTTP Client Services"]
    end

    %% Relationships
    Welcome -.-> NavService
    Prayers -.-> NavService
    Settings -.-> NavService
    Offline -.-> NavService

    PrayerService --> NotifService
    PrayerService --> LocService
    PrayerService --> PrayerAPI
    
    HTTPClient --> PrayerAPI
    LocService --> PrayerAPI

    ViewExt -.-> Shell
    ViewExt -.-> Welcome
    ViewExt -.-> Prayers
    ViewExt -.-> Settings
    ViewExt -.-> Offline

    %% Styling
    classDef presentation fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef business fill:#90EE90,stroke:#333,stroke-width:2px
    classDef services fill:#FFB347,stroke:#333,stroke-width:2px

    class Shell,Welcome,Prayers,Settings,Offline presentation
    class NavService,NotifService,SetService,PrayerService,Bootstrap,ViewExt business
    class LocService,PrayerAPI,HTTPClient services

    %% Click Events
    click Shell "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Shell/ShellView.xaml"
    click Welcome "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Welcome/WelcomeView.xaml"
    click Prayers "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Prayers/PrayersView.xaml"
    click Settings "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Settings/SettingsView.xaml"
    click Offline "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Offline/OfflineView.xaml"
    click NavService "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Shell/NavigationService.cs"
    click NotifService "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Shell/NotificationService.cs"
    click SetService "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Settings/SettingsService.cs"
    click PrayerService "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Prayers/PrayerService.cs"
    click LocService "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Features/Welcome/LocationService.cs"
    click HTTPClient "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Extensions/HttpClientExtensions.cs"
    click Bootstrap "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/Bootstrapper.cs"
    click ViewExt "https://github.com/TheVeryStarlk/Athan/blob/wpf/Athan.Desktop/ViewExtenders/SpaceSetter.cs"

    %% Legend
    subgraph Legend
        UI["UI Components"]:::presentation
        BL["Business Logic"]:::business
        SVC["Services"]:::services
    end
```
