Context & High-Stakes Constraints
In fast-paced modern workflows, support and operations teams generate high volumes of daily tasks, action items, and tickets. However, professionals frequently lack the time to manually write executive summaries, synthesize complex descriptions, or generate progress reports.
AI Ticket Manager was designed and developed as a sophisticated mobile application marrying real-time task tracking with cutting-edge Large Language Models (LLMs). The goal was to provide effortless task capture, live multi-device synchronization, and instant generative AI summarization powered by Google Gemini.
The AI Ticket Manager Experience in Action
Explore the intelligent task orchestration experience — featuring real-time Firestore synchronization, natural language task synthesis powered by Google Gemini, contextual custom prompt overrides, and secure multi-tenant identity governance.
Official AI Ticket Manager Showcase & Device Suite
Comprehensive presentation showcase displaying AI Ticket Manager's multi-device mobile architecture, featuring live task monitoring, natural language Gemini AI task assistant views, and secure onboarding.
Core Architectural Capabilities
A breakdown of the engineering building blocks powering AI Ticket Manager's real-time synchronization, intelligent LLM synthesis, and secure cloud storage.
Google Gemini LLM Task Synthesis Engine
Deep integration with google_generative_ai: ^0.4.7 utilizing Gemini models to synthesize complex tasks into concise executive summaries with support for dynamic custom user prompts and automated model fallbacks.
Real-Time Cloud Firestore Multi-Tenant Pipeline
Reactive data architecture powered by StreamBuilder subscribing to users/{uid}/tasks collections, providing instantaneous cloud synchronization, automatic offline caching, and server timestamping.
Provider Reactive State Management Architecture
Decoupled state management leveraging Provider and ChangeNotifier (TicketProvider), isolating AI inference operations, loading states, and localized ticket collections from the presentation layer.
Secure Identity Governance via Firebase Auth
Enterprise user authentication managing session persistence, display name updates, and client-side error handling translating raw Firebase exceptions into intuitive user feedback.
6 Mission-Critical Modules
Each module is engineered with robust transactional boundaries, modular isolation, and comprehensive audit trails.
Automated Task Summarization & Prompt Engineering
Generative AI assistant engine transforming raw task details into actionable, structured executive summaries.
- GenerativeModel Engine: Leverages google_generative_ai invoking gemini-flash-latest for high-speed, cost-efficient inference.
- Dynamic Prompt Construction: Concatenates task title, detailed description, and optional user instructions into a cohesive prompt envelope.
- Automated Failover Architecture: Catches model resolution errors and gracefully falls back to gemini-pro to ensure continuous uptime.
- Reactive UI State: TicketProvider tracks isSummarizing state, rendering custom circular loaders during active inference.
Task Ingestion, AI Synthesis & Lifecycle Workflow
From task creation and cloud synchronization to Gemini AI summary generation and lifecycle resolution — every record flows through a secure, multi-tier pipeline.
Secure Firebase Authentication
AuthService establishes user identity via signIn or signUp, registering credentials and updating displayName in Firebase Auth.
Firestore Model Serialization & Timestamping
TicketFormScreen validates inputs and dispatches Ticket.toMap() to users/{uid}/tasks with FieldValue.serverTimestamp().
Real-Time Snapshots Stream & UI Binding
FirestoreService.getTickets() maps real-time collection snapshots into List<Ticket>, updating the HomeScreen UI automatically.
Task Selection & Prompt Interpolation
AiSummaryScreen captures selected task parameters and concatenates optional user guidance into a structured prompt.
Gemini Flash Inference with Pro Fallback
GeminiService queries gemini-flash-latest, automatically falling back to gemini-pro on API edge exceptions.
Consumer Rebuilding & Markdown Rendering
TicketProvider notifies listeners, rendering AI summaries and allowing one-tap task editing or deletion.
Multi-Tenant Cloud Firestore Isolation Guarantee
All task read, write, update, and delete transactions are constrained strictly to the authenticated user's scoped document subcollection (users/{uid}/tasks), preventing cross-tenant data leakage and guaranteeing end-to-end data privacy.
Application Architecture & Data Flow
Layered system design decoupling network transport, reactive state control, and responsive UI components.
Presentation Layer (Flutter 3.x)
Dart ^3.8.1 + Material 3Modular UI screens (HomeScreen, TicketFormScreen, AiSummaryScreen, LoginScreen, RegisterScreen) styled in warm espresso tones.
State Management Layer (lib/providers/)
Provider 6.1.1 + ChangeNotifierTicketProvider managing generative AI inference requests, summary state, and local collection synchronization.
AI Integration Services (lib/services/)
Google Generative AI 0.4.7GeminiService handling prompt formulation, model instantiation (gemini-flash-latest), and automated gemini-pro fallback.
Cloud Persistence Services (lib/services/)
Cloud Firestore 6.1.2FirestoreService managing CRUD operations and real-time reactive streams scoped to authenticated user subcollections.
Identity & Access Governance (lib/services/)
Firebase Auth 6.1.4AuthService managing credential validation, session state streams, display name persistence, and error translation.
Cross-Platform Native Engine
Flutter Engine + Skia / ImpellerHardware-accelerated native rendering compiling directly to Android ART and iOS ARM binaries with 60 FPS performance.
Curated Technology Stack
A modern engineering stack combining high-throughput user interfaces, modular backend architecture, and resilient data layers.
Mobile Application & UI
AI & Machine Learning
Cloud Backend & Database
State Management & Storage
Codebase Structure & Data Models
Clear boundary separation between system components, paired with modular schemas and structured repositories.
Database Entities & Schema Models
Data Model: Ticket Entity (Firestore)
Stores task attributes: id (string), title (string), description (string), duration (string), date (YYYY-MM-DD), time (HH:mm), status (Open/In Progress/Done), and server createdAt timestamp.
AI Inference Model: Gemini Prompt & Response Envelope
Formats structured prompt instructions combining task title, description, and custom user prompt, returning synthesized Markdown narrative summaries.
Provider State Store: TicketProvider State Model
ChangeNotifier store encapsulating _isSummarizing boolean flag, _summary response text, and localized _tickets collection.
API Reliability & Client-Side Resiliency
Enterprise architectural safeguards ensuring uninterrupted task management, isolated tenant storage, and resilient AI model execution.
API Endpoints & Routing Architecture
Google Generative AI (Gemini)
Cloud Firestore Reactive Streams
Enterprise Security & Governance Standards
Multi-Tenant Document Scoping
All Firestore queries are dynamically scoped to users/{currentUser.uid}/tasks, ensuring users can never access or modify another user's task data.
Dual-Model Generative AI Failover
Surrounds AI generation in nested try-catch blocks, attempting gemini-flash-latest first and seamlessly falling back to gemini-pro before returning error strings.
Client-Side Input Validation & Form Guards
Enforces strict FormState validation across title, date, and time fields before allowing Firestore document submissions, preventing corrupted records.
Human-Readable Exception Translation
Catches raw FirebaseAuthException codes and maps them into clear Indonesian explanations, preventing technical jargon from confusing end-users.
Engineering Challenges & Production Results
How critical technical bottlenecks were overcome and verified under real production conditions.
Challenge // 01
Handling varying API endpoint versions and model availability across Google Generative AI SDK releases. Solved by implementing an automated multi-tier failover mechanism: the service first queries gemini-flash-latest, and if a model resolution error occurs, it instantly falls back to gemini-pro.
Challenge // 02
Maintaining seamless real-time UI synchronization without redundant re-renders during active AI inference. Solved by decoupling the Firestore StreamBuilder (which handles task list rendering) from the TicketProvider ChangeNotifier (which handles AI loading spinners and markdown responses).
Challenge // 03
Translating complex Firebase authentication errors into user-friendly feedback. Solved by writing an exhaustive exception handler in AuthService that intercepts error codes and returns actionable human guidance.
