Skip to content

samreen-sk/CartifyX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CartifyX - Full Stack Fashion E-Commerce Platform

Java Spring Boot MySQL


Overview

Zara is a full-stack fashion e-commerce platform inspired by modern online clothing stores. The backend is built using Spring Boot and MySQL with JWT-based authentication and secure REST APIs.

The project focuses on learning real-world backend architecture including authentication, layered architecture, API development, database integration, and Spring Security.


Features Implemented

User Management

  • User Registration
  • Secure Login
  • BCrypt Password Encryption
  • JWT Authentication
  • Protected APIs

Product Management

  • Create Products
  • View Products
  • Product APIs

Order Management

  • Create Orders
  • View Orders
  • Order APIs

Backend Architecture

  • Layered Architecture
  • Controller Layer
  • Service Layer
  • Repository Layer
  • DTO Layer
  • Global Exception Handling

System Architecture

Client (Postman / Frontend)
          │
          ▼
Spring Boot REST APIs
          │
          ▼
Controller Layer
          │
          ▼
Service Layer
          │
          ▼
Repository Layer
          │
          ▼
JPA / Hibernate
          │
          ▼
MySQL Database

Backend Stack

Technology Purpose
Java 17 Programming Language
Spring Boot Backend Framework
Spring Security Authentication & Authorization
Spring Data JPA Database Access
Hibernate ORM
MySQL Database
JWT Authentication
BCrypt Password Encryption
Maven Dependency Management

Security Features

  • JWT Token Authentication
  • BCrypt Password Hashing
  • Protected APIs
  • Spring Security Integration
  • Token Validation
  • Secure Login System

Project Structure

zara/
│
├── controller/
│   ├── UserController
│   ├── ProductController
│   └── OrderController
│
├── service/
│   ├── UserService
│   ├── ProductService
│   └── OrderService
│
├── repository/
│   ├── UserRepository
│   ├── ProductRepository
│   └── OrderRepository
│
├── model/
│   ├── User
│   ├── Product
│   └── Orders
│
├── dto/
│   ├── LoginRequestDTO
│   └── UserResponseDTO
│
├── security/
│   ├── JwtUtil
│   ├── JwtFilter
│   └── SecurityConfig
│
├── exception/
│   ├── ResourceNotFoundException
│   └── GlobalExceptionHandler
│
└── ZaraApplication

Authentication Flow

User Login
    ↓
Password Verification using BCrypt
    ↓
JWT Token Generation
    ↓
Token Returned to Client
    ↓
Client Sends Token in Authorization Header
    ↓
JWT Filter Validates Token
    ↓
Protected APIs Accessible

Database Design

Users

  • id
  • name
  • email
  • password
  • address

Products

  • id
  • name
  • price
  • category
  • description
  • stock

Orders

  • id
  • userId
  • totalAmount
  • orderDate

API Endpoints

Authentication APIs

Method Endpoint Description
POST /api/users/register Register User
POST /api/users/login Login User

User APIs

Method Endpoint Description
GET /api/users Get Users

Product APIs

Method Endpoint Description
GET /api/products Get Products
POST /api/products Add Product

Order APIs

Method Endpoint Description
GET /api/orders Get Orders
POST /api/orders Create Order

Learning Outcomes

This project helped in learning:

  • Spring Boot Backend Development
  • REST API Development
  • MySQL Integration
  • Spring Security
  • JWT Authentication
  • BCrypt Password Encryption
  • Layered Architecture
  • DTO Design Pattern
  • Global Exception Handling
  • Repository-Service-Controller Flow

Future Implementations

Frontend Development

  • React Frontend
  • Product Listing UI
  • Cart System
  • Checkout Page
  • Authentication UI

Advanced Features

  • Wishlist
  • Search & Filters
  • Payment Integration
  • Admin Dashboard
  • Order Tracking

Backend Improvements

  • Role-Based Authorization
  • Validation Annotations
  • Entity Relationships
  • Refresh Tokens
  • Pagination & Sorting

Deployment & Scalability

  • Docker
  • Kubernetes
  • Redis Caching
  • AWS Deployment
  • CI/CD Pipeline
  • Microservices Architecture

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages