2026-03-25 14:53:32 +01:00
|
|
|
|
# BitePlan
|
|
|
|
|
|
|
2026-05-17 23:39:00 +02:00
|
|
|
|
App Android per la gestione della dieta quotidiana — pianificazione pasti, conversione crudo/cotto e lista della spesa.
|
2026-03-25 14:53:32 +01:00
|
|
|
|
|
|
|
|
|
|
## Funzionalità
|
|
|
|
|
|
|
2026-03-27 10:24:42 +01:00
|
|
|
|
### Piano Pasti
|
|
|
|
|
|
- Pianificazione settimanale su 7 giorni × 3 pasti (colazione, pranzo, cena)
|
|
|
|
|
|
- Card accordion per giorno, giorno corrente aperto di default
|
|
|
|
|
|
- Aggiunta e rimozione di voci per ogni pasto
|
2026-05-17 23:39:00 +02:00
|
|
|
|
- Generazione automatica della lista della spesa con aggregazione duplicati (es. "zucchine (x2)")
|
|
|
|
|
|
- Condivisione del piano via QR code tra dispositivi
|
|
|
|
|
|
- Persistenza automatica su SharedPreferences
|
2026-03-27 10:24:42 +01:00
|
|
|
|
|
|
|
|
|
|
### Convertitore crudo/cotto
|
|
|
|
|
|
- Conversione bidirezionale del peso (crudo → cotto e cotto → crudo)
|
|
|
|
|
|
- Ricerca alimento in tempo reale
|
|
|
|
|
|
- Oltre 50 voci tra cereali, legumi, verdure, carni, pesce e uova
|
|
|
|
|
|
- Fino a 4 metodi di cottura per alimento: bollitura, padella, forno, friggitrice ad aria
|
2026-05-17 23:39:00 +02:00
|
|
|
|
- Coefficienti di resa documentati con fonti — vedi [docs/conversioni.md](docs/conversioni.md)
|
2026-03-27 10:24:42 +01:00
|
|
|
|
|
|
|
|
|
|
### Lista della spesa
|
|
|
|
|
|
- Checklist con aggiunta manuale o importazione dai pasti pianificati
|
|
|
|
|
|
- Separazione visiva tra elementi da completare e completati
|
|
|
|
|
|
- Rimozione singola e svuota lista con conferma
|
2026-03-25 14:53:32 +01:00
|
|
|
|
|
2026-06-04 16:28:27 +02:00
|
|
|
|
### Controllo aggiornamenti
|
|
|
|
|
|
- All'avvio controlla silenziosamente l'ultima release su GitHub
|
|
|
|
|
|
- Se disponibile una versione più recente, mostra un dialog con link diretto al download dell'APK
|
|
|
|
|
|
|
2026-03-25 14:53:32 +01:00
|
|
|
|
## Stack
|
|
|
|
|
|
|
|
|
|
|
|
| Livello | Tecnologia |
|
|
|
|
|
|
|---|---|
|
2026-05-18 22:03:51 +02:00
|
|
|
|
| Framework | Flutter 3.41.9 / Dart 3.11.5 |
|
2026-05-17 23:39:00 +02:00
|
|
|
|
| State management | Provider |
|
|
|
|
|
|
| Persistenza | shared_preferences |
|
|
|
|
|
|
| QR code | qr_flutter + mobile_scanner |
|
|
|
|
|
|
| Build APK | Docker (headless) |
|
2026-03-25 14:53:32 +01:00
|
|
|
|
|
2026-05-17 23:39:00 +02:00
|
|
|
|
## Sviluppo
|
2026-03-27 14:35:11 +01:00
|
|
|
|
|
2026-07-12 19:30:34 +02:00
|
|
|
|
Sviluppo locale con Flutter installato sull'host e un emulatore Android dedicato — no Docker.
|
2026-03-27 14:35:11 +01:00
|
|
|
|
|
2026-05-17 23:39:00 +02:00
|
|
|
|
```bash
|
2026-07-12 19:30:34 +02:00
|
|
|
|
emulator -avd biteplan &
|
|
|
|
|
|
flutter run
|
|
|
|
|
|
# hot reload con "r", hot restart con "R"
|
2026-05-17 23:39:00 +02:00
|
|
|
|
```
|
2026-03-27 14:35:11 +01:00
|
|
|
|
|
2026-07-12 19:30:34 +02:00
|
|
|
|
Vedi [docker/README.md](docker/README.md) per test e build APK via Docker.
|
2026-05-17 23:39:00 +02:00
|
|
|
|
|
|
|
|
|
|
## Test
|
|
|
|
|
|
|
|
|
|
|
|
La suite copre unit test e widget test. Richiede l'immagine Docker `biteplan-build`
|
2026-07-12 19:30:34 +02:00
|
|
|
|
(creata automaticamente al primo `bash docker/build.sh`).
|
2026-05-17 23:39:00 +02:00
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
# Tutti i test (dalla root del progetto)
|
|
|
|
|
|
docker run --rm -v "$(pwd):/workspace" -w /workspace biteplan-build \
|
|
|
|
|
|
bash -c "flutter pub get && flutter test"
|
|
|
|
|
|
|
|
|
|
|
|
# Un singolo file
|
|
|
|
|
|
docker run --rm -v "$(pwd):/workspace" -w /workspace biteplan-build \
|
|
|
|
|
|
bash -c "flutter test test/features/meal_planner/qr_test.dart"
|
|
|
|
|
|
```
|
2026-03-25 14:53:32 +01:00
|
|
|
|
|
2026-05-17 23:39:00 +02:00
|
|
|
|
### Struttura
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
test/
|
|
|
|
|
|
├── helpers/
|
|
|
|
|
|
│ └── pump_app.dart # estensione pumpApp per widget test
|
2026-06-04 16:28:27 +02:00
|
|
|
|
├── features/
|
|
|
|
|
|
│ ├── converter/
|
|
|
|
|
|
│ │ ├── models/conversion_entry_test.dart
|
|
|
|
|
|
│ │ └── providers/converter_provider_test.dart
|
|
|
|
|
|
│ ├── meal_planner/
|
|
|
|
|
|
│ │ ├── models/meal_plan_test.dart
|
|
|
|
|
|
│ │ ├── providers/meal_planner_provider_test.dart
|
|
|
|
|
|
│ │ ├── widgets/meal_card_test.dart
|
|
|
|
|
|
│ │ └── qr_test.dart
|
|
|
|
|
|
│ └── shopping_list/
|
|
|
|
|
|
│ ├── models/shopping_item_test.dart
|
|
|
|
|
|
│ ├── providers/shopping_list_provider_test.dart
|
|
|
|
|
|
│ └── widgets/shopping_item_tile_test.dart
|
|
|
|
|
|
└── shared/
|
|
|
|
|
|
├── services/
|
|
|
|
|
|
│ └── update_service_test.dart # parsing versione e confronto semver
|
|
|
|
|
|
└── widgets/
|
|
|
|
|
|
└── update_dialog_test.dart # widget test dialog aggiornamento
|
2026-05-17 23:39:00 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Build APK
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-07-12 19:30:34 +02:00
|
|
|
|
bash docker/build.sh # debug → dist/biteplan-debug.apk
|
|
|
|
|
|
bash docker/build.sh --release # release → dist/biteplan-release.apk
|
2026-05-17 23:39:00 +02:00
|
|
|
|
```
|
2026-03-25 14:53:32 +01:00
|
|
|
|
|
2026-05-17 23:39:00 +02:00
|
|
|
|
Vedi [docker/README.md](docker/README.md) per i requisiti della firma release.
|
2026-03-25 14:53:32 +01:00
|
|
|
|
|
|
|
|
|
|
## Documentazione
|
|
|
|
|
|
|
|
|
|
|
|
- [Guida utente](docs/guida-utente.md)
|
|
|
|
|
|
- [Fonti e documentazione conversioni](docs/conversioni.md)
|
|
|
|
|
|
- [Changelog](CHANGELOG.md)
|
|
|
|
|
|
|
|
|
|
|
|
## Licenza
|
|
|
|
|
|
|
|
|
|
|
|
[EUPL v1.2](LICENSE) — Davide Grilli
|