Skip to content

fiercfly/HomeElectrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HomeElectrics

HomeElectrics is a full-stack e-commerce platform built using the MERN stack, designed with secure authentication, optimized REST APIs, and payment processing via Stripe.

The system supports product browsing, cart management, order placement, and payment validation with a focus on backend correctness and performance.


🚀 Core Features

  • Secure JWT-based authentication system
  • Role-based access (Admin / User)
  • Product catalog management (50+ products supported)
  • Persistent cart architecture
  • Stripe payment integration for end-to-end transaction validation
  • Optimized REST API layer with reduced response latency (~74ms improvement)
  • Responsive UI with Tailwind CSS
  • Production-ready deployment

🏗 Architecture Overview

Frontend

  • React.js
  • Tailwind CSS
  • Axios for API communication
  • Client-side routing with React Router

Backend

  • Node.js
  • Express.js
  • RESTful API design
  • JWT Authentication
  • Middleware-based request validation

Database

  • MongoDB
  • Mongoose ODM
  • Indexed collections for optimized query performance

🔐 Authentication Flow

  1. User registers / logs in
  2. Server validates credentials
  3. JWT token generated and returned
  4. Token stored client-side
  5. Protected routes validated using middleware

This ensures stateless and secure session handling.


💳 Payment Integration

  • Integrated Stripe API for secure checkout
  • Validated 50+ test transactions
  • Server-side order verification before payment confirmation
  • Protected webhook-based validation to prevent spoofed transactions

⚡ Backend Optimizations

  • Reduced product load latency by over 1 second via API response tuning
  • Improved transaction processing time by ~74ms
  • Implemented modular route structure for scalability
  • Separated business logic from controllers for maintainability

🛠 Tech Stack

Frontend

  • React.js
  • Tailwind CSS
  • JavaScript (ES6+)

Backend

  • Node.js
  • Express.js
  • JWT
  • REST APIs

Database

  • MongoDB
  • Mongoose

Payment

  • Stripe API

🌐 Live Demo

Live: https://home-electrics.vercel.app
GitHub: https://github.com/fiercfly/HomeElectrics


📦 Installation

Clone Repository

git clone https://github.com/fiercfly/HomeElectrics

Frontend:
npm install
npm run dev

Backend:
npm install
npm start

About

HomeElectrics is a full-stack e-commerce platform built using the MERN stack, designed with secure authentication, optimized REST APIs, and payment processing via Stripe. The system supports product browsing, cart management, order placement, and payment validation with a focus on backend correctness and performance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors