88 lines
2.0 KiB
Markdown
88 lines
2.0 KiB
Markdown
# DailyMeals Mobile
|
|
|
|
Cross-platform **iOS** and **Android** client for the DailyMeals API, built with [Expo](https://expo.dev/) (~56) and [Expo Router](https://docs.expo.dev/router/introduction/).
|
|
|
|
## Features
|
|
|
|
- Sign in / register with JWT (tokens stored in SecureStore)
|
|
- Dashboard with meal categories
|
|
- Browse and search all recipes
|
|
- Recipe detail (ingredients + steps)
|
|
- Add recipes manually
|
|
- English / Polish (i18n)
|
|
- Four color themes (forest, ocean, sunset, berry)
|
|
|
|
## Prerequisites
|
|
|
|
- Node.js 20+
|
|
- [Expo Go](https://expo.dev/go) on a physical device, or Xcode (iOS Simulator) / Android Studio (emulator)
|
|
- DailyMeals API running locally (default `http://localhost:5000`)
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
cd meal-plan-frontend-mobile
|
|
npm install
|
|
```
|
|
|
|
Optional API override:
|
|
|
|
```bash
|
|
export EXPO_PUBLIC_API_URL=http://192.168.1.10:5000/api
|
|
```
|
|
|
|
When unset, dev builds use:
|
|
|
|
| Platform | Default API base |
|
|
|----------|------------------|
|
|
| iOS Simulator | `http://localhost:5000/api` |
|
|
| Android Emulator | `http://10.0.2.2:5000/api` |
|
|
| Physical device | Set `EXPO_PUBLIC_API_URL` to your machine's LAN IP |
|
|
|
|
## Run
|
|
|
|
```bash
|
|
npm start
|
|
```
|
|
|
|
Then press:
|
|
|
|
- `i` — iOS Simulator
|
|
- `a` — Android Emulator
|
|
- Scan QR code — Expo Go on a phone (same network; set `EXPO_PUBLIC_API_URL`)
|
|
|
|
Or:
|
|
|
|
```bash
|
|
npm run ios
|
|
npm run android
|
|
```
|
|
|
|
## Project structure
|
|
|
|
```
|
|
app/ Expo Router screens
|
|
(auth)/ Login & register
|
|
(main)/(tabs)/ Dashboard, meals, manage, settings
|
|
(main)/recipe/[id] Recipe detail
|
|
(main)/category/[category]
|
|
src/
|
|
api/ Fetch client + API modules
|
|
context/ Auth & appearance
|
|
i18n/ EN/PL translations
|
|
theme/ Color presets
|
|
components/ Shared UI
|
|
```
|
|
|
|
## Bundle identifiers
|
|
|
|
- iOS: `com.dailymeals.mobile`
|
|
- Android: `com.dailymeals.mobile`
|
|
|
|
Configured in `app.config.ts`.
|
|
|
|
## Notes
|
|
|
|
- Excel import is available on the web clients only; mobile supports manual recipe entry.
|
|
- PDF export is not included on mobile.
|