TODO — Tooling & Infra Backlog

TODO.md

← Zurück zu Knowledge

TODO — Tooling & Infra Backlog

TODO.md · 6.5K

# TODO — Tooling & Infra Backlog

Items suggested during tooling review (comparing against `../hof` and `../mindecho-app`) that are **not yet done**. Implementation plans for features live in `docs/superpowers/plans/`.

---

## 🟡 Soon (medium impact)

### Add `build:ios` script to `apps/mobile/package.json`
**Why:** The `/mach-apps` skill currently skips the iOS step because no script exists. Adding it makes the skill fully functional.
**Reference:** `../hof/apps/mobile/package.json` has a working version. Pattern:
- Auto-increment `buildNumber` in `app.json` and `Info.plist`
- Run `npx expo prebuild --platform ios`
- `xcodebuild archive` → export IPA → upload via Transporter/altool to App Store Connect
**Prerequisites before this works:**
- Apple Developer Team ID must be configured (DEVELOPMENT_TEAM env or build settings)
- Xcode signing must be set up on the dev machine
- App Store Connect app entry created with `at.carrot.app` bundle id

### Set up Vitest for unit tests
**Why:** Pure logic (xp calculations, streak logic, date helpers) is easy to test and catches regressions. Plan 1 explicitly deferred tests — they should come back soon.
**Reference:** `../hof/package.json` has `test:unit` + `test:watch` via Vitest. Installs `vitest` at root and adds:
```json
"test:unit": "vitest run --root .",
"test:watch": "vitest --root ."
```
**First tests to write:**
- `apps/mobile/lib/xp.ts` — level boundaries, progress calc
- `apps/mobile/lib/streak.ts` — current streak, per-habit streak, edge cases (no habits, all missed)
- `apps/mobile/lib/date.ts` — offsetKey, daysBetween
**When this lands:** Add a Test step to `.github/workflows/ci.yml` between Typecheck and Build.

### Expand CLAUDE.md with build pipeline + versioning docs
**Why:** Once you ship to stores, you need these documented. Hof has ~800 lines covering versioning scheme, Gradle/Xcode signing, keystore management.
**Reference:** `../hof/CLAUDE.md` sections:
- "Versioning Scheme" — 0.1.x patch-based per app, sync rules
- "Local Build Pipeline" — Gradle + Xcode, keystore.properties
- "Signing" — keystore location, gitignore rules, env vars
**What to add to Carrot CLAUDE.md:** versioning scheme (inherit Hof's 0.1.x), signing setup instructions, where keystore lives.

### Set up Android signing properly
**Why:** First `build:apk` / `build:aab` will fail without a keystore. Hof uses `withReleaseSigningConfig.js` Expo plugin reading from `keystore.properties`.
**Files needed:**
- `apps/mobile/android/keystore.properties` (gitignored)
- `apps/mobile/android/app/@peartecheu__carrot.jks` (gitignored, or stored separately)
- Optional: Expo plugin config in `app.json` to inject signing during prebuild
**Reference:** `../hof/apps/mobile/plugins/withReleaseSigningConfig.js`

---

## 🟢 Later / Optional

### `mach-release` skill (minor version bump)
**Why:** Different from `/mach-apps` — bumps MINOR version (0.1.x → 0.2.0) for a tagged store release rather than a patch-level test build. Only needed if Carrot's versioning distinguishes "feature releases" from "bug fix builds".
**Reference:** `../mindecho-app/.claude/skills/mach-release/`
**Decision needed:** Does Carrot need this distinction, or is patch-bump-only sufficient (like Hof)?

### `patch-package` postinstall
**Why:** Auto-applies local patches to npm packages for upstream bugs that aren't yet fixed. MindEcho uses it.
**When to adopt:** Only when you hit a specific upstream bug you need to patch (e.g., a Reanimated or Expo Router bug). Don't add preemptively.
**Install:** `npm install -D patch-package` + add `"postinstall": "patch-package"` to root scripts.

### `.env` edit blocker hook
**Why:** Prevents accidental edits to `.env` files (credential safety). MindEcho has it; Hof doesn't.
**Decision:** Tim explicitly declined this hook during the tooling review. Revisit if the team grows or if credentials start leaking.
**If re-enabled, add to `.claude/settings.json` under PreToolUse:**
```json
{
  "matcher": "Edit|Write",
  "hooks": [
    {
      "type": "command",
      "command": "bash -c 'FILE=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r \".file_path // empty\"); if [[ \"$FILE\" == *.env* ]]; then echo \"BLOCKED: Do not edit .env files — credentials must be managed manually\" && exit 1; fi; exit 0'"
    }
  ]
}
```

### Add `lint` to workspaces
**Why:** The root `npm run lint` calls `turbo run lint`, but no workspace has a `lint` script. It's effectively a no-op. Either remove it from root, or add ESLint/Biome to each workspace.
**Recommendation:** Add Biome (faster than ESLint+Prettier, single tool). Or drop the root `lint` script entirely if you're happy with just Prettier + TypeScript strict mode as your quality bar.

### `prettier-plugin-svelte` / other plugin hygiene
**Not applicable** — Carrot uses Astro, not Svelte. Hof had this plugin; Carrot doesn't need it. Just noted for completeness so it doesn't get copy-pasted by mistake.

### Refine Prettier config
**Why:** Hof uses `printWidth: 120`, Carrot uses `100`. Minor preference difference. If you switch between the two projects often and want consistency, align them. Not urgent.

---

## Notes

- **Feature roadmap** (Plan 2-7 for the dummy app) is tracked in `docs/superpowers/plans/`, not here. This file is only for tooling/infra backlog.
- Check off items by moving them into a "✅ Done" section at the bottom with a one-line note + commit SHA when completed.

---

## ✅ Done

- **Mobile Plan 2 — Onboarding** · 2026-05-03 · `09601cc`
- **Mobile Plan 3 — Goal Detail + Milestones + Todos** · 2026-05-03 · `9ecc103`
- **Mobile Plan 4 — Progress Tab + Achievements** · 2026-05-03 · `c843f0d`
- **Mobile Plan 5 — Squad Tab (challenges, bets, duels, pacts)** · 2026-05-03 · `e1fabcb`
- **Mobile Plan 6 — Profile Tab + Settings** · 2026-05-03 · `f1a90b7`
- **Mobile Plan 7 — Polish + Web Export** · 2026-05-03 · `f11b4bb`
- **Landing Page Redesign** · 2026-05-03 · `14032be` — 8 sections, view transitions, live demo island
- **Admin Portal scaffold** · 2026-05-03 · `1e91a16` — initially Next.js 15, later converted to Astro 5 in `a2323d0`
- **Admin → Astro static** · 2026-05-03 · `a2323d0` — drops Next.js + OpenNext, deploys as CF Pages auto-on-push
- **9 Supabase migrations + seed + manual type stubs** · 2026-05-03 · `6c4bc78`
- **Mobile web export** · 2026-05-03 · `f11b4bb` — `npm run build:web` produces 19 static routes
- **Cloudflare Pages — all 3 deployed** · 2026-05-03 · `aeb92eb` — landing/app/admin auto-deploy on push, wrangler files codify config
- **Carrot 🥕 favicon + web Pressable fix** · 2026-05-03 · `256ca5c`