Rogelio Emmanuel Ceja
← All projects

Undefeated Stars

An online store for trading card games and collectibles in Mexico, built from the catalog all the way to the payment.

In development
  • JavaScript
  • Node.js
  • Express
  • PostgreSQL
  • Supabase
  • Mercado Pago

Undefeated Stars is an online store for people who collect cards and figures in Mexico. It has a “liquid glass” look: see-through surfaces, soft blur and thin borders that catch the light. The first phase is a complete store: you browse the catalog, fill a cart, pay, keep an account and earn points toward discounts, while the owners manage everything from a simple admin panel.

The store never takes the browser's word for it: prices, totals, discounts and stock are always recalculated on the server, and only a verified Mercado Pago notice can mark an order as paid.

At a glance

  • 17pages: catalog, product, cart, checkout, account, admin…
  • 24tables in the database schema
  • 19automated test files
  • 3payment methods planned: card, OXXO and SPEI

Behind the project

What it covers
  • Storefront Catalog, product pages, a cart and checkout, all sharing the same header, footer and product card.
  • Accounts Sign up, log in and recover your password with Supabase Auth, plus a profile and saved addresses.
  • Payments The server sets up the Mercado Pago payment using the prices and stock in the database, never the ones the browser sends. When Mercado Pago confirms with a signed notice, the server double-checks it with them and only then turns the reserved stock into a sale.
  • Inventory Stock is held while a payment is pending, and every movement is recorded.
  • Admin panel The owners manage products and orders here, and a log shows what each admin changed.
Technical Development

The frontend is plain HTML, CSS and JavaScript, with no frameworks or bundlers: I wanted to learn the fundamentals before reaching for tools. Every design value lives in one tokens file, so changing the brand means editing one place.

The backend is Node.js with Express, and PostgreSQL runs on Supabase. Only Express talks to the database, with parameterized queries, so the browser never reads a table directly. Row Level Security is on for every table.

A Cloudflare Worker serves the static site and forwards /api requests to Express. That way the browser sees a single origin and session cookies stay first-party.

Tests run on Node's built-in test runner and cover checkout, the Mercado Pago webhook, login, the cart and the proxy.

Rules it is built on
  • Never trust the client Whatever price, total, discount or stock the browser sends is ignored; the server works them out again.
  • Cost stays private Public endpoints name their columns one by one, so what a piece cost the store never leaves the server.
  • All or nothing Creating an order, handling a payment notice or issuing a refund happens inside a database transaction: it either fully works or changes nothing.
Project Status

It's still in development, and only phase one. The store isn't public yet, and I haven't tested the payment flow from start to finish: so far the webhook has only been simulated on my machine. Digital packs and an in-app economy are designed, but I'm deliberately leaving them for later. The source code is private.