Last update
Better Auth + MercadoPago
Plugin that resolves the friction between authentication and billing, providing a type-safe abstraction layer for MercadoPago within Better Auth.
The Payments Integration Problem
Integrating payment gateways often introduces immediate technical debt:
- "Black Box" Webhooks: Untyped payloads that break at runtime.
- Scattered Logic: Payment controllers mixed with business logic.
- Desynchronization: User state in the DB doesn't match the state in the gateway.
The Solution: Infrastructure as Code
This plugin is not just a wrapper; it's a piece of infrastructure that standardizes how your application handles money.
Type-Safe Architecture
Using Zod and TypeScript, every interaction with the MercadoPago API is validated. If the payment schema changes, your build fails before it reaches production.
Design Principles
- Strict Decoupling: Billing logic lives isolated from product logic.
- Developer Experience (DX): Intelligent autocomplete for plans, subscriptions, and events.
- Unified Webhook Handler: A single endpoint to govern all payment events, with automatic cryptographic signature validation.
Technical Impact
- Boilerplate Reduction: Eliminates +200 lines of repetitive integration code.
- Security: Automatic validation of signatures and payloads.
- Maintainability: Centralized updates to the MercadoPago SDK without touching product code.
Designed for teams that value robustness and security in their revenue flows.
MemesDev: Social Network for Developers
Open Source social platform built with Next.js 14, Prisma, and Auth.js. A showcase of modern architecture, performance, and UX.
Next.js 16: Cache Components Demo
Reference implementation of granular caching with Next.js 16. Advanced patterns of 'use cache', 'cacheTag' and PPR.