HOCO B2B
Team tasksImad

MOB-01 — Flutter monorepo — workspace, two apps, flavors, CI

hoco-mobile repo under Imad's account: Dart pub workspace + Melos, apps/reseller and apps/delegate, dev/staging/prod flavors, application ids, signing, lints, GitHub Actions (analyze, test, build APK).

FieldDetails
Task codeMOB-01
PhaseP0 — Foundations (cadrage, UX/UI, architecture & contract)
Product scopeV1
StatusPlanned
StartSun 18 Oct 2026
DueSun 18 Oct 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort1 person-day(s) planned · 4 from scratch · size S
Area · appMobile foundation · mobile
Depends on—
UnblocksMOB-02, MOB-07, MOB-04
Milestones—

Summary

hoco-mobile repo under Imad's account: Dart pub workspace + Melos, apps/reseller and apps/delegate, dev/staging/prod flavors, application ids, signing, lints, GitHub Actions (analyze, test, build APK).

Description

Both Flutter apps share auth, API, design system, offline and catalog code, so they live in one repository from day one instead of being split later. Scope: create hoco-mobile under Imad's GitHub account as a Dart pub workspace driven by Melos, with apps/reseller (dz.hoco.reseller) and apps/delegate (dz.hoco.delegate), empty skeletons of the seven packages, dev/staging/prod flavors, release signing, shared lints and a GitHub Actions pipeline. No feature code here. Flavors are Android productFlavors with application-id suffixes plus --dart-define-from-file=env/<flavor>.json, so the three builds install side by side and point to the mock server, api-staging.hoco.dz and api.hoco.dz. From Anis it needs only the staging and production base URLs and a collaborator seat to review PRs; nothing from Akram yet. MOB-02, MOB-04 and MOB-07 fill the package skeletons created here, and every later task relies on the CI gates.

Subtasks

#SubtaskOwner
1Create the hoco-mobile repo on Imad's account, add Anis as admin, protect master and dev, branch naming feature/<TASK-ID>-…, Conventional Commits with scopes reseller, delegate, core, api, ui, l10n, offline, maps, catalog, PR templateImad
2Root pubspec.yaml with the workspace list (2 apps + 7 packages, resolution: workspace) and the Melos section: scripts analyze, format, test, gen (build_runner), api:gen, mock; Flutter version pinned in .fvmrcImad
3Scaffold apps/reseller and apps/delegate with productFlavors dev/staging/prod (applicationIdSuffix .dev and .staging, launcher names « HOCO Dev », « HOCO Staging »), single main.dart reading the flavor from dart-defineImad
4Package skeletons hoco_core, hoco_api, hoco_ui, hoco_l10n, hoco_offline, hoco_maps, hoco_catalog with barrel exports, dependency direction rule (apps → packages, hoco_core at the bottom) and one placeholder test eachImad
5env/dev.json, env/staging.json, env/prod.json (apiBaseUrl, sentryDsn, mapsApiKey placeholder, flavor) with prod secrets injected only in CIImad
6Android baseline: minSdk 24 (assumption — confirm with HOCO's device survey), target/compile SDK 35, Java 17, AGP and Kotlin pinned, R8 enabled for release, android:allowBackup=falseImad
7Upload keystores for both apps, stored base64-encoded in GitHub Actions secrets with an offline backup held by Imad and Anis; key.properties git-ignored; Play App Signing planned for MOB-14Imad
8Shared analysis_options.yaml (very_good_analysis or flutter_lints + strict-casts, strict-inference, strict-raw-types) and dart format checkImad
9GitHub Actions ci.yml: on PR to dev run pub get, melos analyze, format --set-exit-if-changed, melos test with coverage, flutter build apk --flavor staging for both apps uploaded as artifacts; pub and Gradle cachesImad
10README: prerequisites, bootstrap, run commands per flavor, flavor/app-id matrix, how to point the dev flavor at the mock server or a local server on 10.0.2.2:3100Imad

Deliverables

  • hoco-mobile repository: pubspec.yaml (workspace + melos), apps/reseller, apps/delegate, packages/hoco_* skeletons
  • .github/workflows/ci.yml with analyze, format, test and staging APK jobs
  • env/dev.json, env/staging.json, env/prod.json (prod values from CI secrets only)
  • Signed staging APKs of both apps downloadable as CI artifacts
  • README.md with the setup and flavor matrix

Acceptance criteria

  • A fresh clone bootstraps with one command and resolves a single workspace pubspec.lock
  • Both apps run in dev, staging and prod flavors on an Android emulator, and all six builds install side by side on one phone (distinct application ids and launcher names)
  • CI passes on a clean PR and fails on a PR that introduces a lint error, an unformatted file or a failing test (NFR-09)
  • Release builds are signed with the upload key from CI secrets; no keystore, password or production key is committed
  • The staging APK artifact installs on a mid-range Android phone (NFR-04)

Requirements covered

RequirementTitleRelease
NFR-04Android first on mid-range phones; iOS on client decisionV1
NFR-09Maintainability: automated tests, CI gates, typed contracts, documentationV1

Test measures

  • CI dry run with a deliberately failing lint PR and a deliberately failing test PR
  • Side-by-side install of the three flavors of both apps on a physical Android phone
  • One smoke widget test per app proving the test pipeline and coverage upload work

Risks

  • Melos and pub-workspace version incompatibilities — pin a Melos version that supports pub workspaces (7.x) and keep a path-dependency fallback documented
  • Lost or leaked upload keystore — two offline backups, secrets only in GitHub Actions, and enrol Play App Signing so the upload key can be reset

KPI

  • Delivered by Sun 18 Oct 2026 within 1 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page