
ElectroStore - E-Commerce Platform (Next.js, MongoDB, Firebase)
Electronics e-commerce store with product catalog, cart, and Firebase-backed auth on a Next.js + Express stack.
Problem
E-commerce is a solved problem with a thousand unsolved details: a catalog that's pleasant to browse, a cart that survives refreshes, auth that doesn't leak sessions, and an admin surface for inventory — all coordinated across a frontend and an API that deploy independently. ElectroStore is a full electronics storefront built to get those details right end to end, from product grid to order history, and shipped live: the storefront runs at electronics-store-client.netlify.app.
Architecture
The Next.js storefront (catalog, search and filtering, cart, checkout flow, order history) is deployed on Netlify and talks to an Express REST API over MongoDB for products, carts, and orders. Identity is delegated to Firebase Auth: the client signs in against Firebase, and the API verifies the resulting tokens — neither side ever stores a password.
Tech decisions & trade-offs
Why separate client and server repos
The storefront and the API have different release rhythms: UI tweaks ship daily and cost nothing on Netlify's CDN, while API changes touch data and deserve more care. Splitting electronics-store-client and electronics-store-server means each deploys independently with its own pipeline — a copy change can't take down checkout. The cost is coordination: API contract changes need versioning discipline that a monorepo would have papered over.
Why MongoDB for the catalog
Electronics are the classic schema-flexibility case: a GPU has clock speeds and VRAM, a keyboard has switch types — forcing both into one relational product table means either a sea of nullable columns or an EAV pattern nobody enjoys. Document storage lets each product carry its own attribute shape while staying queryable for filtering. The trade-off is weaker cross-document guarantees, which matter for orders — those are written defensively as single documents capturing a snapshot of price and quantity at purchase time.
Why Firebase Auth instead of rolling sessions
Auth is the highest-stakes, lowest-differentiation part of a store. Firebase gives battle-tested signup/login flows, token refresh, and password-reset email plumbing for free, and the Express API only needs to verify ID tokens — no credential storage, no session table, no bcrypt tuning. The trade-off is a third-party dependency in the critical path and vendor lock-in on identity; for a store whose differentiation is the shopping experience, that's the right trade.