SellBytes
A connected storefront from product discovery to order management.
SellBytes is an e-commerce platform that connects product discovery, ordering, inventory, and payment workflows into one digital storefront: a server-rendered Astro app on a single PostgreSQL database, with an admin back office.
Status: Runs locally on PostgreSQL with seeded sample data. Payments run through a built-in test gateway; a Stripe adapter is written but not yet verified.

01 / 07Storefront
Problem & solution
- Problem
- An online store has to connect product browsing, carts, checkout, payment, stock levels and fulfilment. When these live in separate tools, stock gets oversold and orders can be marked paid before a payment is confirmed.
- Solution
- One Astro application on one PostgreSQL database. Checkout runs in a single transaction that re-prices the cart and reserves stock, and an order is only marked paid when a signed, idempotent payment event confirms it. Admins manage orders, products and inventory from the same system.
Technologies
8 technologies7 implemented1 partial
- AstroServer-rendered storefront and adminImplemented
- TypeScriptStrict modeImplemented
- PostgreSQLRaw SQL via node-postgresImplemented
- REST APICatalog, cart, orders, paymentsImplemented
- Node.jsServer runtime, crypto, pg driverImplemented
- Payments APITest gateway works end to end; Stripe adapter unverifiedPartial
- ZodShared validationImplemented
- Tailwind CSSImplemented
Architecture
System architecture
Astro
Storefront · account · admin
Product / Order System
Services · REST API
PostgreSQL
Catalog · carts · orders
Payments APIPartial
Test gateway · Stripe adapter
Commerce flow
Product Discovery
Catalog · search · filters
Product Database
Products · variants · stock
Cart / Order
Transactional checkout
PaymentPartial
Test gateway · Stripe unverified
Order Management
Admin back office
Engineering notes
No overselling
Checkout locks inventory rows, re-prices every line from the database and decrements stock in a single transaction.
Paid means verified
Only a signed, idempotent payment event can move an order from pending to processing. Replays and amount mismatches are rejected.
Search that forgives typos
PostgreSQL full-text search over weighted fields, combined with trigram similarity for misspellings.
History that stays put
Orders snapshot the customer, address and line items at checkout, so later edits never rewrite past orders.
Key technical concepts
- Transactional checkout
- Row-level locking
- Payment provider abstraction
- Signed webhooks (HMAC)
- Idempotent event handling
- Order state machine
- Full-text + trigram search
- Session authentication
Scope
Built07 items
- Catalog with category tree, filters, facets and search
- Product pages with variants and reviews
- Database-backed cart with discount codes
- Transactional checkout that reserves stock
- Test-mode payment flow, end to end
- Customer accounts and order tracking
- Admin dashboard, orders, products and inventory
Planned04 items
- Verified Stripe integration
- Refunds through the payment provider
- Email notifications
- Automated tests and deployment





