Commit Graph
26 Commits
Author SHA1 Message Date
Evandro Fonseca Junior 41e82db2f6 ultima antes do format 2025-11-22 01:59:01 -03:00
Evandro Fonseca Junior b8a8d3cc17 fix(items): normalize item fields and improve data integrity checks
Ensure consistent field names and types between API and client components. Add fallback values for missing fields and implement better error logging for invalid items. Improve key generation for item rendering to prevent duplicate keys.
2025-11-11 03:29:10 -03:00
Evandro Fonseca Junior 6adc8d96e8 refactor: reorganize hooks and add safety checks
fix(api): add validation for listing and seller in bid route
feat(telemetry): add userId to MarketTelemetry
style(globe): add null check for canvas element
chore: add lint:fix script to package.json
2025-11-11 03:20:01 -03:00
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 d3704602fd feat(items): add server field and improve item management
refactor(ai): enhance item structure generation with schema validation
feat(ai): add token usage tracking and cost calculation
fix(ui): improve item card number formatting with locale support
docs(items): add documentation for item value separation
test(items): add tests for value field validation
2025-11-11 03:04:49 -03:00
Evandro Fonseca Junior dc169f9eba style: remove trailing whitespace in admin categories fields route 2025-11-10 22:48:49 -03:00
Evandro Fonseca Junior f4bc93bc8a changes shopping 2025-11-09 15:37:53 -03:00
Evandro Fonseca Junior 62ab5b2608 feat(admin): centralize subscriptions under /admin?tab=subscriptions
Replaced the dedicated /admin/subscriptions page with a redirect to the central admin panel’s subscriptions tab. Removed session checks, imports, and the AdminSubscriptionDashboard since routing and access are now handled centrally. This streamlines admin UX and keeps access control unified.
2025-11-09 01:50:50 -03:00
Evandro Fonseca Junior d8e7d5d7e6 feat: enhance purchase intentions with chat integration and offer tracking
- Added MongoDB chat/message integration for seller responses
- Improved seller response validation and default messaging
- Integrated automatic chat creation/update when responding to intentions
- Added highest custom offer fields to listing queries and models
- Enhanced listing data with top offer information for buyers
2025-11-08 11:51:21 -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 7f42def478 feat(market): add Minha Intenções tab with panel, hook, and badge
- Introduced "Minhas Intenções" tab visible only to logged-in users.
- Integrated MyPurchaseIntentionsPanel and useMyPurchaseIntentions hook.
- Added tab badge showing count of pending intentions.
- Extended session API to include user’s main character for downstream features.
2025-11-07 17:25:51 -03:00
Evandro Fonseca Junior f35fee944d refactor(register, listings, items): simplify transaction, remove unused variable, add explicit types
- Remove newUser variable and directly return created user from Prisma transaction in register route
- Add explicit casts for Prisma QueryMode to avoid TypeScript widening in listings search
- Fix items search and getItemBySource with any cast and ts-expect-error to satisfy type checks

Improves readability and type safety without changing behavior.
2025-11-05 04:38:07 -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 2b790d8eb4 feat(library): add vocation filter, normalize categories, improve grid layout
Added vocation state and included it in query string builder, updated onFilter to accept a vocation parameter, improved grid layout with grid flow classes, normalized category names for consistent item icons, and refined stats mapping to handle type safety.
2025-10-30 18:44:52 -03:00
Evandro Fonseca Junior 44d7f8ce81 feat(item-card): add 'market'/'catalog' mode prop with defensive price checks
Introduces optional `mode` prop ("market"/"catalog") to conditionally render components like rarity badges. Adds defensive checks for missing price data and priceHistory properties to prevent runtime errors. New icons `Badge` and `Boxes` imported from lucide-react.
2025-10-30 14:10:46 -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 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
Evandro Fonseca Junior 5ccc9120c4 feat(donations): add custom donation tier with flexible amount selection
- Updated support page grid layout to accommodate new custom donation card
- Enhanced API route to validate and process custom donation amounts (min/max limits)
- Modified donation card component to include custom amount input field
- Ensures users can donate any amount within specified range, improving donation flexibility
2025-10-26 22:30:46 -03:00
Evandro Fonseca Junior 8271d1fa31 feat(thank-you-page): convert to client component with confetti and UI enhancements
- Changed from server to client component to enable interactive features like confetti animation
- Removed server-side translations and hardcoded Portuguese text for simplicity
- Added confetti effect on page load and improved success icon with animations
- Updated buttons and share functionality for better user experience
- This enhances the donation thank you page with celebratory elements and client-side interactivity
2025-10-26 22:12:43 -03:00
Evandro Fonseca Junior 634a5bc40b refactor: update AbacatePay webhook auth to use query param secret
- Replaced signature-based verification with secret validation using webhookSecret query parameter for improved compatibility
- Added CORS headers in next.config.ts for webhook API routes to handle external requests from varying IPs
- Updated abacatepay.ts verifyWebhookSignature method for backward compatibility, now delegating validation to route handler
2025-10-26 21:53:39 -03:00
Evandro Fonseca Junior 9e86b187e1 refactor(webhooks): add type annotation to donationRecord for improved TypeScript safety and future database logging structure 2025-10-26 21:42:43 -03:00
Evandro Fonseca Junior 2697e2d1f5 feat: enhance webhook for payment confirmation and add frontend detection
Improve webhook handling in AbacatePay route to accurately detect paid events, support anonymous donations, and log structured data for future database and email integrations. Add frontend logic in DonationCard to check payment confirmation via localStorage for real-time UI updates without API polling.
2025-10-26 21:41:05 -03:00
Evandro Fonseca Junior ef521876eb feat: enhance AbacatePay donation system with updated docs and form fields
Updated ABACATEPAY_SETUP.md with comprehensive setup guide, including environment variables, API key instructions, webhook configuration, donation flow, and field details for better integration clarity. Added required fields (phone, CPF/CNPJ) to the donation form in app/[locale]/apoiar/page.tsx to collect essential donor information and improve compliance. This ensures smoother setup and more robust donation processing.
2025-10-26 21:16:59 -03:00
Evandro Fonseca Junior 00501e6699 refactor(support): replace mock data with real costs and simplify stats
Updated support page to use real data instead of mock values, including monthly costs
2025-10-26 18:32:15 -03:00
Evandro Fonseca Junior 01e97eb078 feat: add donation support with footer card and navigation
Add donation functionality to encourage community support, including a footer card on the home page, a highlighted "Apoiar" link in the header, and comprehensive English messages for the donation section to promote transparency and user engagement.
2025-10-26 18:14:53 -03:00