HOCO B2B
Ways of working

Tools

The toolchain of both repositories with versions and purpose, the services the team uses, and the commands everyone runs every day.

Versions are pinned in the repositories (.nvmrc, packageManager, pnpm-workspace.yaml catalog, pubspec.yaml). When this table and a repository disagree, the repository wins and this table is fixed.

Toolchain — hoco

ToolVersionPurposeNotes
Node.js22 LTS (.nvmrc)Runtime for everything in hocoengines.node >=22
pnpm11.13.1 (packageManager)Workspaces and the dependency catalogcorepack enable picks the pinned version
Turborepo2.11Task runner and cacheturbo.json
TypeScript6.0.3Typespnpm check-types
Biome2.5.15Lint and format (tabs, double quotes, LF)pnpm check writes fixes, pnpm lint only checks; CI runs biome ci
lefthook2.2Git hooksInstalled by pnpm install (hooks)
commitlint21, config-conventionalCommit messagesHeader at most 100 characters
gitleaksLatestSecret scanningOptional locally (the hook skips it), enforced in CI
Vitest4.1Unit testspnpm test
Docker Desktop + Compose v2CurrentLocal services, image buildsWSL 2 backend on Windows
PostgreSQL 17, Redis 7, MinIO, MailpitCompose imagesLocal database, queues, object storage, e-mail catcherPorts 5442, 6390, 9100/9101, 1125/8125
Prisma + Prisma Studio7.10Schema, migrations, client; data browserpnpm db:studio
Express · oRPC · Zod5 · 1.15 · 4.6HTTP server · contract and OpenAPI · schemasADR-002
Scalar API reference@scalar/hono-api-reference 0.12Human reference at /reference (local, staging, pre-production)Disabled in production
Prism@stoplight/prism-cli 5, through npxMock server from the OpenAPI documentMock server
oasdiffLatest, in CIBreaking-change detection between contract versionsAdded with SRV-03
Next.js · React · Tailwind CSS · next-intl · TanStack Query16.4 · 19.3 · 4.3 · 4.14 · 5.104Back-office and reseller web
pino10Structured logsLOG_LEVEL in .env
tsx · tsdown4.23 · 0.23Server dev mode · server build
Fumadocs16This siteADR-012
GitHub CLI (gh)CurrentPRs and issues from the terminalOptional

Toolchain — hoco-mobile

Set up by Imad in MOB-01; this table is updated when the repository exists.

ToolVersionPurposeNotes
FlutterStable, exact version pinned in the repository (FVM, .fvmrc) and in CIBoth appsEveryone runs the same version
DartBundled with Flutter (3.6 or later for pub workspaces)Language, pub workspace
Melos7Scripts across the packagesConfigured in the root pubspec.yaml
Android Studio, Android SDK, JDK 17Latest stableBuilds, emulatorsAn emulator image plus the reference mid-range phone for performance and outdoor checks
build_runner (freezed, json_serializable, drift)Per pubspec.yamlCode generationOutputs committed
OpenAPI to Dart generatorChosen in MOB-03hoco_apiRegenerated from the pinned document only
Firebase CLI and FlutterFire CLILatestFCM configuration, App Distribution uploadsProjects dev, staging, prod
lefthook + commitlintAs in hocoHooksNeeds Node.js for commitlint
XcodeLatest stable, on macOSiOS buildsOnly if iOS is confirmed (D-10)

Services

ServiceUsed forAccounts
GitHub — repositories, Actions, issues, DiscussionsCode, CI, bugs, meeting notesAccess
GitHub Projects (optional)A board view of the work — see belowTeam
Claude DesignDesign, prototypes, handoff (shared link + exported design bundle), HOCO's comments on review pagesTeam (Akram)
DokployDeploys the server, back-office and reseller web on the VPS (Traefik, TLS)Accounts
VPS (Dokploy, later)This site, restricted to the team and HOCOTeam (Anis)
FirebasePush notifications (FCM), App DistributionHOCO
Google Play ConsoleInternal, closed and production tracksHOCO (organisation account)
SentryError tracking for the apps and the serverHOCO
Uptime monitorExternal checks of /healthTeam
Password managerEvery secret and account credentialShared vault "HOCO"
WhatsApp · Google Meet · e-mailCommunication (channels)—

GitHub Projects (optional)

The board is a view, never the plan. If the team uses one:

  • One project, "HOCO delivery", across both repositories; its items are issues and PRs.
  • Every item title starts with the task id: SRV-14 — CRM module.
  • Fields: Task ID, Phase (P0…P4), Owner, Status (Todo · In progress · In review · Done). No date fields — dates come from the scheduler.
  • tasks.json stays the plan of record. A task never exists only on the board; a task added to the plan gets its board item, not the other way round.

Commands — hoco

First setup:

corepack enable                      # pnpm at the version pinned in package.json
git clone git@github.com:AnisBetehi/hoco.git && cd hoco
pnpm install                         # dependencies, Prisma client, git hooks
cp .env.example .env                 # one file for every app, values match docker compose
pnpm db:start                        # Postgres, Redis, MinIO, Mailpit
pnpm db:migrate                      # apply the migrations to the local database

Every day:

pnpm dev                             # server :3100, dashboard :3101, web :3102
pnpm dev:server                      # or one app: dev:dashboard, dev:web, dev:docs (:3103)
pnpm db:studio                       # browse the local database
pnpm db:stop                         # stop the services (pnpm db:down also removes the containers)

Before pushing (CI runs the same):

pnpm check                           # Biome, with fixes
pnpm check-types
pnpm test
pnpm build                           # also compiles every docs page

Contract, database, docs and plan:

pnpm openapi:export                  # writes apps/docs/public/openapi/hoco-v1.json
npx @stoplight/prism-cli mock apps/docs/public/openapi/hoco-v1.json --port 4010
pnpm --filter @hoco/db exec prisma migrate dev --name srv14_crm_core
pnpm --filter @hoco/docs schedule    # print the calendar computed from tasks.json
pnpm docs:generate                   # regenerate the team-task pages
pnpm --filter @hoco/docs check-mdx   # compile-check every MDX page

Commands — hoco-mobile

Assumption — the script names are fixed in MOB-01 and MOB-03; this block is updated then.

fvm install && fvm use               # the pinned Flutter version
dart pub get                         # resolves the whole pub workspace
melos run generate                   # build_runner in every package
melos run api:generate               # regenerate hoco_api from the pinned hoco-v1.json
melos run analyze                    # dart format check + flutter analyze
melos run test
cd apps/delegate && flutter run --flavor staging -t lib/main_staging.dart
flutter build appbundle --flavor prod -t lib/main_prod.dart --build-name 1.0.0 --build-number 42

Windows notes

The team works on Windows; Git Bash and PowerShell both run the scripts above.

  • git config --global core.autocrlf input — the repositories are LF (.gitattributes), Biome formats LF.
  • git config --global core.longpaths true — avoids path-length errors in node_modules and Gradle caches.
  • Docker Desktop with the WSL 2 backend.
  • The local ports (3100–3103, 5442, 6390, 9100, 9101, 1125, 8125) were chosen to coexist with other projects: keep them free.

On this page