Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Textile E-Commerce Platform

A full-stack e-commerce application for textile businesses, built with Spring Boot and React.js.

Features

Customer Features

  • User Authentication: JWT-based login and registration
  • Product Catalog: Browse fabrics and garments with filtering and search
  • Product Details: View detailed product information with images, variants (size/color), and care instructions
  • Shopping Cart: Add/remove items, update quantities
  • Checkout Process: Multi-step checkout with address form and payment options
  • Payment Integration: Razorpay integration for online payments + Cash on Delivery option
  • Order Management: View order history and track orders
  • Responsive Design: Mobile-friendly UI using Material-UI

Admin Features (Backend Ready)

  • Product management (CRUD operations)
  • Category management
  • Order management
  • User management

Technology Stack

Backend

  • Framework: Spring Boot 3.2.0
  • Language: Java 17
  • Database: MySQL 8.x
  • ORM: Spring Data JPA (Hibernate)
  • Security: Spring Security with JWT
  • Payment Gateway: Razorpay
  • Build Tool: Maven

Frontend

  • Framework: React.js 18
  • UI Library: Material-UI (MUI) v5
  • State Management: Redux Toolkit
  • HTTP Client: Axios
  • Routing: React Router v6
  • Notifications: React Toastify

Project Structure

textile-ecommerce/
├── textile-backend/          # Spring Boot Application
│   ├── src/main/java/
│   │   └── com/textile/ecommerce/
│   │       ├── config/       # Security & Web Config
│   │       ├── controller/   # REST API Controllers
│   │       ├── dto/          # Request/Response DTOs
│   │       ├── entity/       # JPA Entities
│   │       ├── repository/   # Spring Data Repositories
│   │       ├── security/     # JWT & Security
│   │       └── service/      # Business Logic
│   └── src/main/resources/
│       └── application.properties
│
└── textile-frontend/         # React Application
    ├── public/
    └── src/
        ├── components/       # Reusable Components
        ├── pages/           # Page Components
        ├── redux/           # Redux Store & Slices
        └── services/        # API Services

Database Schema

The application includes the following entities:

  • Users: Customer and Admin accounts
  • Categories: Product categories with parent-child relationships
  • Products: Product information with pricing
  • Product Variants: Size and color variants
  • Product Images: Multiple images per product
  • Addresses: User shipping addresses
  • Cart & Cart Items: Shopping cart functionality
  • Orders & Order Items: Order management
  • Payments: Payment tracking (Razorpay)
  • Reviews: Product reviews and ratings
  • Wishlist: User wishlist items

Getting Started

Prerequisites

  • Java 17 or higher
  • Node.js 16 or higher
  • MySQL 8.x
  • Maven

Backend Setup

  1. Configure Database: Update textile-backend/src/main/resources/application.properties:

    spring.datasource.url=jdbc:mysql://localhost:3306/textile_ecommerce
    spring.datasource.username=your_username
    spring.datasource.password=your_password
  2. Configure Razorpay (Optional for payment):

    razorpay.key.id=your_razorpay_key_id
    razorpay.key.secret=your_razorpay_key_secret
  3. Run the Application:

    cd textile-backend
    mvn spring-boot:run

The backend will start on http://localhost:8080

Frontend Setup

  1. Install Dependencies:

    cd textile-frontend
    npm install
  2. Start the Development Server:

    npm start

The frontend will start on http://localhost:3000

API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login

Products

  • GET /api/products - List all products (paginated)
  • GET /api/products/{id} - Get product details
  • GET /api/products/search?keyword={keyword} - Search products
  • GET /api/products/category/{categoryId} - Get products by category

Categories

  • GET /api/categories - List all categories
  • GET /api/categories/tree - Get category tree

Orders

  • GET /api/orders - Get user orders
  • GET /api/orders/{id} - Get order details
  • POST /api/orders - Create order

Payments

  • POST /api/payments/create-order - Create Razorpay order
  • POST /api/payments/verify - Verify payment

Future Enhancements

  • Admin dashboard UI
  • Email notifications
  • Inventory management
  • Product reviews and ratings UI
  • Wishlist functionality
  • Order tracking with status updates
  • Multi-language support
  • Advanced search with filters

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages