A full-stack e-commerce web application with a Spring Boot backend and React frontend.
- Backend: Java, Spring Boot, Spring Security, JPA/Hibernate, MySQL
- Frontend: React, Tailwind CSS, Axios
- User authentication (user/admin separation)
- Product catalog with categories and images
- Shopping cart and checkout flow
- Stripe payment integration (full payment processing)
- Order management (user and admin views)
- Admin dashboard (manage products, orders, users)
- Profile management (edit and persist user info)
app/
backend/ # Spring Boot backend
frontend/ # React frontend
- Navigate to
backenddirectory:cd backend - Create a MySQL database named
userDB. - Copy
.env.exampleto.envand fill in your MySQL login, Stripe secret key and aJWT_SECRET. This file holds secrets and is ignored by git. - Build and run the backend:
mvn spring-boot:run
- Navigate to
frontenddirectory:cd ../frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
The schema is managed by Flyway. Scripts in backend/src/main/resources/db/migration run
automatically at startup, in version order, and the app refuses to start if the tables do
not match the code.
To change the schema, add a new script with the next version number, for example
V4__add_order_notes.sql:
alter table orders add column notes varchar(500);Never edit a script that has already run; add a new one instead.
- Access the frontend at
http://localhost:5173 - Backend runs at
http://localhost:8080 - Default admin/user roles supported
This application uses Stripe for secure payment processing.
- Get your Stripe API keys from Stripe Dashboard
- Configure backend: set
STRIPE_SECRET_KEYinbackend/.env - Configure frontend: set
VITE_STRIPE_PUBLISHABLE_KEYinfrontend/.env
Both keys must come from the same Stripe account.
- Orders over Rs 3000: Stripe card payment required
- Orders Rs 3000 or less: Cash on Delivery option available
- Secure payment processing with Stripe Elements
- Product images are stored in
backend/uploads/products/ - Update CORS settings in backend if deploying to production
Developed as a personal project.