Welcome to the Full Stack E-commerce project! This is a full-featured web application for product search and product details with a backend API in Spring Boot and a frontend built using React. The project allows users to search for products, view detailed information about each product, and enjoy a seamless, responsive shopping experience.
- Product Search: Allows users to search for products by name or brand.
- Product Details: Clicking a product displays detailed information.
- Responsive UI: Optimized for desktop, tablet, and mobile.
- Interactive API Documentation: Powered by Swagger UI.
- Error Handling: Friendly error messages displayed on failures.
- Spring Boot (REST API)
- H2 (Database)
- JPA/Hibernate (ORM)
- Swagger/OpenAPI (API Documentation)
- Flyway (Database Migrations)
- Security (OAuth2, Authentication)
- ReactJS
- Axios for API requests
- React Router for page navigation
- TailwindCSS for styling
- Toast Notifications for error handling
📦 Full-Stack-Ecommerce-Project
├── 📁 client (React frontend)
│ ├── 📁 src
│ │ ├── 📄 App.js
│ │ ├── 📄 index.js
│ │ ├── 📁 components
│ │ ├── 📁 pages
│ │ └── 📁 styles
│ ├── 📄 package.json
│ └── 📄 tailwind.config.js
├── 📁 server (Spring Boot backend)
│ ├── 📁 src
│ │ ├── 📁 main
│ │ │ ├── 📁 java
│ │ │ │ ├── 📁 com
│ │ │ │ │ ├── 📁 ecommerce
│ │ │ │ │ │ ├── 📄 ProductController.java
│ │ │ │ │ │ ├── 📄 ProductService.java
│ │ │ │ │ │ └── 📄 EcommerceApplication.java
│ │ │ ├── 📁 resources
│ │ │ │ ├── 📄 application.properties
│ │ │ │ └── 📄 data.sql
│ ├── 📄 pom.xml
└── 📄 README.mdgit clone https://github.com/your-username/full-stack-ecommerce-project.git
cd full-stack-ecommerce-project- JDK 17+
- Maven
This will start the backend on http://localhost:8080.
Once the backend is running, you can access the interactive Swagger UI for API documentation at:
http://localhost:8080/swagger-ui.html
- Node.js (v16 or higher)
- Navigate to the
clientdirectory. - Install dependencies:
cd client
npm install- Run the React development server:
npm startThis will start the frontend on http://localhost:3000.
-
GET /products- Returns a list of all products.- Query Params:
search(string)
- Query Params:
-
GET /products/{id}- Returns details of a specific product.- Path Params:
id(Product ID)
- Path Params:
GET http://localhost:8080/products?search=phoneAccess full API documentation at:
- Swagger UI: http://localhost:8080/swagger-ui.html
- Friendly error messages are displayed in case of API failures (e.g., no products found, invalid product ID).
The project is built to work across all devices:
- Mobile: User-friendly search and product display.
- Tablet: Optimized grid layout.
- Desktop: Clean, spacious design with product cards.
- Product Search: Returns partial matches for product name/brand.
- Product Details: Clicking a product navigates to a details page with full information.
- Pre-loaded Products: At least 20 products pre-loaded for testing.
- API Error Handling: Friendly error messages for failed requests.
- Responsive UI: Fully responsive across mobile, tablet, and desktop.
- API Documentation: Accessible Swagger UI for easy API testing.
- Clean Code & Structure: Well-organized code and modular components.
We welcome contributions! If you'd like to help make this project better, feel free to fork the repo, make changes, and create a pull request.
Make this repo as Your Star to save it ...
- React: A JavaScript library for building user interfaces.
- Spring Boot: A Java framework for building backend applications.
- TailwindCSS: A utility-first CSS framework for fast UI development.
- Swagger/OpenAPI: Documentation tool for RESTful APIs.
Feel free to reach out via:
- GitHub Issues
- Email: [harshitvarshneyv2@gmail.com]
Enjoy building your Full Stack E-commerce project!