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
|
beffeb8268
|
feat(security): add rate limiting and security headers middleware
Rate Limiting (ratelimit.go):
- Token bucket algorithm per IP
- Default: 100 requests/minute
- X-Forwarded-For support
- Cleanup for stale buckets
- 7 tests (ratelimit_test.go)
Security Headers (security.go):
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- X-XSS-Protection: 1; mode=block
- Content-Security-Policy: default-src 'none'
- Referrer-Policy: strict-origin-when-cross-origin
- Cache-Control: no-store, max-age=0
Middleware coverage: 97.3% -> 95.8% (new code added)
|
2025-12-20 08:41:36 -03:00 |
|
Tiago Yamamoto
|
b713d8fbed
|
test(middleware): expand coverage 95.9% -> 97.3%
Added tests for:
- Expired token handling
- Wrong signing method rejection (None type attack)
|
2025-12-20 08:24:03 -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 |
|