Repositories and access
The two repositories, what goes where, who can do what, branch protection, secrets, the accounts production depends on, and onboarding and offboarding checklists.
The two repositories
| Repository | Owner account | Visibility | Holds | Main developer |
|---|---|---|---|---|
AnisBetehi/hoco | Anis | Private | Server, back-office, reseller web, docs site, shared packages, the API contract, the plan and the specs | Anis |
hoco-mobile | Imad's GitHub account | Private | Reseller app, delegate app and their hoco_* packages | Imad |
The only hard coupling between them is the OpenAPI document exported from packages/contracts (ADR-001). The full trees are on the architecture page; what matters day to day:
What goes where
| You are changing… | It goes in | Rule |
|---|---|---|
| An operation, a request or response shape, an error code | hoco → packages/contracts | A contract PR, reviewed by Imad (API-contract workflow) |
| The OpenAPI document | hoco → apps/docs/public/openapi/hoco-v1.json | Generated by pnpm openapi:export, never edited by hand |
| The Dart API client | hoco-mobile → packages/hoco_api | Regenerated from the pinned document, never edited by hand |
| The database | hoco → packages/db/prisma | One migration per PR (migrations) |
| Design tokens | Claude Design first (exported as hoco.tokens.json), then packages/ui and hoco_ui | Same token names in all three places |
| Web UI copy and translations | hoco → the Next app's message files | fr complete, ar and en keys present |
| Mobile UI copy and translations | hoco-mobile → hoco_l10n | Same rule |
| The plan, requirements, screens, endpoint catalogue, decisions, these pages, the mobile pages | hoco → apps/docs | Imad writes the mobile pages through PRs to hoco |
| A bug | GitHub issue in the repository whose code must change | Where bugs live |
| Designs, prototypes, design comments | Claude Design | The docs link to frames; they never copy them |
Who can do what
| Person | hoco | hoco-mobile | Claude Design | Why |
|---|---|---|---|---|
| Anis | Admin (owner) | Admin | Shared link (view, comment, handoff bundle) | Owner of hoco; reviews mobile API usage and security; runs DevOps |
| Imad | Write | Owner | Shared link (view, comment, handoff bundle) | Write is needed for his approval to count on contract PRs and to push docs branches |
| Akram | Read | Read | Owner of the projects, editor | Reads code, opens and comments issues and PRs (design QA, UI review) |
| HOCO | — | — | View and comment on the review pages | Reads this site (restricted access) and tests on pre-production |
- Two-factor authentication is mandatory on every account listed on this page.
- Imad uses Write on
hocofor contract reviews, the mobile and API docs pages and issues. He does not merge intoapps/server,apps/dashboardorapps/web. - Akram has Read only: he cannot push branches or apply labels. His edits to the design pages are filed as issues labelled
docswith the exact text; Anis commits them within two working days. Labels on his design-QA issues are set at triage. - Before go-live,
hoco-mobilemoves from Imad's personal account to an organisation account, together with the upload keystore and the Play Console ownership — who controls that organisation (HOCO or the team) is settled in the decision register (ADR-001).
Branch protection
Protection needs a paid plan on private repositories
GitHub enforces branch protection and rulesets on private repositories only on GitHub Pro, Team or Enterprise. Both owner accounts (Anis for hoco, Imad for hoco-mobile) are upgraded to Pro before the first PR is merged. Until then the rules below hold by discipline and CI only.
Repository settings (both repositories). Default branch dev (so PRs target it and Closes #n closes issues on merge). Squash merging and merge commits allowed, rebase merging disabled, squash as the default button. "Automatically delete head branches" on. Tags v* and contracts-v* can be created by the repository owner only.
| Rule | master | dev | release/* |
|---|---|---|---|
| Direct push | Blocked, admins included | Blocked, admins included | Blocked — fixes arrive by PR |
| Required checks | All CI checks of the repository (checks) | Same | Same |
| Required approvals | 0 — only the repository owner merges, and only release/* or hotfix/* | 1, from a code owner; the repository owner may bypass it on their own PRs outside sensitive paths | 1, same bypass |
| Conversation resolution | Required | Required | Required |
| Force push, deletion | Blocked | Blocked | Blocked (deleted by the repository owner after the release) |
| Merge method | Merge commit | Squash (merge commit only for back-merges from master or release/*) | Squash |
The bypass is the self-review path of a team where each repository has one main developer. It is never used on a PR labelled contract or mobile-impact in hoco, or touching a sensitive path in hoco-mobile — those wait for the other developer's approval (who reviews what).
Code owners. hoco already has .github/CODEOWNERS with * → @AnisBetehi and a prepared contracts line. On day one, Anis uncomments it with Imad's handle and adds the mobile docs pages:
# hoco — .github/CODEOWNERS
* @AnisBetehi
/packages/contracts/ @AnisBetehi @imad-handle
/apps/docs/content/docs/mobile/ @AnisBetehi @imad-handlehoco-mobile mirrors it (set up in MOB-01):
# hoco-mobile — .github/CODEOWNERS
* @imad-handle
/packages/hoco_api/ @imad-handle @AnisBetehi
/packages/hoco_core/ @imad-handle @AnisBetehi
/packages/hoco_offline/ @imad-handle @AnisBetehi
/apps/*/android/ @imad-handle @AnisBetehi
/apps/*/ios/ @imad-handle @AnisBetehi
/.github/ @imad-handle @AnisBetehiReplace imad-handle with Imad's GitHub username. An unknown handle is silently ignored by GitHub, so check that review requests actually arrive on the first contract PR.
Secrets
| Secret | Lives in | Owner | Who can read it |
|---|---|---|---|
| Local development values | Root .env, copied from .env.example, never committed | Each developer | Self |
hoco CI secrets: Dokploy deploy hooks | GitHub Actions secrets of hoco | Anis | Anis |
hoco-mobile CI secrets: upload keystore and passwords, Firebase App Distribution and Play Console service accounts, Sentry auth token | GitHub Actions secrets of hoco-mobile | Imad | Imad, Anis |
Runtime secrets per environment: DATABASE_URL, BETTER_AUTH_SECRET, S3 keys, SMTP, SMS API key, Firebase service account, maps key | Dokploy, per application and environment | Anis | Anis; HOCO's IT contact for production at handover |
| Master copy of everything above, account passwords, recovery codes | Shared password-manager vault "HOCO", one collection per audience: Dev (team), Mobile (Imad, Anis), Production (Anis, HOCO IT) | Anis | Per collection |
| Android signing | Play App Signing holds the app signing key; the upload key is in the vault and the CI secret | Imad | Imad, Anis |
Rules:
- Never in git, chat, email, screenshots or issue text.
gitleaksruns on commit (when installed) and on every PR. - A leaked secret is rotated first (within the hour), then the leak is cleaned up and the incident noted.
- One value per environment: no secret is shared between staging, pre-production and production. Production secrets are generated by Anis directly in Dokploy and never stored on a laptop.
- Each environment has its own
BETTER_AUTH_SECRETand cookie prefix, so a staging session never reaches production (ADR-005). SIMULATE_SMS="true"on local and staging (codes are logged). Pre-production and production send real SMS; HOCO's testers use their own phones.- Firebase client configuration files (
google-services.json,firebase_options*.dart) are identifiers, not secrets: they are committed. Service-account JSON files never are.
Accounts production depends on
Decision proposed: HOCO owns every production account
Cahier §11 (Dépendances externes): « Les frais, comptes, abonnements, limites d’API et délais de validation imposés par les fournisseurs externes doivent être identifiés séparément et validés par le client » (INT-07). The team proposes that every account production depends on is opened in HOCO's name, on a dedicated HOCO-controlled mailbox, and billed to HOCO, with the team invited at the role it needs. To confirm at the cadrage workshop (PRJ-03) and record in the decision register.
| Account | Owner | Team access | Needed before | Notes |
|---|---|---|---|---|
Domain (hoco.dz is a placeholder) and DNS | HOCO | Anis: DNS editor | OPS-02 | Registering or delegating a .dz name takes time: start at PRJ-03 |
| Two VPS — production alone; staging and pre-production together (ADR-013) | HOCO (billing) | Anis: root | OPS-02 | Provider and country are a decision: Law 18-07 makes transfers of personal data abroad subject to the national authority's authorisation (SEC-08) |
| Dokploy (self-hosted on those VPS) | HOCO, on its servers | Anis: admin | OPS-02 | HOCO's IT contact gets an admin user at handover |
| S3-compatible storage (files, off-site backups) | HOCO | Anis | SRV-07 | Backups in another location than the database server |
| Google Play Console — organisation account | HOCO | Imad: admin (releases); Anis: admin | MOB-14 | Needs a D-U-N-S number and identity verification (can take weeks — start at PRJ-03). A personal account must run a closed test with at least 12 testers for 14 days before it may publish to production |
| Apple Developer Program | HOCO | Imad | MOB-16 | Only if iOS is confirmed (decision D-10) |
Firebase projects dev, staging, prod (FCM, App Distribution) | HOCO's Google account | Imad: editor; Anis: editor | MOB-08 | Create them under HOCO's account from the start — moving projects later is painful |
| Maps provider (Google Maps proposed, ADR-015) | HOCO (billing) | Imad, Anis: key management | MOB-10 | Keys restricted per application id and per server IP |
| SMS gateway | HOCO (contract with the provider) | Anis | SRV-05 (OTP) | Provider to choose; sender-name approval can take weeks |
| Transactional email and sender domain | HOCO | Anis | SRV-08 | SPF, DKIM and DMARC on HOCO's domain |
| Sentry | HOCO if a paid plan is needed | Anis, Imad | MOB-02, OPS-02 | One project per app and for the server |
| Uptime monitor | Team | Anis, Imad (alerts) | OPS-02 | External check of /health on each environment |
| Claude Design | Team (Akram) | See access | DES-01 | Projects handed over or exported (design bundle) at the end, per the contract |
| GitHub repositories | Team | See access | Done | Code handover to HOCO (transfer or escrow) follows the contract — decision register |
Onboarding a new member
Day one:
- Read the overview, this section, the timeline and their own task list in team tasks. Docs writers also read
apps/docs/AUTHORING.md. - GitHub account with two-factor authentication; invited to the repositories at the role in the access table; CODEOWNERS updated if they own paths.
- Added to the team WhatsApp group, the calendar invitations of the weekly rhythm, the password-manager collection they need, the Claude Design projects.
- Mobile developers: Firebase projects, Play Console (internal testing), App Distribution
teamgroup. - Machine set up from tools: clone,
pnpm install,.env,pnpm db:start,pnpm devall work; a commit with the messagewipis rejected by the hook (proof that hooks are installed).
First week:
- First PR merged within two days — a small docs fix or a
fix/from the backlog — to practise the full flow (branch, commit, PR, review, staging). - Walk the decision register and the open issues of their area with Anis (30 min).
- Shadow one Thursday demo and post stand-up messages from day two.
- Anis adds them to
peopleintasks.jsonwith theirfteand assigns tasks; the plan recomputes.
Offboarding
- Open branches and PRs merged, handed over or closed; their tasks reassigned in
tasks.json(team), and the plan recomputed. - Anything owned in their name is transferred, never forked or copied: repositories (transfer
hoco-mobileif Imad leaves), Firebase and Play roles, Claude Design project ownership, Dokploy users. - Removed from both repositories, the Claude Design projects, Firebase, Play Console, App Distribution groups, Dokploy, Sentry, the docs-site login, the vault collections, the WhatsApp groups (the client group too) and the calendar invitations.
- Every secret they could read is rotated: Dokploy runtime secrets of the environments they accessed, CI secrets of their repository, the Android upload key if they held it (reset through Play support), API keys of the providers.
- CODEOWNERS updated; HOCO informed of the change of contact if they talked to HOCO.
Ways of working
The operating model of the three-person team and HOCO: who owns what, the weekly rhythm and the golden rules that apply from day one.
Git workflow
Branch model, naming, merge policy, Conventional Commits with the scopes of both repositories, hooks, short-lived branches and Prisma migrations — the same rules in hoco and hoco-mobile.