A modern web application for an online book store with React frontend and Spring Boot backend.
- React with TypeScript
- React Router for navigation
- Material-UI for components
- Axios for API calls
- Spring Boot
- Spring Security with JWT
- Spring Data JPA
- PostgreSQL
- Spring Boot Actuator for monitoring
- Docker for containerization
- PostgreSQL for database
-
User Authentication & Authorization
- JWT-based authentication
- Two roles: User and Admin
- Secure password handling
-
Book Management
- Browse books
- Search and filter books
- Book details view
- Admin: Add/Edit/Delete books
-
Shopping Cart
- Add/Remove books
- Update quantities
- Save cart for logged-in users
-
Order Management
- Place orders
- View order history
- Order status tracking
-
Admin Features
- Manage books
- View all orders
- Manage users
- View system metrics (Actuator)
bookstore/
├── frontend/ # React frontend application
├── backend/ # Spring Boot backend application
├── docker/ # Docker configuration files
└── README.md # Project documentation
- Java 17 or higher
- Node.js 16 or higher
- Docker and Docker Compose
- PostgreSQL (if running locally)
- Build and start the containers:
docker-compose up --build- Access the applications:
- Frontend: http://localhost:3000
- Backend: http://localhost:8080
- Actuator: http://localhost:8080/actuator
- Navigate to backend directory:
cd backend- Run the Spring Boot application:
./mvnw spring-boot:run- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm startThe API documentation will be available at:
- Swagger UI: http://localhost:8080/swagger-ui.html
- Actuator: http://localhost:8080/actuator
The application uses PostgreSQL with the following main tables:
- users
- books
- orders
- order_items
- shopping_cart
- shopping_cart_items
- JWT-based authentication
- Role-based access control
- Password encryption
- CORS configuration
- Input validation
Spring Boot Actuator provides the following endpoints:
- /actuator/health
- /actuator/metrics
- /actuator/info
- /actuator/prometheus