batchCooking/apps/web/assets/README.md
Nicolas fd5841d045
All checks were successful
CI / lint (push) Successful in 4m59s
CI / build (push) Successful in 3m15s
CI / intent-service-test (push) Successful in 6m5s
CI / e2e (push) Successful in 11m41s
CI / test (push) Successful in 20m16s
feat(mobile): ajoute le projet natif Android Capacitor (#39)
Dernière étape du portage mobile #39 : génère et versionne le projet natif
Android (`npx cap add android`) que les phases 1 à 3 (jeton Bearer, passe
responsive, plomberie web) préparaient déjà.

- `apps/web/android/` — projet natif Capacitor 8.5. Permission `INTERNET`
  présente par défaut, `applicationId` = `fr.kyuno.batchcooking`.
- Thème natif aligné sur la palette « Mise en Place » (`_theme.scss`) :
  `colors.xml` redéfinit `colorPrimary`/`Dark`/`Accent` (basilic/vermillon)
  par-dessus les défauts Material de la lib capacitor-android ; barre de
  statut basilic foncé, fond de fenêtre « porcelaine » pour ne pas flasher
  blanc au démarrage à froid ; `postSplashScreenTheme` pour la transition.
- Icône adaptative + splash (clair et sombre, toutes densités) générés
  depuis `apps/web/assets/logo.svg` (monogramme « bC », géométrie seule, pas
  de `<text>`) via `@capacitor/assets` ; sources et commande de régénération
  documentées dans `apps/web/assets/README.md`. `@capacitor/assets` n'est pas
  ajouté aux dépendances (il tire `sharp`, hors `onlyBuiltDependencies`) —
  lancé via `npx`.
- `.gitignore` racine : ignore `/.idea/` (Android Studio ouvre désormais le
  dépôt comme projet). `biome.json` : exclut `apps/web/android` du lint.
- README : section « Application mobile (Android) » (prérequis + flux de
  build `build:capacitor` → `cap sync` → Android Studio).

Le bundle web copié sous `android/app/src/main/assets/public/` reste
git-ignoré (régénéré par `pnpm build:capacitor && npx cap sync android`).
Build de l'APK + test sur appareil : à finir dans Android Studio — la CI
self-hosted ne build pas Android.

Vérifs : `pnpm build` + `pnpm lint` OK ; `npx cap sync android` OK ; tous
les XML natifs bien formés.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 09:32:24 +02:00

34 lines
1.7 KiB
Markdown

# App icon & splash sources
Source art for the native Android app's launcher icon and splash screen.
Consumed by [`@capacitor/assets`](https://github.com/ionic-team/capacitor-assets)
in **Easy Mode** — a single logo plus background colours, from which it
generates every density under `android/app/src/main/res/`.
## Files
| File | Role |
|---|---|
| `logo.svg` | The mark: a basil plate + light `bC` monogram, geometry only (no `<text>`, so it rasterises identically wherever `sharp` runs). Deliberately a **self-contained tile** rather than a bare monogram, so the same source reads on both the porcelaine splash ground and a dark one — the trade-off is a faintly redundant basil-on-basil adaptive-icon foreground, which is invisible in practice. |
Colours track `apps/web/src/styles/_theme.scss` (`--color-primary` `#2e6b4a`,
`--color-background` `#eef2ed`). Keep them in sync if the palette changes.
## Regenerate
`@capacitor/assets` pulls in `sharp`, whose native binary is **not** built by
this repo's pnpm install (it isn't in `pnpm.onlyBuiltDependencies`). Run it
through `npx` instead, which installs it with build scripts enabled. From
`apps/web/`, after editing `logo.svg`:
```bash
npx --yes @capacitor/assets@3 generate --android \
--assetPath assets \
--iconBackgroundColor '#2e6b4a' --iconBackgroundColorDark '#2e6b4a' \
--splashBackgroundColor '#eef2ed' --splashBackgroundColorDark '#14181a'
```
Then commit the changed files under `android/app/src/main/res/` and run
`npx cap sync android`. The generated raster assets are checked in (they are
build inputs, not build output) — only the copied web bundle under
`android/app/src/main/assets/public/` is git-ignored.