SkyCrew platform architecture
A modular NestJS API, a Next.js storefront built for mobile traffic, and a schema that keeps an order true after the catalogue changes.
SkyCrew is my own aviation accessories brand, live and taking orders. This is how the platform is put together.
Components
Two admin clients on purpose. Orders in a small business get confirmed from a phone in the evening, and an admin panel that only works on a laptop is one that does not get used.
Modular by feature
The API is one module per domain area: auth, users, products, categories, collections, media, orders, coupons, reviews, shipping, homepage, settings, notifications, admin. Each holds its controller, service, DTOs and Prisma access.
This is heavier than a store this size strictly requires, and I chose it knowing that. The roadmap includes product variants, pre-orders and partial payments, and those are far cheaper to add to a modular system than to retrofit into a flat one. Choosing structure early is a bet on the product growing. Choosing it late is a rewrite.
The schema decisions that matter
Prices are copied onto order items. An order is a record of an event. Rendering an old invoice by joining to the current product row means invoices change when prices do.
Products are archived, never deleted. Once a product appears on an order, deleting it either breaks history or leaves a dangling reference. Archived hides it from the storefront and keeps it valid everywhere it is referenced.
Categories and collections are separate tables with different cardinality. One category per product, many collections per product. Merging them produces either duplicated products or an unnavigable tree.
Money is stored in integer minor units with a currency. Never floats. A total column
with no currency beside it is a bug waiting for a second market.
Everything configurable is in the database
Categories, collections, homepage sections, shipping charges, the free shipping threshold, coupons and site settings are rows, not constants. The acceptance test I held myself to was that creating a collection, assigning products and having it appear on the homepage requires no code change and no redeploy.
An admin panel that needs an engineer for a routine change is a bottleneck with my name on it.
Built for the traffic it actually gets
Nearly all traffic arrives from Facebook, on a phone, mid scroll. That drives concrete choices: the product page is the landing page and is rendered on the server, images go through a CDN and are served at display size, and the checkout path is short because every step is a place to lose someone who was not really shopping five seconds ago.
Security baseline
JWT with refresh tokens, Argon2 password hashing, role guards separating customer, admin and super admin, validation on every DTO, rate limiting on auth routes, and Prisma parameterising queries. None of this is novel. All of it is the difference between a small store and a small store with an incident.
Trade-offs
NestJS over something lighter. More ceremony now for cheaper change later. Worth it because I intend to keep extending this.
A separate admin mobile app. More surface to maintain than a responsive web panel. It gets used, which the responsive panel did not.
Login required at checkout. Costs conversion, buys traceable orders in a market where delivery depends on reaching the customer.