HOCO B2B
Team tasksAnis

OPS-01 — Local development stack & seed data

docker compose (Postgres, Redis, MinIO, Mailpit), .env validation, demo seed (products, resellers, delegates, a tour) usable by everyone.

FieldDetails
Task codeOPS-01
PhaseP0 — Foundations (cadrage, UX/UI, architecture & contract)
Product scopeV1
StatusDone (Sun 18 Oct 2026)
StartSun 18 Oct 2026
DueSun 18 Oct 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort0.25 person-day(s) planned · 1 from scratch · size XS
Area · appDevOps · ops
Depends onSRV-02
Unblocks—
Milestones—

Summary

docker compose (Postgres, Redis, MinIO, Mailpit), .env validation, demo seed (products, resellers, delegates, a tour) usable by everyone.

Description

Everyone (Anis, Imad on the mobile side, Akram for reviews) needs a local stack that matches staging and a demo dataset that exercises the real flows (OPS-01, cahier §13.1). This task provides a docker compose stack — PostgreSQL 17 on :5442, Redis 7 on :6390, MinIO on :9100/9101 with buckets created at start, Mailpit on :8125 — Zod-validated .env files per app through packages/env, and a demo seed on top of the reference seeds of SRV-02. The demo data covers the 17 Oct decisions: resellers of each customer type (SUPER_GROS, DEMI_GROS, DETAIL) and one pending validation, products with three prices and attribute values, in-stock and out-of-stock variants, two delegates with zones and a tour for today, staff users per role, a support region. Out of scope: staging/production infrastructure (OPS-02).

Subtasks

#SubtaskOwner
1docker-compose.yml with Postgres 17 (:5442), Redis 7 (:6390), MinIO (:9100 API, :9101 console) and Mailpit (:8125), named volumes and health checksAnis
2MinIO init container creating hoco-public (anonymous read) and hoco-private buckets with CORS for pre-signed uploadsAnis
3packages/env schemas per process (api, worker, dashboard, web) failing fast with a readable error on missing or invalid variables; .env.example filesAnis
4Demo seed: ~50 products across the three brands with variants, three prices, VAT, attribute values and imagesAnis
5Demo seed: resellers per customer type and status, one PENDING_VALIDATION account, two delegates with zones, today's tour with 5 visits, staff users per roleAnis
6Dev simulators for SMS (OTP printed to the server log) and push (logged), emails captured by MailpitAnis
7Root scripts: pnpm dev, pnpm db:reset (drop, migrate, seed), pnpm stack:up/downAnis
8Check the demo accounts and data against the mobile flows (reseller sign-in, delegate tour)Imad

Deliverables

  • docker-compose.yml and docker/minio-init.sh at the repository root
  • packages/env/src/{server,worker,dashboard,web}.ts and .env.example per app
  • packages/db/src/seed/demo.ts and documented demo credentials in /docs/workflow (local setup page)

Acceptance criteria

  • pnpm stack:up && pnpm db:reset && pnpm dev brings up a working stack on a clean machine
  • Starting the server with a missing DATABASE_URL fails at boot with a message naming the variable
  • The demo seed contains at least one reseller of each CustomerType and one out-of-stock variant
  • An OTP requested locally appears in the server log; a staff email appears in Mailpit
  • A file uploaded through a pre-signed URL lands in the hoco-private bucket

Requirements covered

RequirementTitleRelease
OPS-01Three environments: development, pre-production (client acceptance), productionV1

Test measures

  • CI job that runs db:reset against a service container to prove migrations and seeds apply
  • Manual check by Imad: sign in with a demo reseller and a demo delegate against the local server

Risks

  • Port clashes with other local projects — non-default ports (5442, 6390, 9100, 8125) are already chosen and configurable in .env

KPI

  • Delivered by Sun 18 Oct 2026 within 0.25 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