App Architecture

Technical overview of how the 1xBet mobile application is structured and operates.

Last updated: January 22, 2026

Architecture Overview

The 1xBet app uses a modern client-server architecture with the following key components:

Layer Purpose Technologies
Client (Mobile App) User interface, local storage Native Android/iOS, Hybrid components
API Gateway Request routing, authentication REST API, WebSocket
Backend Services Business logic, data processing Microservices architecture
Data Layer Persistence, caching Databases, Redis cache
External Services Payments, odds feeds, streaming Third-party integrations

Client Architecture

Android App

  • Language: Kotlin with Java components
  • Min SDK: API 21 (Android 5.0)
  • Architecture: MVVM (Model-View-ViewModel)
  • DI: Dagger/Hilt for dependency injection
  • Networking: Retrofit + OkHttp
  • Local Storage: Room database, SharedPreferences

iOS App

  • Language: Swift with Objective-C legacy
  • Min iOS: iOS 12.0
  • Architecture: MVVM + Coordinator pattern
  • Networking: URLSession, Alamofire
  • Local Storage: Core Data, UserDefaults, Keychain

Shared Components

  • WebView for dynamic content (promotions, some games)
  • Push notification handlers
  • Biometric authentication modules
  • Analytics and crash reporting

Communication Protocols

Protocol Use Case Details
HTTPS/REST Standard requests Account, history, settings, payments
WebSocket Real-time updates Live odds, bet status, notifications
Push (FCM/APNs) Background notifications Bet results, promotions, alerts
HLS/DASH Live streaming Video content delivery

Backend Services

The backend uses a microservices architecture:

Service Responsibility
Auth Service Login, registration, 2FA, session management
Account Service Profile, settings, verification status
Betting Service Bet placement, settlement, history
Odds Service Real-time odds, market data
Payment Service Deposits, withdrawals, transactions
Casino Service Game integration, RNG, results
Notification Service Push, email, SMS delivery
Content Service Promotions, static content, localization

Data Flow

Bet Placement Flow

  1. User selects bet — App validates locally
  2. Request to API — Encrypted HTTPS request
  3. API Gateway — Auth check, rate limiting
  4. Betting Service — Validates odds, balance, limits
  5. Confirmation — Bet ID returned to app
  6. Real-time updates — WebSocket for status changes

Live Odds Flow

  1. User opens event — WebSocket connection established
  2. Odds feed — Server pushes updates
  3. UI update — App reflects changes instantly
  4. Bet submission — Current odds validated server-side

Security Architecture

  • Transport: TLS 1.3 for all communications
  • Authentication: JWT tokens with short expiry
  • Storage: Encrypted local storage (AES-256)
  • Biometrics: Secure enclave (iOS) / Keystore (Android)
  • Certificate pinning: Prevents MITM attacks
  • Obfuscation: Code protection against reverse engineering
Security Details →

Caching Strategy

Data Type Cache Location TTL
User profile Local DB Until logout
Static content Local + CDN 24 hours
Odds data Memory only Real-time (no cache)
Bet history Local DB Sync on demand
Images/assets Disk cache 7 days

Performance Considerations

  • Lazy loading: Content loaded on demand
  • Image optimization: WebP format, responsive sizes
  • Request batching: Multiple requests combined
  • Offline support: Basic functionality without internet
  • Background sync: Data synced when connection restored

Related Pages