10 KiB
10 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
api-v2026.07.03.34; app-v2026.07.03.35 - 03/07/2026
Added
- Botão para iniciar uma venda a partir de um PDV na lista de rotas.
Changed
- Tela de gerenciar Paradas na página de Rotas, removido o dropdown e adicionado um campo de texto para pesquisa manual.
- Nome do app alterado de Polpa Gestão para Polpa Go.
- Versão das dependências no frontend e backend, atualizado para as últimas versões disponíveis.
Fixed
- Tamanho e viewport em dispositivos móveis empurrando components para fora da tela visíveil.
Docker images
docker.io/rmcampos/polpa-gestao-app:app-v2026.07.03.32
api-v2026.06.24.22 && app-v2026.06.24.23 - 2026-06-24
Changed
- Bumped frontend dependencies to the latest version, including React
Fixed
- Build number not showing up correctly in prod.
Docker images
docker.io/rmcampos/polpa-gestao-api:api-v2026.06.24.22docker.io/rmcampos/polpa-gestao-app:app-v2026.06.24.23
api-v2026.06.16.7 && app-v2026.06.16.8 - 2026-06-16
Changed
- Container Registry to Docker Hub.
- Migrated from GitHub to Gitea.
Docker images
- rmcampos/polpa-gestao-app:app-v2026.06.16.8
- rmcampos/polpa-gestao-api:api-v2026.06.16.7
- rmcampos/polpa-gestao-api:api-v2026.06.16.7-prisma
2026-06-13 #1
Fixed
- Missing Google Maps API Key and CPF CNPJ API Key integration in backend deployment.
Docker images
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.11.34
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.11.34-prisma
2026-06-11 #3
Fixed
- Login issue due to jwt secrets missing in production.
2026-06-11 #2
Added
- Created
CustomerDeletedaudit database table and model to log details of deleted customers. - Created
/api/proxy/validatorand/api/proxy/geocodeendpoints in backend to proxy third-party validation and mapping requests securely. - Added
/api/users/meand/api/users/logoutendpoints in backend for cookie session verification and cleanup.
Changed
- Configured explicit allowed origins for CORS from
ALLOWED_ORIGINSenvironment variable, defaulting tohttp://localhost:5173. - Gated public closest POS endpoint
/api/public/pos/closestwith rate-limiting (max 15/min) and removedlat,lng, andlastBuyingDatefields from its response. - Configured
@fastify/jwtto read tokens frompolpaAuthHttpOnly cookie. - Overrode frontend
localStorageto storetokenanduserstrictly in-memory (JS variables) instead of persistent disk storage. - Proxy validation and geocoding in frontend
Customers.tsxthrough backend instead of using direct third-party calls. - Compiled production backend build without TS source maps or declarations using a specialized
tsconfig.prod.json. - JWT token is no longer returned in login or
/api/users/meresponse bodies — token is exclusively transported via thepolpaAuthHttpOnly cookie and never exposed to JavaScript. - Removed all
Authorization: Bearerheaders from frontend API calls — authentication relies solely on the HttpOnly cookie sent automatically by the browser. Storage.prototypeoverride now only intercepts theuserkey (token interception removed as token no longer exists in JS context).- Cookie signing reverted to
signed: false— JWT's own HMAC signature provides integrity;@fastify/cookielayer was redundant and non-functional in v11.
Fixed
- H1: Public endpoint leaks customer GPS + buying data.
- H2: CORS reflects any origin.
- H3: JWT in localStorage (XSS-accessible).
- H4: API tokens baked into frontend Docker image.
- H5: Hard delete of sales (no audit trail) mitigated by auditing customer deletes via
CustomerDeleted. - H6: Source maps served in production.
- Parameter injection vulnerability in
/api/proxy/validator:valueandtokenquery parameters are now URL-encoded before being forwarded to the Invertexto API. - Session re-issue on every
/api/users/mecall removed — endpoint now returns user data only, without silently extending the session on each page load. Storage.prototypeoverride applied at prototype level instead of instance level, fixing Firefox compatibility where instance-level assignment was silently ignored.
Docker images
- ghcr.io/rmcampos/polpa-gestao/frontend:app-v2026.06.11.52
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.11.34
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.11.34-prisma
2026-06-11 #1
Added
- Scoped rate limiting using
@fastify/rate-limitfor/api/users/loginendpoint keyed by IP + email. - In-memory login failure tracking with exponential backoff lockout after 3 consecutive failures.
- Role-based authorization middleware via
requireAdmindecorator on Fastify backend. - Enforced admin role requirement on Users management, Product modification, Customer/POS deletion, Sale deletion, and Dashboard routes.
- Frontend role guards and conditional sidebar rendering to restrict non-admin users from accessing Users or Dashboard views.
Changed
- Removed hardcoded fallback JWT signature secret.
- Seed script updated to read admin credentials from environment variables or generate a secure random password on first seed.
- Docker compose configuration updated to forward
JWT_SECRETto the backend container.
Fixed
- Hardcoded default admin user credentials security vulnerability (C2).
- Zero role-based authorization model allowing non-admin users to reach admin endpoints (C3).
- Potential authentication bypass due to fallback JWT secret when environment variable is missing (C1).
- No brute-force protection on user login (C4).
Docker images
- ghcr.io/rmcampos/polpa-gestao/frontend:app-v2026.06.11.50
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.11.33
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.11.33-prisma
2026-06-10 #2
Added
- Option do delete customers and POSes, with a confirmation modal to prevent accidental deletions.
Changed
- Customer and POSes tables foreign keys recreating them with
ON DELETE CASCADEto ensure related records are removed when a customer or POS is deleted. - Updates on a disabled customer make it enabled again.
Fixed
- Clearing up the phone number input on the customer modal.
Docker images
- ghcr.io/rmcampos/polpa-gestao/frontend:app-v2026.06.10.49
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.10.32
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.10.32-prisma
2026-06-10 #1
Added
- Card to the dashboard page displaying customer POSes and their last buying date for those who haven't bought anything in 10 days or more.
Docker images
- ghcr.io/rmcampos/polpa-gestao/frontend:app-v2026.06.10.48
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.10.31
- ghcr.io/rmcampos/polpa-gestao/backend:api-v2026.06.10.31-prisma
app-v2026.06.08.47 - 2026-06-08
Added
- Professional local development setup with Taskfile and Doppler for secure secret management.
- Doppler integration in CI/CD workflows for streamlined secret handling.
- POS by Region summary on the dashboard for better regional insights.
- Dashboard drill-down for Total Fridges with POS-level modal and API.
- POS Industry Summary endpoint and dashboard card.
- Industry field to Customer POS for categorization.
- Optional
regionfield to POS for filtering and reporting. - Optional
notesfield for customers in Prisma schema and database migration. - Notes textarea in the customer create/edit modal with support for loading existing notes.
- Optional notes snippet display on customer cards.
Changed
- Improved Terraform deployment plan with variables for better configurability.
- Updated README with clearer setup instructions.
- CI/CD workflows updated to use Doppler for environment secrets.
- Frontend build CI improved with Doppler integration.
- Container names and Docker flows updated for better naming consistency.
- Quantity input in sales page changed to text type for better UX.
- Closest page updated to include customer name for easier identification.
- Customer POST/PUT API handlers now accept and persist optional
notes.
Fixed
- Unable to type all 14 digits for enterprise documents on customer creation.
- Wrong Doppler secret name in multiple workflow files.
- Prevented duplicate Customer and POS creation.
[app-v2026.06.03.45] - 2026-06-03
- Initial tagged release.