added transalations for UI texts
This commit is contained in:
33
AGENTS.md
33
AGENTS.md
@ -15,27 +15,39 @@ It describes what the project is, what is already implemented, and what still ne
|
||||
- `backend/`
|
||||
- `frontend/`
|
||||
|
||||
## Current State (as of 2026-02-13)
|
||||
## Current State (as of 2026-02-14)
|
||||
|
||||
- `README.md` already contains product specification in Slovak and English.
|
||||
- Backend DB migrations exist in `backend/src/Maintenance.php` up to version `7`.
|
||||
- Backend API methods are implemented in `backend/src/API.php`.
|
||||
- Frontend auth page is now implemented:
|
||||
- Frontend auth page is implemented:
|
||||
- `frontend/src/App.vue` renders router view.
|
||||
- `frontend/src/router/index.ts` maps `/` to `frontend/src/views/AuthView.vue`.
|
||||
- `frontend/src/router/index.ts` maps `/` to `frontend/src/views/AuthView.vue` for guests.
|
||||
- `AuthView` serves as login + registration entry (single form, email + password).
|
||||
- Successful login stores `token` and `user_email` in `localStorage`.
|
||||
- Login now uses `frontend/src/stores/auth.ts` (`Pinia`) and redirects to authenticated app routes.
|
||||
- `frontend/src/views/AuthView.vue` formatting now uses tab-based indentation.
|
||||
- Login response parsing in `AuthView` now reads user fields from `response.data.user`.
|
||||
- Frontend i18n is wired:
|
||||
- Frontend authenticated area is implemented:
|
||||
- `frontend/src/views/AppLayout.vue` is shell layout.
|
||||
- Desktop navigation: `frontend/src/components/navigation/AppSidebar.vue`.
|
||||
- Mobile navigation: `frontend/src/components/navigation/AppBottomTabs.vue`.
|
||||
- Top bar/title: `frontend/src/components/navigation/AppTopbar.vue`.
|
||||
- Pages: `TodayView`, `MealsView`, `MealDetailView`, `IngredientsView`, `StatsView`, `SettingsView`.
|
||||
- Route guard is active for `/app/*` (requires token), guest-only for `/`.
|
||||
- Frontend i18n is wired and used across new UI:
|
||||
- setup in `frontend/src/i18n/index.ts`
|
||||
- locale files in `frontend/src/locales/{sk,cs,en,es,de}.ts`
|
||||
- locale files in `frontend/src/locales/{sk,cs,en,es,de}.json`
|
||||
- language switcher updates locale dynamically.
|
||||
- new app UI keys are added (`nav`, `pageTitles`, `mealTypes`, `common`, `nutrition`, `today`, `meals`, `ingredients`, `stats`, `settings`).
|
||||
- Frontend theme system is implemented:
|
||||
- light/dark mode toggle in auth page
|
||||
- design tokens in `frontend/src/assets/css/style.css` (`:root` variables).
|
||||
- App logo is served from `frontend/public/Nutrio.png` (copied from `doc/Nutrio.png`).
|
||||
- Font Awesome is installed and registered globally in `frontend/src/main.ts`.
|
||||
- Pinia is installed and configured in `frontend/src/main.ts` via `frontend/src/stores/index.ts`.
|
||||
- Frontend domain/store structure exists:
|
||||
- `frontend/src/types/domain.ts`
|
||||
- `frontend/src/stores/{auth,ingredients,meals,diary}.ts`
|
||||
- `frontend/src/utils/{nutrition,api,date}.ts`
|
||||
- `frontend/src/BackendAPI.ts` is generated via `backend/scripts/buildTypeScript.php` and should not be edited manually.
|
||||
- `backend/data.json` contains sample meal data (not currently wired into DB/API flow).
|
||||
|
||||
@ -143,7 +155,7 @@ All actions are invoked through `backend/public/API.php` with `?action=<method_n
|
||||
- APIlite response handling detail:
|
||||
- raw API response is wrapped as `{ status, data }`
|
||||
- generated `BackendAPI.ts` currently resolves `response.data` in `callPromise` for non-`__HELP__` actions
|
||||
- frontend parsing must match the actual returned runtime shape
|
||||
- frontend stores use `frontend/src/utils/api.ts` (`unwrapApiData`) to normalize both envelope and unwrapped runtime shapes
|
||||
- `frontend/src/BackendAPI.ts` is generated output; regenerate when backend API changes, do not patch manually.
|
||||
- In vue-i18n locale strings, `@` must be escaped as `{'@'}` to avoid "Invalid linked format" errors.
|
||||
|
||||
@ -169,8 +181,9 @@ Frontend:
|
||||
## Product Behavior Target (what to build next)
|
||||
|
||||
- Harden auth (token transport/header strategy, token revoke strategy, brute-force/rate-limits).
|
||||
- Build remaining frontend screens for ingredients, meals, meal item editor, diary day, diary range.
|
||||
- Connect frontend to implemented backend actions.
|
||||
- Polish authenticated frontend UX (validation messages, delete confirmations, optimistic updates, better loading/error states).
|
||||
- Add diary range screen/workflow on frontend (backend endpoint already exists).
|
||||
- Add i18n coverage for any future UI additions and keep keys stable.
|
||||
- Add API tests for validation, ownership checks, and totals calculation consistency.
|
||||
- Add pagination/filter strategy where list endpoints grow.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user