MT Glory — Premium Shop
A production-grade e-commerce platform selling premium laptops, electronics, and tech accessories — live at shop.mtglory.com. Built with a performance-first approach: CDN, message queues, dual-layer caching, and real-time error monitoring — all running in production.
Tech Stack
Frontend
Backend
Performance
Monitoring
What It Does
MT Glory is a real, live e-commerce business selling premium tech products. The platform handles full shopping flows — from browsing products to checkout and order management.
Shop (shop.mtglory.com)
Full customer-facing e-commerce store. Browse products, view deals, add to cart, check out, and track orders. Includes flash deals and "What's New" sections.
Main Site (mtglory.com)
Company landing page covering the full MT Glory brand — services, software products, contact info, and links to the shop.
User Accounts
Authentication system for customers. Registered users can manage their profile, view order history, and access personalized deals.
Image Upload Pipeline
Product images are uploaded asynchronously using a message queue. This keeps the API fast — the upload job runs in the background without blocking the response.
Performance Engineering
Speed was a priority from day one. Multiple techniques work together to keep response times low and the experience smooth for every user.
Content Delivery Network (CDN)
- Product images are served from a CDN edge node near the user
- No image request ever hits the origin server directly
- Reduces image load time drastically for users across different regions
Dual-Layer Caching
- Server-side cache: API responses for product lists and catalog are cached on the backend
- Client-side cache: Next.js ISR / SSG caches pages at the edge
- Repeated requests are served instantly — no database round trip needed
Response Compression
- Express middleware compresses all API responses using gzip
- Smaller payloads = faster network transfer
- Significant impact on low-bandwidth connections (mobile networks)
Message Queue for Image Uploads
- Admin uploads a product image → API immediately returns success
- Upload job is placed in a message queue
- A background worker processes the image and pushes it to CDN
- API stays fast — the heavy work happens off the request cycle
Monitoring & Security Logging
Production systems need visibility. MT Glory uses two complementary tools to catch errors before users report them.
Sentry
Frontend and backend error tracking. Every crash, unhandled exception, and slow transaction is captured with full stack traces and context.
Error MonitoringRollbar
Real-time error feed and alerting. Rollbar aggregates security-relevant logs and notifies the team when something unusual happens in production.
Security LoggingReal-Time Alerts
Both tools are wired to send instant alerts on critical failures — no waiting to find out something broke. Issues are caught and fixed fast.
Instant AlertsKey Engineering Decisions
Why Next.js for Both Sites?
Next.js gives server-side rendering for SEO, static generation for speed, and API routes for flexibility — all in one framework. Perfect for an e-commerce site that needs to rank on search engines.
Async Image Upload via Queue
Uploading images synchronously inside a request would time out or slow things down. Using a message queue decouples the API from the upload job — the API stays fast no matter how large the image is.
CDN for All Media
Images are the heaviest assets on an e-commerce site. Routing them through a CDN means users get them from the closest edge node — no cross-continent round trips.
Two Caching Layers
Server cache stops the database from being hit on every request for the same data. Client cache stops the server from being hit on every page load. Together, they handle traffic spikes without breaking a sweat.
Sentry + Rollbar Together
Sentry gives rich error context with stack traces and user sessions. Rollbar handles aggregation and security audit trails. Using both gives broader coverage than either alone.
PostgreSQL as the Source of Truth
Products, orders, and users all live in PostgreSQL. It gives strong ACID guarantees — critical for an order and payment system where data consistency is non-negotiable.
Want to see it live?
MT Glory is a real, running store. Go browse the products or get in touch to discuss how I built it.