8 Commits
Author SHA1 Message Date
Evandro Fonseca Junior 47c04de6fe style: clean up code formatting and remove trailing whitespace
refactor: reorganize imports and fix type imports
2025-11-11 03:08:36 -03:00
Evandro Fonseca Junior d27526e026 feat(auth): include subscription tier in token and session payload
- Adds subscription tier info to access/refresh tokens.
- Stores tier details in session Redis record.
- Returns tier data in login/register response.
- Uses default tier when user has none.
2025-11-07 21:03:19 -03:00
Evandro Fonseca Junior ab37b477df feat: implement market page with QueryProvider and dynamic listings
- wrap root layout with QueryProvider for React Query
- replace market UnderConstruction placeholder with MarketClient and real data fetching
- implement search, pagination, and sort via search params using getActiveListings
- add necessary client components and queries
- update dependencies (e.g., prisma, pkg-types)
2025-11-05 01:58:03 -03:00
Evandro Fonseca Junior 55eebde0ba feat: add user authentication UI to header component
Add login and register dialogs, user dropdown menu with profile link and logout option, and integrate with session management hook. Prevent hydration mismatches by conditionally rendering auth elements after mount. Update package-lock.json with new @esbuild dependencies for build tooling.
2025-11-04 02:33:29 -03:00
Evandro Fonseca Junior 8b5817e8ca feat(donation): increase minimum custom donation amount to R$ 5.00
- Updated customAmountSchema min value from 0.01 to 5
- Adjusted validation logic and error messages to reflect new minimum
- Modified DONATION_PRODUCTS minAmount for custom tier to 5
- Ensures donations meet the new minimum threshold for processing
2025-10-26 23:31:06 -03:00
Evandro Fonseca Junior e30d9493ff feat: enhance donation creation logging and adjust amount limits
- Add detailed secure logging throughout the donation creation API route for production debugging, including request receipt, validation results, amount calculations, PIX creation success, and error handling
- Update custom donation amount schema to allow minimum 0.01 and maximum 100,000 for broader donation flexibility
- Modify secure logger to always output data in production for improved monitoring and troubleshooting
2025-10-26 23:24:46 -03:00
Evandro Fonseca Junior c7d4dadbbb refactor(validation): refactor createDonationSchema to use discriminatedUnion
Refactored the createDonationSchema from a combination of .object().and(z.union()) to a discriminatedUnion based on the "anonymous" field. This improves type safety and validation logic by explicitly handling anonymous and identified donations, ensuring customAmount is properly validated in both cases. The change maintains the same validation rules while simplifying the schema structure.
2025-10-26 23:11:21 -03:00
Evandro Fonseca Junior a1800227a7 refactor(api): enhance donation creation with rate limiting, Zod validation, and secure logging
- Add rate limiting to prevent abuse on /api/donations/create endpoint
- Replace manual input validation with Zod schema for better error handling and type safety
- Switch from console.log to secureLogger to comply with LGPD and avoid exposing sensitive data
- Remove sensitive request body logging in AbacatePay client for improved security
2025-10-26 23:01:19 -03:00