🧠 Quizzler System Architecture

Complete Quiz Application Ecosystem - Technical Overview

PRESENTATION LAYER (Flutter UI)
🏠
Home Screen
Dashboard & Quick Actions
Daily Challenges
📚
Categories
50+ Quiz Topics
Grid Layout
Quiz Screen
Question Interface
Timer & Progress
📊
Results
Score & Analytics
Performance Stats
🏆
Leaderboard
Global Rankings
Real-time Sync
👤
Profile
User Dashboard
Coins & Achievements
GetX Reactive Binding
STATE MANAGEMENT (GetX)
🔐
Auth Repository
Authentication State
Login/Logout Flow
👥
User Repository
User Data Management
Profile CRUD
💰
Coin Sync Service
Currency Management
Real-time Updates
⚙️
Settings Service
App Preferences
Persistent Config
Service Layer Communication
BUSINESS LOGIC SERVICES
📝
Quiz API Service
Fetch Questions
HTTP Client
🏅
Achievements
Badge System
Progress Tracking
📈
Leaderboard
Ranking System
Score Calculation
🎯
Daily Challenge
Daily Goals
Streak Logic
📂
Category Service
Topic Management
Dynamic Categories
📜
Quiz History
Past Attempts
Analytics Data
API Requests & Data Sync
EXTERNAL SERVICES & APIs
🤖
Gemini AI
Quiz Generation
google_generative_ai
🌐
Quiz API
Question Database
quizapi.io
🔥
Firebase Auth
Authentication
Google Sign-In
☁️
Cloud Firestore
NoSQL Database
Real-time Sync
💾
GetStorage
Local Cache
Offline Support

Key Data Flows

Authentication Flow

User signs in via Google OAuth → Firebase Auth validates credentials → User profile is created/fetched from Firestore → Session stored in GetStorage for persistence → App navigates to Home Screen.

Quiz Flow

User selects category → Quiz API Service fetches questions from quizapi.io → Questions displayed with timer → Answers validated → Score calculated → Results saved to Firestore → Leaderboard updated.

AI Revision Flow

Wrong answers collected from quiz history → Gemini AI generates personalized revision questions → Custom quiz created with adaptive difficulty → Progress tracked for improvement analytics.

Data Synchronization

Coins cached locally with 30-second validity → Force refresh from Firebase when needed → Leaderboard ranks recalculated on score update → Achievements checked after each quiz completion.

🛠️ Technology Stack

Flutter
Cross-platform UI Framework
Dart
Programming Language
Firebase
Auth, Firestore, Hosting
Gemini AI
Quiz Generation & Revision
GetX
State Management & DI
GetStorage
Local Data Persistence
Quiz API
External Question Bank
OAuth 2.0
Google Sign-In
Flutter UI Screens
State Management
Business Services
Firebase Services
External APIs
AI Services