Skip to content

Repository files navigation

Task Flow

A production-style Flutter team task management app — offline-first, role-aware, and AI-assisted.

Flutter Dart GetX Firebase OpenAI


Features

  • Role-aware UX — Admin and Member dashboards with distinct capabilities
  • Offline-first — optimistic updates, local cache, queued sync, conflict detection
  • AI task assist — generate description, priority, and deadline from a task title
  • Smooth animations — page transitions, Hero elements, micro-interactions throughout
  • Responsive layout — single-column on mobile, side-by-side on tablet/web
  • Firebase-ready — Auth session persistence, Firestore sync, offline persistence

Architecture

lib/
├── app/
│   ├── bindings/          # Initial dependency injection
│   └── routes/            # Route names + GetPage definitions
├── core/
│   ├── constants/         # App-wide constants
│   ├── theme/             # Colors, typography, input decoration
│   ├── utils/             # Snackbar helpers, date extensions
│   └── widgets/           # Shared UI components (TaskCard, StatusChip, etc.)
├── data/
│   ├── models/            # TaskModel, AppUserModel, SyncActionModel
│   ├── providers/         # Local storage (SharedPreferences)
│   ├── repositories/      # Business logic: Auth, Task, AI
│   └── services/          # Firebase bootstrap, OpenAI client
└── modules/
    ├── splash/
    ├── auth/
    ├── dashboard/
    ├── task_form/
    ├── task_detail/
    ├── all_tasks/
    └── admin_assignees/

Each module follows a consistent pattern:

module/
├── module_binding.dart    # Dependency registration
├── module_controller.dart # State + actions (GetxController)
├── module_view.dart       # Root screen (GetView<Controller>)
└── widgets/               # Module-private UI components

Offline-First Strategy

Layer Mechanism
Read Tasks cached to SharedPreferences on every fetch
Write Applied optimistically to local state; queued as SyncAction
Sync Queue replayed to Firestore on reconnect
Conflict Last-write-wins; conflictNote field surfaces the resolution

AI Implementation

Task creation includes an AI helper (title → description + priority + deadline):

  • Primary: OpenAI /responses endpoint (gpt-4.1-mini)
  • Fallback: Keyword-based local heuristics (no API key required)

Configure OpenAI

flutter run \
  --dart-define=OPENAI_API_KEY=sk-... \
  --dart-define=OPENAI_MODEL=gpt-4.1-mini

If no key is provided the fallback runs automatically, so the feature works without credentials.


Firebase Setup

Credentials are intentionally not checked in. To connect Firebase:

  1. Create a project at console.firebase.google.com
  2. Enable Email/Password authentication
  3. Create a Firestore database
  4. Run flutterfire configure and place the generated files into the project

Firestore schema

users collection

{
  "email": "member@taskflow.dev",
  "name": "Mason Member",
  "role": "member"
}

tasks collection

{
  "title": "Refine onboarding motion",
  "description": "Polish the auth flow and prepare it for review.",
  "deadline": "2026-04-21T17:00:00.000",
  "assignedUserId": "uid",
  "assignedUserName": "Mason Member",
  "status": "inProgress",
  "priority": "high",
  "createdBy": "adminUid",
  "createdAt": "2026-04-17T09:00:00.000",
  "updatedAt": "2026-04-17T09:00:00.000"
}

Demo Mode

When Firebase is not configured the app switches to local preview mode automatically.

Role Email Password
Admin admin@taskflow.dev password123
Member member@taskflow.dev password123

Run

flutter pub get
flutter run

No additional setup is required to run the app in demo mode.


Tech Stack

Concern Library
State / DI / Routing get
Auth + Database firebase_auth, cloud_firestore
Local cache shared_preferences
AI OpenAI REST API via http
Connectivity connectivity_plus

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages