How matrecode/tradesegment works
Project type and purpose
• This is a native iOS mobile trading application built in Swift using SwiftUI.
• Purpose: Provide users with registration/login (via Firebase Auth) and an “Engage” section for trading activities (bids, orders, portfolio, watchlist, profile, home tab).
File structure
• Top-level:
• TradeSegmentApp.swift (entry point)
• AppCoordinator.swift (root navigation)
• Apply/ (onboarding flows: Login, Register, Home)
• Engage/ (main app flows: HomeTab, Bids, Orders, Portfolio, Profile, Watchlist)
• SharedComponents/ (reusable UI elements & utilities)
• Tests (unit/UI)
• Patterns:
• MVVM: every view (e.g., LoginView.swift) has a corresponding ViewModel.swift.
• Coordinator: each feature folder has a Coordinator.swift and Route/Protocol definitions.
• Modular feature separation: “Apply” vs. “Engage” flows.
README for additional insights
• Confirms MVVM + Coordinator pattern.
• SwiftUI for UI; Firebase Authentication for user auth.
• Key features: Login & Register via Firebase.
Detailed breakdown of components
• TradeSegmentApp.swift (entry)
• AppCoordinator
• Apply Flow:
• LoginCoordinator → LoginView ← LoginViewModel → AuthService (Firebase)
• RegisterCoordinator → RegisterView …
• HomeCoordinator → HomeView ← HomeViewModel
• Engage Flow: repeat for each sub-module
• SharedComponents (PrimaryButton, FloatingTextField, ListItem, etc.) used by all Views
• Firebase Authentication as the only backend dependency