# suhang12332/swift-craft-launcher architecture

> Architecture diagram of the GitHub repository suhang12332/swift-craft-launcher, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suhang12332/swift-craft-launcher
- Repository: https://github.com/suhang12332/swift-craft-launcher

## Overview

1. **Product shape and runtime**
   - This is a **native macOS 14+ app** written in **Swift 5.5+** with **SwiftUI** as the primary UI framework and **Combine** for reactive state.
   - The app is organized as a single Xcode project with feature-oriented source folders rather than separate packages.

2. **Top-level application shell**
   - `SwiftCraftLauncherApp.swift` is the app entry point.
   - The UI is centered around a main window and supporting sheets/windows, with custom window management helpers in `CommonFeature/Utilities`.
   - `MainFeature` owns the launcher shell: sidebar, content/detail panes, toolbar, menu bar extra content, and navigation/presentation behavior.

3. **Feature-boundary architecture**
   - The codebase is split into distinct feature areas:
     - `MainFeature` for shell/navigation
     - `GameFeature` for game instance management and launching
     - `ResourceFeature` for browsing/installing remote resources
     - `PlayerFeature` for accounts, profiles, skins, and friends/presence
     - `ModPackFeature` for importing/exporting/installing modpacks
     - `CommonFeature` for shared app-wide infrastructure
   - This separation is important: each feature has its own models, services, view models, views, and utility code.

4. **Presentation layer**
   - The UI is largely MVVM-style: SwiftUI views bind to feature-specific view models.
   - `CommonFeature/Views` contains reusable building blocks like sheets, sections, file tree views, settings views, and about/contributor screens.
   - Feature views are specialized by domain: game detail, modpack import/export, resource browsing, player skins, AI chat, etc.

5. **Core launcher shell flow**
   - The main screen is driven by `SidebarViewModel`, `ContentToolbarViewModel`, and related context-menu/action view models.
   - `MainFeature` routes user actions into the current feature pane and presents sheets/dialogs through presentation utilities.
   - The shell is responsible for coordinating selection state, toolbar actions, and game-related commands, but not for the underlying game logic itself.

6. **Game management subsystem**
   - `GameFeature` is the core launcher engine for Minecraft instances.
   - It covers game creation, validation, settings, Java runtime selection, save/world metadata, server address handling, local resource management, and launch orchestration.
   - The launch path runs through `GameLaunchUseCase`, `MinecraftLaunchCommandBuilder`, and `GameProcessManager`, which together assemble and execute the Minecraft process.

7. **Game data, persistence, and filesystem boundaries**
   - Game state is persisted through local databases and file-oriented managers:
     - `GameRepository`, `GameVersionDatabase`, `ModCacheDatabase`, `SQLiteDatabase`
     - file managers for Minecraft directories, common files, save info, and mod caches
   - The architecture strongly depends on the local filesystem: instance directories, logs, assets, mods, worlds, screenshots, and Java runtimes are all treated as first-class local resources.

8. **Remote resource discovery and installation**
   - `ResourceFeature` handles search, filtering, detail loading, and installation of external content such as mods, datapacks, shaders, and resource packs.
   - It focuses on Modrinth-related browsing and compatibility views, with download/installation helpers and dependency resolution.
   - The resource layer is separated from game launching so that remote project metadata and install logic do not leak into the shell layer.

9. **Modpack import/export pipeline**
   - `ModPackFeature` is a separate workflow for ingesting and producing modpack artifacts.
   - It includes index parsing/adapters for **CurseForge** and **Modrinth**, installers, archive/export builders, manifest parsers, and resource processors.
   - The data flow here is: archive/index input → parser/adapter → normalized internal model → dependency/resource processing → local instance installation or exported package.

10. **Player/account/identity subsystem**
    - `PlayerFeature` covers player profiles, account storage, skins, capes, and Microsoft/Yggdrasil-related identity handling.
    - It persists credentials and user profiles locally, and also supports skin libraries and presence/friends integrations.
    - This subsystem is the boundary between the launcher’s local identity store and external authentication/profile services.

