Gabbriiel
90467db1ec
refactor: substitui backend Medusa por backend Go e corrige testes do marketplace
...
- Remove backend Medusa.js (TypeScript) e substitui pelo backend Go (saveinmed-performance-core)
- Corrige testes auth.test.ts: alinha paths de API (v1/ sem barra inicial) e campo access_token
- Corrige GroupedProductCard.test.tsx: ajusta distância formatada (toFixed) e troca userEvent por fireEvent com fakeTimers
- Corrige AuthContext.test.tsx: usa vi.hoisted() para mocks e corrige parênteses no waitFor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 04:56:37 -06:00
Tiago Yamamoto
668156fb48
Rename backend folder to backend-old
2026-01-16 10:51:52 -03:00
Tiago Yamamoto
ed4349a938
feat: Implement Payment Methods, Shipping Improvements, Swagger Audit, and UUIDv7 Migration
...
- Payment Methods: Added Pix/Credit/Debit selection in checkout, updated backend models and handlers.
- Shipping: Updated Checkout UI, added shipping_settings table and seed data.
- Swagger: Updated API docs, regenerated swagger.yaml.
- UUIDv7: Migrated seeder and backend tests to use uuid.NewV7().
2025-12-26 17:48:50 -03:00
Tiago Yamamoto
51a8293a11
fix(auth): support login with email in addition to username
2025-12-26 17:05:12 -03:00
Tiago Yamamoto
baa60c0d9b
feat: overhaul shipping module, add seeder, and improve order UI
2025-12-23 18:23:32 -03:00
Tiago Yamamoto
4612172b3c
feat(backend): switch auth to username and cleanup db config
2025-12-21 23:04:47 -03:00
Tiago Yamamoto
b72f8f3099
Add full auth endpoints and swagger updates
2025-12-21 22:37:54 -03:00
Tiago Yamamoto
fd60888706
Add shipping settings and calculation
2025-12-20 10:47:37 -03:00
Tiago Yamamoto
4bb848788f
feat: tenant model, seeder, and product search with distance
...
Tenant Model:
- Renamed Company→Tenant (Company alias for compatibility)
- Added: lat/lng, city, state, category
- Updated: postgres, handlers, DTOs, schema SQL
Seeder (cmd/seeder):
- Generates 400 pharmacies in Anápolis/GO
- 20-500 products per tenant
- Haversine distance variation ±5km from center
Product Search:
- GET /products/search with advanced filters
- Filters: price (min/max), expiration, distance
- Haversine distance calculation (approx km)
- Anonymous seller (only city/state shown until checkout)
- Ordered by expiration date (nearest first)
New domain types:
- ProductWithDistance, ProductSearchFilter, ProductSearchPage
- HaversineDistance function
Updated tests for Category instead of Role
2025-12-20 09:03:13 -03:00
Tiago Yamamoto
23df78d9c3
refactor(handler): extract DTOs and helpers to dto.go
...
- Move 18 request/response structs to dto.go
- Move utility functions (writeJSON, decodeJSON, parseUUID, etc)
- Reduce handler.go from 1471 to 1254 lines (~15% reduction)
- All tests passing
2025-12-20 07:54:35 -03:00