Full-stack e-commerce project (React + Spring Boot + PostgreSQL).
- Java 17+
- Node.js 18+
- npm 9+
- PostgreSQL 14+
Create a .env file in the root by copying .env.example:
cp .env.example .envMinimum required variables:
DB_URLDB_USERNAMEDB_PASSWORDAPP_JWT_SECRETAPP_ADMIN_PASSWORDREACT_APP_API_BASE_URL(http://localhost:8080)
cd backend
export $(grep -v '^#' ../.env | xargs)
./mvnw spring-boot:runBackend: http://localhost:8080
In a new terminal:
cd frontend
npm install
npm startFrontend: http://localhost:3000
This project includes:
- JWT authentication (
access token) andHttpOnly refresh cookie USERandADMINrole-based access- Product, cart, order, and user modules
- Admin panel (
/admin) - Real-time order status updates (
WebSocket/STOMP) - Flyway migrations for database schema management
- Swagger/OpenAPI (
/swagger-ui/index.html) - Automated tests for frontend and backend
- Frontend: React, React Router, Axios, TailwindCSS
- Backend: Spring Boot 3, Spring Security, Spring Data JPA, Flyway, WebSocket, JWT
- Database: PostgreSQL
- Auth:
/api/auth/* - Products:
/api/products/* - Cart:
/api/cart/* - Orders:
/api/orders/*, admin endpoint/api/orders/admin - Users:
/api/users/* - WebSocket endpoints:
/ws(SockJS),/ws-simple
Backend:
cd backend
./mvnw testFrontend:
cd frontend
npm test -- --watchAll=falsebackend/- Spring Boot REST APIfrontend/- React app.env.example- environment template
You can view the live project at:
https://codveda.diyorjon.com
- Frontend is deployed on
Netlify. - Backend is deployed on your own server.
Nginxis used as a reverse proxy for the backend service.- Production domain:
https://codveda.diyorjon.com