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
3f69cade21
test: expand backend coverage
2026-01-02 11:01:56 -03:00
Tiago Yamamoto
4a18f76bd1
test: cover product import
2026-01-02 09:23:18 -03:00
Tiago Yamamoto
8eb9126bcc
Add financial service unit tests
2026-01-02 09:17:17 -03:00
Tiago Yamamoto
9fb4f3e12e
test: expand backend coverage
2026-01-01 16:01:45 -03:00
Tiago Yamamoto
c48666bf60
Add backend and frontend test coverage
2026-01-01 15:06:55 -03:00
Tiago Yamamoto
36d6fa4ae0
feat: Implement Phase 4 features
...
Backend (Go):
- FCM Push Notifications (fcm.go, push_handler.go)
- Credit Lines (credit_line.go, credit_handler.go)
- Payment Config (admin_handler.go, seller_payment_handler.go)
- Team Management (team_handler.go)
Backoffice (NestJS):
- Dashboard module (KPIs, revenue charts)
- Audit module (tracking changes)
- Disputes module (CRUD, resolution)
- Reports module (CSV export)
- Performance module (seller scores)
- Fraud module (detection, alerts)
Frontend (Marketplace):
- ThemeContext for Dark Mode
- HelpCenter page with FAQ
- OrderDetails with timeline
- Team management page
- Persistent cart (Zustand)
2025-12-27 10:07:05 -03:00
Tiago Yamamoto
bbe6ec447e
feat(backend): implement financial features (KYC, ledger, withdrawals)
2025-12-27 01:34:29 -03:00
Tiago Yamamoto
6de471ce3e
feat(backend): implement notification system (logger mock)
2025-12-27 01:24:43 -03:00
Tiago Yamamoto
132fef816c
feat(backend): implement order state machine with validation
2025-12-27 01:18:00 -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
e64b3a4855
fix(tests): update mock repo to match interface
2025-12-26 17:09:09 -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
08d98aaeca
fix: improve login error handling for invalid credentials
2025-12-22 09:31:33 -03:00
Tiago Yamamoto
4ccfa629cc
feat: add admin reviews, logistics, profile pages and update seeder
2025-12-22 09:08:42 -03:00
Tiago Yamamoto
9997aed18a
fix(backend): fix build errors, update tests, and improve documentation
...
- Add GetUserByEmail to Repository interface for password reset flow
- Add username to UpdateUser query
- Fix config_test.go: remove references to deleted DB pool fields
- Fix handler_test.go: add GetUserByUsername to MockRepository
- Fix usecase_test.go: add GetUserByUsername and update auth tests
- Update backend README with auth and admin seeding info
- Create seeder-api README with usage and warnings
2025-12-21 23:11:33 -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
4ad6a0aae5
Add marketplace record search and audit trigger
2025-12-21 17:36:17 -03:00
Tiago Yamamoto
e73d423b16
refactor: move seeder to api, improve coverage and security
2025-12-20 11:13:53 -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
45d34f36c8
feat(pagination): add pagination to all list endpoints
...
Added pagination support to:
- ListCompanies: filter by role, search
- ListProducts: filter by seller, search
- ListOrders: filter by buyer, seller, status
- ListInventory: filter by expiring date, seller
New domain types:
- ProductFilter, ProductPage
- CompanyFilter, CompanyPage
- OrderFilter, OrderPage
- InventoryPage
All endpoints now return paginated responses with:
- items array
- total count
- current page
- page size
Updated MockRepository in both test files to match new signatures
2025-12-20 08:37:59 -03:00
Tiago Yamamoto
b8973739ab
feat(backend): add comprehensive test suite for 80% coverage
...
- Add config_test.go (5 tests for env parsing)
- Add middleware_test.go (16 tests for CORS, Auth, Gzip, Logger)
- Add usecase_test.go (30+ tests for business logic)
- Add payments_test.go (6 tests for MercadoPago gateway)
Coverage: config 100%, middleware 95.9%, payments 100%, usecase 64.7%
feat(marketplace): add test framework and new pages
- Setup Vitest with jsdom environment
- Add cartStore.test.ts (15 tests for Zustand store)
- Add usePersistentFilters.test.ts (5 tests for hook)
- Add apiClient.test.ts (7 tests for axios client)
- Add Orders page with status transitions
- Add Inventory page with stock adjustments
- Add Company page with edit functionality
- Add SellerDashboard page with KPIs
Total marketplace tests: 27 passing
2025-12-20 07:43:56 -03:00
Tiago Yamamoto
aaa4955fd9
Add full CRUD coverage to core API routes
2025-12-19 18:09:25 -03:00
Tiago Yamamoto
4680035e02
Add auth docs, user CRUD, and password pepper
2025-12-19 17:54:16 -03:00
Tiago Yamamoto
cd376339b9
Add rating and dashboard endpoints
2025-12-18 13:19:21 -03:00
Tiago Yamamoto
ce825fd1d5
Add shipment endpoints and payment webhook split handling
2025-12-18 12:58:05 -03:00
Tiago Yamamoto
e96ba8a49b
Add inventory and cart endpoints
2025-12-18 12:43:51 -03:00
Tiago Yamamoto
e57445847b
Implement JWT auth and company verification
2025-12-18 12:29:51 -03:00
Tiago Yamamoto
b461ff5201
Implement user CRUD endpoints
2025-12-18 11:42:23 -03:00
Tiago Yamamoto
42f72f5f43
docs: adiciona documentação completa do projeto SaveInMed
...
- Cria README.md na raiz com visão global e diagrama de arquitetura
- Adiciona/atualiza README.md em todos os componentes:
- backend (API Go)
- backoffice (NestJS)
- marketplace (React/Vite)
- saveinmed-bff (Python/FastAPI)
- saveinmed-frontend (Next.js)
- website (Fresh/Deno)
- Atualiza .gitignore em todos os componentes com regras abrangentes
- Cria .gitignore na raiz do projeto
- Renomeia pastas para melhor organização:
- backend-go → backend
- backend-nest → backoffice
- marketplace-front → marketplace
- Documenta arquitetura, tecnologias, setup e fluxo de desenvolvimento
2025-12-17 17:07:30 -03:00