A full-stack e-commerce application for textile businesses, built with Spring Boot and React.js.
- 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
- Product management (CRUD operations)
- Category management
- Order management
- User management
- 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
- Framework: React.js 18
- UI Library: Material-UI (MUI) v5
- State Management: Redux Toolkit
- HTTP Client: Axios
- Routing: React Router v6
- Notifications: React Toastify
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
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
- Java 17 or higher
- Node.js 16 or higher
- MySQL 8.x
- Maven
-
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
-
Configure Razorpay (Optional for payment):
razorpay.key.id=your_razorpay_key_id razorpay.key.secret=your_razorpay_key_secret
-
Run the Application:
cd textile-backend mvn spring-boot:run
The backend will start on http://localhost:8080
-
Install Dependencies:
cd textile-frontend npm install -
Start the Development Server:
npm start
The frontend will start on http://localhost:3000
POST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/products- List all products (paginated)GET /api/products/{id}- Get product detailsGET /api/products/search?keyword={keyword}- Search productsGET /api/products/category/{categoryId}- Get products by category
GET /api/categories- List all categoriesGET /api/categories/tree- Get category tree
GET /api/orders- Get user ordersGET /api/orders/{id}- Get order detailsPOST /api/orders- Create order
POST /api/payments/create-order- Create Razorpay orderPOST /api/payments/verify- Verify payment
- 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
This project is licensed under the MIT License.