Gelana Stationary & Repair
A decoupled full-stack e-commerce storefront and device-repair booking portal built with React 19, Express 5, and raw parameterized PostgreSQL (pg), featuring atomic checkout stock deduction, role-based administration, and trilingual (en/am/om) localization.
Full-Stack Engineer & Database Architect
296 Commits (Decoupled SPA + Express API)
React 19 / Express 5 / PostgreSQL (pg) / Zod / Cloudinary
pg_trgm GIN Search / Trilingual (EN · AM · OM) / Transactional Checkout

Disconnected Storefronts, Overselling Risk, and Unlocalized Commerce
Local stationary and computer repair shops often track product sales, customer orders, and device repair intake across disconnected spreadsheets, leading to ephemeral carts, price/stock drift, and language barriers for regional customers.
Client-only carts lose state across devices, and non-transactional checkouts risk overselling inventory or leaving partial writes on failure.
Hard-deleting discontinued products or updating catalog prices directly distorts past order line items and breaks foreign-key references.
Serving shoppers and repair clients across English, Amharic, and Afaan Oromo requires synchronized UI dictionaries and relational catalog fallbacks.
Decoupled React 19 SPA with 3-Layer Express 5 Modular Monolith
Engineered as a Vite 8 + React 19 client communicating via REST/JSON with a 3-layer Express 5 monolith (Routes -> Controllers -> Services) over raw parameterized PostgreSQL (pg.Pool), startup-enforced SQL migrations, and Cloudinary media storage.
Feature-sliced SPA with React Router v7 nested layouts, Radix UI primitives, Recharts revenue charts, and URL-synced catalog filters.
HttpOnly JWT cookie authentication, RBAC guards (CUSTOMER / ADMIN), auth rate limiting, and Zod schema validation.
Raw parameterized SQL leveraging pg_trgm GIN search indexes, json_agg order queries, BEFORE UPDATE triggers, and schema_migrations.
Propagates client locale (en/am/om) to SQL COALESCE translation joins and serves responsive Cloudinary image transforms.
Key Challenges & Trade-offs
Atomic Checkout & Immutable Order Snapshots
Checkout touches carts, cart_items, products, orders, and order_items—requiring server-authoritative pricing and stock verification without partial writes.
Wrapped userCheckout in an explicit BEGIN/COMMIT/ROLLBACK transaction via pool.connect(), verifying stock, computing totals server-side, snapshotting price_at_purchase, and soft-deleting products via is_active = false.
Trilingual (EN / AM / OM) UI & SQL Fallback Queries
Localizing static UI controls alongside database products and categories across three languages typically duplicates API routes or breaks when translations are missing.
Built LanguageContext (en/am/om) paired with an Axios X-Locale header interceptor so product and category SQL queries resolve COALESCE(pt.name, p.name) seamlessly.
Cross-Domain Cookies & Ephemeral PaaS Disk Uploads
Split-origin deployment across Vercel and Render blocks Lax cookies, while PaaS redeploys wipe local Multer upload directories.
Configured environment-driven Secure/SameSite cookies with trailing-slash CORS normalization, and migrated product media to Cloudinary with backfill scripts and responsive URL transforms.
Unified E-Commerce, Repair Intake, and Admin Operations
Deployed live on Vercel with an Express 5 and PostgreSQL backend supporting full storefront commerce, purchase-verified reviews, stateful repair ticket tracking, and trilingual catalog browsing.