11. **Shared service and model layer**
    - `CommonFeature` hosts app-wide services and models used by multiple features:
      - authentication services
      - Modrinth/CurseForge/GitHub/IP-location services
      - update checking via Sparkle
      - cache, settings, language, notification, and announcement managers
      - shared API client, logging, keychain, and path utilities
    - This is the main cross-cutting boundary: features should depend on these shared services rather than duplicating networking, caching, or settings code.

12. **External integrations**
    - The app talks to several external systems that materially shape the architecture:
      - **Microsoft auth** and **Yggdrasil** for account login
      - **Modrinth** and **CurseForge** for mods/modpacks
      - **GitHub** for metadata and updates
      - **Sparkle** for app update delivery
      - Java runtime downloads and Minecraft version manifest sources
    - These integrations are encapsulated behind services so the UI and feature view models consume normalized domain data.

13. **Local state, caching, and security**
    - The app uses local caches and state managers to avoid repeated network/file work and to keep UI responsive.
    - Sensitive data is handled through a **KeychainManager**, while other cached state is managed through app cache and feature-specific state stores.
    - Download and progress coordination are also explicit subsystems, reflecting the app’s heavy use of asynchronous network and file transfer work.

14. **Build, packaging, and distribution**
    - The repo includes GitHub Actions for building a **DMG** release and a small scripting tool under `.github/scripts`.
    - `archify.py` and the workflow indicate release packaging/optimization for macOS distribution.
    - The README also points to Homebrew Cask distribution, so the product is designed for both direct downloads and packaged installation.

15. **What an architecture diagram should emphasize**
    - Draw the app as a **SwiftUI shell** around multiple domain features, with `CommonFeature` as the shared infrastructure layer.
    - Show **local filesystem / SQLite / Keychain** as the primary persistence boundary.
    - Show **network services** to Microsoft, Modrinth, CurseForge, GitHub, Sparkle, and IP/location endpoints as external dependencies.
    - The main runtime flow is: user action in SwiftUI → feature view model → service/manager/use-case layer → local storage or remote API → updated state back to the UI.

