A full-stack e-commerce application built with React and Spring Boot, offering a complete online shopping experience with user authentication, product management, cart functionality, and order processing.
- Features
- Tech Stack
- Project Structure
- Getting Started
- API Endpoints
- Features in Detail
- Contributing
- License
-
User Authentication & Authorization
- User registration and login with JWT token-based authentication
- Secure password handling with Spring Security
- Protected routes for authenticated users
-
Product Management
- Browse products by categories
- Search products by name, category, or description
- View detailed product information
- Product pagination for better navigation
-
Shopping Cart
- Add/remove products to/from cart
- View cart items
- Update cart quantities
- Cart persistence for logged-in users
-
Order Management
- Single product checkout
- Multiple product checkout from cart
- Order confirmation
- View order history
-
Customer Support
- Contact form for customer queries
- Image upload support for queries
- Query submission confirmation
-
Special Features
- Discount deals section
- Department-wise product categorization
- User profile management
- Responsive design with Bootstrap
- React 18.3.1 - UI library
- React Router DOM 6.24.0 - Client-side routing
- Reactstrap 9.2.2 - React Bootstrap components
- Bootstrap 5.3.3 - CSS framework
- Axios 1.7.2 - HTTP client
- React Toastify 10.0.5 - Toast notifications
- Remix Icon 4.3.0 - Icon library
- Spring Boot 3.3.0 - Java framework
- Spring Security - Authentication and authorization
- Spring Data JPA - Data persistence
- MySQL - Database
- JWT (jsonwebtoken) 0.11.5 - Token-based authentication
- Lombok - Reduce boilerplate code
- Maven - Build tool
Dropify/
βββ Backend/
β βββ src/
β βββ main/
β β βββ java/
β β βββ com/ecommerce/dropify/
β β βββ controller/ # REST Controllers
β β βββ dto/ # Data Transfer Objects
β β βββ model/ # Entity classes
β β βββ repository/ # JPA Repositories
β β βββ service/ # Business logic
β β βββ jwt/ # JWT authentication helper
β β βββ DropifyApplication.java
β βββ pom.xml
β
βββ Frontend/
βββ public/
βββ src/
β βββ components/ # Reusable components
β βββ pages/ # Page components
β βββ services/ # API service calls
β βββ auth/ # Authentication utilities
β βββ css/ # Stylesheets
β βββ App.js
β βββ index.js
βββ package.json
- Node.js (v14 or higher)
- npm or yarn
- Java JDK 17 or higher
- MySQL database
- Maven 3.6+
-
Clone the repository
git clone https://github.com/rishabhrawat05/Dropify.git cd Dropify/Backend -
Configure MySQL database
Create a MySQL database and update the
application.propertiesfile:spring.datasource.url=jdbc:mysql://localhost:3306/dropify spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=update
-
Build and run the backend
mvn clean install mvn spring-boot:run
The backend server will start on
http://localhost:8080
-
Navigate to Frontend directory
cd ../Frontend -
Install dependencies
npm install
-
Configure API endpoint
Update the API base URL in your service files to point to your backend server.
-
Start the development server
npm start
The application will open at
http://localhost:3000
POST /api/user/register- Register a new userGET /api/user/{id}- Get user by IDGET /api/user/all- Get all usersPUT /api/user/update- Update user detailsDELETE /api/user/delete/{id}- Delete user
POST /auth/login- User login
GET /api/products- Get all productsGET /api/products/{id}- Get product by IDGET /api/products/category/{categoryName}- Get products by categoryGET /api/products/search?keyword={keyword}- Search productsPOST /api/products- Create a new productPUT /api/products/{id}- Update productDELETE /api/products/{id}- Delete productGET /api/getProductDetails/{isSingleProductCheckout}/{productId}- Get product details for checkout
GET /cart/add/{productId}- Add product to cartGET /cart/get/{id}- Get cart by IDGET /cart/get/user- Get cart for current userPUT /cart/update/{cartItemId}- Update cart itemDELETE /cart/delete/{cartItemId}- Remove cart itemDELETE /cart/delete/product/{productId}- Remove product from cart
POST /orders- Create new orderGET /orders/user/{userId}- Get user orders
POST /support/query- Submit customer query
- User registration with validation (username, email, password)
- JWT token generation on successful login
- Token stored in localStorage
- Protected routes using PrivateRoute component
- Token-based API authentication
- Home Page: Featured products and categories
- Departments: Browse products by department
- Product Dashboard: Detailed product view with images and specifications
- Search: Find products by name, category, or description
- Discount Deals: Special offers and discounts
- Add products to cart (requires login)
- View and manage cart items
- Single product checkout or cart checkout
- Order confirmation page
- View and edit profile information
- View order history
- Manage cart items
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Rishabh Rawat
- GitHub: @rishabhrawat05
- React documentation and community
- Spring Boot documentation
- Bootstrap team for the UI framework
- All contributors and supporters
β If you found this project helpful, please give it a star!