





















Acer0
Buenos Aires, Argentina
Custom e-commerce for a manufacturing and retail brand, with catalog, filters, coupons, payments, accounts and order tracking. It integrates an AI assistant for customer inquiries and a panel to manage operations, sales and the assistant’s knowledge.
IncludesCart & checkoutMercado PagoAdmin panel











Overview
The challenge
Links
Private — client project
System architecture
The platform is structured as a full-stack monorepo. A Next.js storefront handles presentation, an Express API owns all write operations, and a Backend-for-Frontend layer mediates between them, keeping payment credentials and administrative endpoints server-side.
Application Architecture
- Full-stack monorepo built with Next.js 15 (App Router), Express, and PostgreSQL.
- Backend-for-Frontend layer separating public storefront APIs from private administrative operations.
- End-to-end type safety through TypeScript and Prisma ORM, surfacing schema changes at compile time.
- Docker-based development and production environments for consistent behaviour across stages.
Platform Features
- Product catalog with categories, advanced filtering, reviews, and wishlists.
- Customer accounts covering authentication, order history, profile management, and password recovery via transactional email.
- Administrative dashboard for products, orders, coupons, review moderation, and sales analytics.
- Responsive mobile-first interface supporting viewports from 480px through ultra-wide desktops.
Security
Public surfaces are validated and rate-limited, with immediate credential revocation available to administrators.
- JWT + token versioning
- Google OAuth 2.0
- Role-based access control
- Helmet
- Rate limiting
- Zod validation
- reCAPTCHA
Infrastructure & deployment
The client retains full ownership of the stack and its hosting. Deployment was therefore designed for reproducibility, allowing the platform to be provisioned from a clean VPS through documented, automated steps.
Deployment
- Full stack containerized with Docker Compose, covering PostgreSQL 17, the Express backend, and the Next.js frontend.
- PM2 cluster mode provides zero-downtime reloads and automatic recovery on process failure.
- Automated VPS deployment reduces releases to a single command.
- Docker Compose
- PM2 cluster mode
- VPS
- Zero-downtime releases
Database
Data integrity is enforced at the database layer through constraints and referential rules.
- PostgreSQL schema modelled in Prisma across products, variants, categories, orders, order items, coupons, reviews, and users.
- Foreign keys and constraints enforced by the database engine.
- Migrations tracked in version control, making every schema change reviewable and reproducible.
- Seed scripts enable staging environments that mirror production structure.
Operational Security
- API keys and payment credentials remain server-side behind the BFF proxy.
- Rate limiting applied to authentication and checkout routes.
- Token versioning allows immediate revocation of all issued tokens for a given user.
Built with
Argentine e-commerce requires support for both Mercado Pago and bank transfers. Each method follows its own confirmation path, and both converge on a single order lifecycle to keep fulfillment and reconciliation consistent.
Payment Architecture
Order state is determined server-side through webhook notifications, independent of the browser session.
- Mercado Pago notifications are re-verified against the payment API before any order mutation.
- Webhook processing is idempotent, ensuring duplicate notifications resolve to a single confirmation.
- Payment preferences are created server-side, with amounts and line items computed on the backend.
Checkout Flow
- Mercado Pago Checkout Pro handles card and wallet transactions.
- Bank transfer flow supports proof-of-payment upload with administrative confirmation or rejection.
- Both methods resolve into the same order lifecycle, keeping fulfillment logic unified.
- Coupons are validated at preference creation and re-validated at confirmation to prevent expired or redeemed codes from applying.
Order Lifecycle
Orders progress through an explicit state machine with server-side transition guards.
- States: pending, paid, fulfilled, cancelled, and refunded.
- The administrative panel can trigger only the transitions permitted by the state machine.
- Line items capture product name and price at purchase time, preserving historical order accuracy through catalog changes.
Validation & Testing
- End-to-end testing in the Mercado Pago sandbox using dedicated test buyer and seller accounts.
- Coverage across approved, rejected, and pending payment outcomes.
- Final verification against live credentials prior to launch.
The engagement delivered a platform under full client ownership, deployed to infrastructure they control and free of recurring licensing.
Delivered
- Public storefront with catalog, search, filtering, cart, and checkout.
- Customer area covering accounts, order tracking, wishlists, and profile management.
- Administrative panel for products, orders, coupons, reviews, and sales analytics.
- AI assistant with an editable knowledge base, plus admin views for its conversations, captured leads, conversion and unanswered questions.
- Production deployment on client-owned infrastructure with a reproducible Docker configuration.
Handover
- Complete source ownership with no licensing or per-seat platform fees.
- Documented deployment procedure enabling future teams to provision the stack independently.
- Seed and migration scripts for staging environments matching production structure.