Main entry points: [`SwiftCraftLauncher/CommonFeature/Utilities/AppServices.swift`](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Utilities/AppServices.swift) (Shared Services), [`SwiftCraftLauncher/GameFeature/ViewModels/GameCreationViewModel.swift`](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/ViewModels/GameCreationViewModel.swift) (Game ViewModels), [`SwiftCraftLauncher/ResourceFeature/ViewModels/Modrinth/ModrinthDetailCoordinatorViewModel.swift`](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ResourceFeature/ViewModels/Modrinth/ModrinthDetailCoordinatorViewModel.swift) (Resource VM), [`SwiftCraftLauncher/GameFeature/Managers/MinecraftFileManager.swift`](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/Managers/MinecraftFileManager.swift) (File Managers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App Shell"]
  node_app(("Launcher App<br/>SwiftUI app entry"))
  node_mainview["Main View<br/>shell UI<br/>[MainView.swift]"]
  node_sidebarvm["Sidebar VM<br/>navigation state"]
  node_toolbarvm["Toolbar VM<br/>toolbar actions"]
  node_presentation["Presentation<br/>window/sheet orchestration"]
end

subgraph group_common["Common Feature"]
  node_commonsvc["Shared Services<br/>app infrastructure<br/>[AppServices.swift]"]
  node_authsvc["Auth Services<br/>identity layer"]
  node_remoteapis["Remote APIs<br/>network integrations"]
  node_localcore["Local Core<br/>storage and utils<br/>[AppPaths.swift]"]
end

subgraph group_game["Game Feature"]
  node_gamelaunch["Launch Pipeline<br/>game orchestration"]
  node_gamedata[("Game Storage<br/>local persistence")]
  node_gamefiles["File Managers<br/>filesystem boundary"]
  node_gameruntime["Process Runtime<br/>process execution"]
  node_gamevm["Game ViewModels<br/>instance state"]
end

subgraph group_resource["Resource Feature"]
  node_resourcevm["Resource VM<br/>browse/install state"]
  node_resourceloader["Resource Loader<br/>detail/install flow"]
end

subgraph group_player["Player Feature"]
  node_playerstore[("Player Storage<br/>identity persistence")]
  node_playerskin["Skin Service<br/>profile customization"]
end

subgraph group_modpack["ModPack Feature"]
  node_modpackflow["Modpack Flow<br/>import/export pipeline"]
  node_modpackio["Archive IO<br/>modpack adapters"]
end

node_app -->|"hosts"| node_mainview
node_mainview -->|"binds"| node_sidebarvm
node_mainview -->|"binds"| node_toolbarvm
node_mainview -->|"presents"| node_presentation
node_sidebarvm -->|"selects"| node_gamevm
node_sidebarvm -->|"selects"| node_resourcevm
node_sidebarvm -->|"selects"| node_playerstore
node_toolbarvm -->|"triggers"| node_gamelaunch
node_toolbarvm -->|"filters"| node_resourcevm
node_commonsvc -->|"includes"| node_authsvc
node_commonsvc -->|"includes"| node_remoteapis
node_commonsvc -->|"includes"| node_localcore
node_gamevm -->|"reads/writes"| node_gamedata
node_gamevm -->|"manages"| node_gamefiles
node_gamevm -->|"launches"| node_gamelaunch
node_gamelaunch -->|"executes"| node_gameruntime
node_gamelaunch -->|"depends on"| node_gamefiles
node_gamedata -->|"persists via"| node_localcore
node_gamefiles -->|"uses"| node_localcore
node_resourcevm -->|"loads"| node_resourceloader
node_resourcevm -->|"queries"| node_remoteapis
node_resourceloader -->|"installs to"| node_gamefiles
node_playerstore -->|"backed by"| node_authsvc
node_playerskin -->|"updates"| node_playerstore
node_playerskin -->|"fetches"| node_remoteapis
node_modpackflow -->|"parses"| node_modpackio
node_modpackflow -->|"installs to"| node_gamefiles
node_modpackflow -->|"downloads"| node_remoteapis
node_commonsvc -.->|"shared by"| node_gamevm
node_commonsvc -.->|"shared by"| node_resourcevm
node_commonsvc -.->|"shared by"| node_playerstore
node_commonsvc -.->|"shared by"| node_modpackflow

click node_app "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/SwiftCraftLauncherApp.swift"
click node_mainview "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/Views/MainView.swift"
click node_sidebarvm "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/ViewModels/SidebarViewModel.swift"
click node_toolbarvm "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/ViewModels/ContentToolbarViewModel.swift"
click node_presentation "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/Utilities/MainViewPresentationModifier.swift"
click node_commonsvc "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Utilities/AppServices.swift"
click node_authsvc "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Services/MinecraftAuthService.swift"
click node_remoteapis "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Services/ModrinthService.swift"
click node_localcore "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Utilities/AppPaths.swift"
click node_gamelaunch "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/UseCases/GameLaunchUseCase.swift"
click node_gamedata "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/Data/GameRepository.swift"
click node_gamefiles "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/Managers/MinecraftFileManager.swift"
click node_gameruntime "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/Run/GameProcessManager.swift"
click node_gamevm "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/ViewModels/GameCreationViewModel.swift"
click node_resourcevm "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ResourceFeature/ViewModels/Modrinth/ModrinthDetailCoordinatorViewModel.swift"
click node_resourceloader "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ResourceFeature/Utilities/ResourceDetailLoader.swift"
click node_playerstore "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/PlayerFeature/Data/PlayerDataManager.swift"
click node_playerskin "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/PlayerFeature/Services/PlayerSkinService.swift"
click node_modpackflow "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ModPackFeature/Services/ModPackInstallCoordinator.swift"
click node_modpackio "https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ModPackFeature/Services/ModPackIndexParser.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_mainview,node_sidebarvm,node_toolbarvm,node_presentation toneBlue
class node_commonsvc,node_authsvc,node_remoteapis,node_localcore toneAmber
class node_gamelaunch,node_gamedata,node_gamefiles,node_gameruntime,node_gamevm toneMint
class node_resourcevm,node_resourceloader toneRose
class node_playerstore,node_playerskin toneIndigo
class node_modpackflow,node_modpackio toneTeal
```

## Components

### App Shell

Top-level SwiftUI application shell and navigation

- [Launcher App](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/SwiftCraftLauncherApp.swift): SwiftUI app entry · Application entry point and lifecycle root · `SwiftCraftLauncher/SwiftCraftLauncherApp.swift`
- [Main View](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/Views/MainView.swift): shell UI · Primary window shell with sidebar, content, and detail panes · `SwiftCraftLauncher/MainFeature/Views/MainView.swift`
- [Sidebar VM](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/ViewModels/SidebarViewModel.swift): navigation state · Drives selection and shell navigation state · `SwiftCraftLauncher/MainFeature/ViewModels/SidebarViewModel.swift`
- [Toolbar VM](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/ViewModels/ContentToolbarViewModel.swift): toolbar actions · Coordinates toolbar content and shell actions · `SwiftCraftLauncher/MainFeature/ViewModels/ContentToolbarViewModel.swift`
- [Presentation](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/MainFeature/Utilities/MainViewPresentationModifier.swift): window/sheet orchestration · Window, sheet, and dialog presentation utilities · `SwiftCraftLauncher/MainFeature/Utilities/MainViewPresentationModifier.swift`

### Common Feature

Shared infrastructure and cross-cutting services

- [Shared Services](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Utilities/AppServices.swift): app infrastructure · Shared services, API clients, logging, settings, caching, and integrations · `SwiftCraftLauncher/CommonFeature/Utilities/AppServices.swift`
- [Auth Services](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Services/MinecraftAuthService.swift): identity layer · Microsoft and Yggdrasil authentication plus profile parsing · `SwiftCraftLauncher/CommonFeature/Services/MinecraftAuthService.swift`
- [Remote APIs](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Services/ModrinthService.swift): network integrations · Modrinth, CurseForge, GitHub, IP location, and update services · `SwiftCraftLauncher/CommonFeature/Services/ModrinthService.swift`
- [Local Core](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/CommonFeature/Utilities/AppPaths.swift): storage and utils · Paths, keychain, downloads, and local app state helpers · `SwiftCraftLauncher/CommonFeature/Utilities/AppPaths.swift`

### Game Feature

Minecraft instance management, launch, and local game state

- [Launch Pipeline](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/UseCases/GameLaunchUseCase.swift): game orchestration · Builds and executes the Minecraft launch command · `SwiftCraftLauncher/GameFeature/UseCases/GameLaunchUseCase.swift`
- [Game Storage](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/Data/GameRepository.swift): local persistence · SQLite databases and repository layer for game state · `SwiftCraftLauncher/GameFeature/Data/GameRepository.swift`
- [File Managers](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/Managers/MinecraftFileManager.swift): filesystem boundary · Instance directories, resources, saves, mods, and Java runtime file handling · `SwiftCraftLauncher/GameFeature/Managers/MinecraftFileManager.swift`
- [Process Runtime](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/Run/GameProcessManager.swift): process execution · Launch command building and Minecraft process management · `SwiftCraftLauncher/GameFeature/Run/GameProcessManager.swift`
- [Game ViewModels](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/GameFeature/ViewModels/GameCreationViewModel.swift): instance state · Creation, settings, and local resource coordination · `SwiftCraftLauncher/GameFeature/ViewModels/GameCreationViewModel.swift`

### Resource Feature

Remote resource discovery, filtering, and installation

- [Resource VM](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ResourceFeature/ViewModels/Modrinth/ModrinthDetailCoordinatorViewModel.swift): browse/install state · Search, filter, and detail coordination for remote resources · `SwiftCraftLauncher/ResourceFeature/ViewModels/Modrinth/ModrinthDetailCoordinatorViewModel.swift`
- [Resource Loader](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ResourceFeature/Utilities/ResourceDetailLoader.swift): detail/install flow · Loads resource details and checks installation state · `SwiftCraftLauncher/ResourceFeature/Utilities/ResourceDetailLoader.swift`

### Player Feature

Accounts, profiles, skins, and presence

- [Player Storage](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/PlayerFeature/Data/PlayerDataManager.swift): identity persistence · Account, profile, and skin stores · `SwiftCraftLauncher/PlayerFeature/Data/PlayerDataManager.swift`
- [Skin Service](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/PlayerFeature/Services/PlayerSkinService.swift): profile customization · Skin and cape handling plus player customization utilities · `SwiftCraftLauncher/PlayerFeature/Services/PlayerSkinService.swift`

### ModPack Feature

Modpack import, processing, and export workflows

- [Modpack Flow](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ModPackFeature/Services/ModPackInstallCoordinator.swift): import/export pipeline · Parses, adapts, installs, and exports modpack artifacts · `SwiftCraftLauncher/ModPackFeature/Services/ModPackInstallCoordinator.swift`
- [Archive IO](https://github.com/suhang12332/swift-craft-launcher/blob/main/SwiftCraftLauncher/ModPackFeature/Services/ModPackIndexParser.swift): modpack adapters · Archive parsing and CurseForge/Modrinth index adaptation · `SwiftCraftLauncher/ModPackFeature/Services/ModPackIndexParser.swift`

## Connections

- Launcher App → Main View: hosts · App entry creates the main launcher shell
- Main View → Sidebar VM: binds · Shell UI binds to navigation state
- Main View → Toolbar VM: binds · Shell UI binds to toolbar actions
- Main View → Presentation: presents · Window and sheet orchestration for dialogs and secondary surfaces
- Sidebar VM → Game ViewModels: selects · Selection state routes into game-related panes
- Sidebar VM → Resource VM: selects · Selection state routes into resource browsing panes
- Sidebar VM → Player Storage: selects · Selection can surface player/account management
- Toolbar VM → Launch Pipeline: triggers · Toolbar actions initiate game launch and management flows
- Toolbar VM → Resource VM: filters · Toolbar controls resource browsing and filtering
- Shared Services → Auth Services: includes · Shared infrastructure provides auth services
- Shared Services → Remote APIs: includes · Shared infrastructure provides remote API integrations
- Shared Services → Local Core: includes · Shared infrastructure provides local app services and utilities
- Game ViewModels → Game Storage: reads/writes · Feature view models persist and query game state
- Game ViewModels → File Managers: manages · Game UI and forms coordinate filesystem-backed instance state
- Game ViewModels → Launch Pipeline: launches · Game feature delegates launch orchestration to the use case
- Launch Pipeline → Process Runtime: executes · Use case builds and runs the Minecraft process
- Launch Pipeline → File Managers: depends on · Launch orchestration needs local instance files and runtime assets
- Game Storage → Local Core: persists via · Game persistence depends on local filesystem and storage utilities
- File Managers → Local Core: uses · File managers rely on shared path, download, and cache helpers
- Resource VM → Resource Loader: loads · Search/detail view models fetch resource details and install state
- Resource VM → Remote APIs: queries · Resource browsing depends on remote marketplace APIs
- Resource Loader → File Managers: installs to · Remote resources are installed into game instance files
- Player Storage → Auth Services: backed by · Identity storage is paired with authentication services
- Skin Service → Player Storage: updates · Skin and profile actions update persisted player state
- Skin Service → Remote APIs: fetches · Skin/profile features may use external profile services
- Modpack Flow → Archive IO: parses · Modpack workflows start from archive and index adapters
- Modpack Flow → File Managers: installs to · Processed modpacks are installed into local instances
- Modpack Flow → Remote APIs: downloads · Modpack workflows resolve and download remote artifacts
- Shared Services → Game ViewModels: shared by · Game feature consumes shared managers and services
- Shared Services → Resource VM: shared by · Resource feature consumes shared managers and services
- Shared Services → Player Storage: shared by · Player feature consumes shared managers and services
- Shared Services → Modpack Flow: shared by · Modpack feature consumes shared managers and services
