./BACK_TO_PROJECTS
Full Stack Engineering2025

Roy-Elegance Commerce Engine

My first end-to-end web deployment. A scalable e-commerce platform featuring JWT Authentication, State Management, and a fully automated CI/CD Pipeline.

System Architecture

01. Reactive Client

React.js SPA with Context API for global state management (Cart, User Session).

USER SESSION● ACTIVE
Token: JWT
Cart: [Item_01, Item_04]
API GATEWAYPROCESSING
POST /api/checkout
Status: 200 OK

02. RESTful API

Node.js/Express backend handling secure payments, inventory logic, and user authentication.

03. Persistence Layer

MongoDB Atlas for scalable product data storage, deployed via automated CI/CD pipelines.

DATABASECONNECTED
Collections: Users, Products, Orders

Secure Order Logic

Implementing secure transaction handling on the backend to prevent price tampering during the checkout process.

JavaScript
controllers/orderController.js
exports.createOrder = async (req, res) => {
    try {
        const { items } = req.body;
        
        // SECURITY: Recalculate price on server-side
        // Never trust client-side prices
        let total = 0;
        for (let item of items) {
            const product = await Product.findById(item.id);
            total += product.price * item.qty;
        }

        const order = await Order.create({
            user: req.user._id,
            orderItems: items,
            totalPrice: total,
            isPaid: false
        });

        res.status(201).json(order);
    } catch (error) {
        res.status(500).json({ message: "Order failed" });
    }
}

Development Stack

Frontend

React.jsTailwind CSSFramer Motion

Backend

Node.jsExpressMongoDB

Deployment

VercelGitHub Actions

Project Highlights

Auth
JWT Secured
100%
Responsive
CI/CD
Automated
REST
Architecture
View Live Demo