E-commerceFull-Stack DevelopmentPayment IntegrationAdmin Dashboard

React E-commerce Platform

A complete dual-interface shopping engine with secure payments and real-time inventory management.

Expand
Project Media
1 / 9

Technologies

React
Typescript
Node.js
Express
MongoDB
Cloudflare R2
SSLCommerz
Stripe

Type

Personal Project

Role

Solo Design & Development

Year

2024

Overview

I built this project as a comprehensive full-stack solution comprising three distinct parts: a consumer-facing e-commerce storefront, a dedicated admin dashboard for business operations, and a robust backend server to orchestrate data and security. The goal was to simulate a real-world production environment where the shopping experience is completely decoupled from inventory management.

It replaces simple "CRUD" concepts with a professional architecture that handles the entire lifecycle of an order: from product discovery and cart management to secure checkout and fulfillment.

Key Features

  • Dual-Interface Architecture

    Developed two distinct applications: a customer-facing React storefront for shopping and a protected admin dashboard for management, ensuring that business logic is isolated from the public interface.

  • Secure Payment Integration

    Implemented SSLCommerz and Stripe gateways to handle real-time payment processing, supporting both card and mobile banking transactions.

  • Real-Time Order Tracking

    Created a centralized order management system where admins can view payment status and update delivery progress, with changes reflected instantly for the customer.

  • Dynamic Inventory Control

    Built a dashboard allowing admins to create, update, and categorize products and manage homepage sliders without touching the code.

  • Customer Account Portal

    Designed a personal area for users to manage saved addresses, view order history, and update profile designs.

Challenges

  • Verifying Payment Integrity

    Relying solely on frontend success messages is insecure, as users can manipulate browser redirects. I needed a way to guarantee that a "Paid" status in the database meant money was actually received.

  • Managing Role-Based Access

    Since the backend serves both the public store and the private dashboard, I had to ensure that an authenticated customer could never access sensitive admin endpoints.

  • Optimizing Real-Time Search Performance

    Filtering products by price, category, and brand in real-time can overwhelm the server with api calls if every keystroke or slider movement triggers a request.

  • Scalable Media Management

    Storing high-resolution product images directly on the server file system interacts poorly with scaling and slows down deployment.

Solutions

  • Server-Side IPN Validation

    I implemented a robust verification flow using Instant Payment Notification (IPN). Instead of trusting the client, the server listens for a direct callback from the payment gateway to validate the transaction ID. The order status is updated to confirmed only after this server-to-server check passes, eliminating fraud risk.

  • Middleware-Driven Authorization

    I structured the API security using custom Express middleware. I separated authentication (verifying who you are via JWT) from authorization (verifying what you can do). Admin routes are protected by a specific check that inspects the user's role claim in the token, blocking any unauthorized attempts with a 403 error before they reach the controller logic.

  • Debounced State Management

    I implemented a custom debounce hook for the search and filter inputs. This limits the rate of API execution, ensuring that the application only requests new data after the user has stopped adjusting the filters for a specific timeframe (e.g., 400ms), resulting in a smoother, lag-free UI.

  • Cloud Storage Integration

    Instead of local storage, I integrated the backend with Cloudflare R2 using the S3-compatible SDK. When an admin uploads a product image, it is streamed directly to a cloud bucket, returning a secure URL for the database. This keeps the server lightweight and allows the application assets to scale infinitely without impacting build size.