4a77449a41
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | #203 | Réceptions — Parcours de pesée multi-étapes | ## Description de la PR [#203] Réceptions — Parcours de pesée multi-étapes ## Modification du .env ## Check list - [x] Pas de régression - [x] TU/TI/TF rédigée - [x] TU/TI/TF OK - [x] CHANGELOG modifié Reviewed-on: https://gitea.malio.fr/MALIO-DEV/Ferme/pulls/3 Reviewed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-authored-by: AUTIN Tristan <tristan@yuno.malio.fr> Co-committed-by: AUTIN Tristan <tristan@yuno.malio.fr>
2.5 KiB
2.5 KiB
AGENTS.md
Project overview
- Symfony 8 + API Platform 4 backend, Nuxt 3 frontend in
frontend/. - Apache vhost serves API under
/apiand frontend fromfrontend/dist. - API base URL on frontend uses
NUXT_PUBLIC_API_BASE(seefrontend/.env).
Backend conventions
- Use English for code identifiers/messages; keep “pont-bascule” as domain term.
- API Platform operations are defined on Doctrine entities.
- Reception entity is in
src/Entity/Reception.php, with custom weigh endpoint/receptions/weigh. - Reception fields:
date_reception,license_plate,current_step(default 0),is_valid(default false). date_receptionis set by the UI, stored asDateTimeImmutable, serialized asY-m-d.- Weight entity (
src/Entity/Weight.php) is 1–N with Reception, each row storestype(grossortare),dsd,weight,weighed_at(all nullable excepttype). - Weigh endpoint
/receptions/weighreturnsPontBasculeReadingwithdsd,weight,weighedAt(formattedY-m-d). - Custom exception:
App\Exception\PontBasculeExceptionwith French messages, mapped to 500 in provider. - Parsing of pont-bascule payload is in
src/Service/PontBasculePayloadDecoder.php. config/reference.phpis auto-generated; keep it.
Frontend conventions
- Nuxt SSR disabled; Tailwind used.
- Layout in
frontend/layouts/default.vue: max width1050px, header full width. - Tailwind custom color palette is
primary(e.g.bg-primary-500). - API composable in
frontend/composables/useApi.tswithget/post/put/patch/deleteand default JSON/PATCH content types. - Pinia store:
frontend/stores/reception.tsis the source of truth for the current reception. - Zod is used for form validation (e.g.
frontend/components/reception/reception-form.vue); shared helpers live infrontend/utils/zod-errors.ts. - Weighing logic is shared via
frontend/composables/useWeighing.ts. - Reception step UI uses store state (
currentStep) infrontend/pages/reception/[[id]].vue. - Active nav styles in header use
NuxtLinkwithcustomslot. - Reusable UI components live under
frontend/components/ui/and are auto-imported withUiprefix (e.g.UiLoadingDots).
Environment & routing
- Frontend dev server:
npm run devinfrontend/. - API base for local dev:
http://localhost:8080/api(set infrontend/.envviaNUXT_PUBLIC_API_BASE). - CORS handled by Nelmio;
.envincludesCORS_ALLOW_ORIGINregex for localhost.
Notes
- Do not add a GET that creates resources; use POST + PATCH.
- Keep endpoints in plural (API Platform convention).