Skip to content

Overview

LaunchSwift is split into three main areas:

  • Core (ios/SwiftLaunch/Core/): config, networking, analytics, auth helpers, localization, storage helpers
  • Features (ios/SwiftLaunch/Features/): app features such as Auth, AI, Payments, Feedback, Onboarding, Settings, Explore, and Home
  • UI (ios/SwiftLaunch/UI/): reusable components and brand styling

State is held in @Observable classes (not MVVM ViewModels):

@Observable
final class FeatureState {
var isLoading = false
var error: Error?
func load() async { /* ... */ }
}

Views own state via @State:

struct FeatureView: View {
@State private var state = FeatureState()
var body: some View { /* ... */ }
}

Feature modules are organized under:

ios/SwiftLaunch/Features/<Feature>/
<Feature>State.swift
Views/
Models/
Services/

Examples in the current codebase:

  • ios/SwiftLaunch/Features/AI/AIState.swift
  • ios/SwiftLaunch/Features/Auth/AuthState.swift
  • ios/SwiftLaunch/Features/Payments/PaymentState.swift
  • ios/SwiftLaunch/Features/Feedback/FeedbackState.swift

The root shell is in:

  • ios/SwiftLaunch/App/LaunchSwiftApp.swift
  • ios/SwiftLaunch/App/AppRouter.swift
  • ios/SwiftLaunch/App/AppState.swift

This controls auth/onboarding gates and tab navigation.

APIClient (ios/SwiftLaunch/Core/Networking/APIClient.swift) supports:

  • request/response JSON
  • SSE streaming

AI chat calls the backend proxy endpoints (/api/chat and /api/ai/chat) so provider keys stay on the server.