Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 56 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[README.md](https://github.com/user-attachments/files/22389320/README.md)
# 📚 Book-Repo
*Empowering Discovery, Simplifying Your Book Journey*

Expand All @@ -9,7 +8,31 @@

---

## 📖 Overview
## 📖 Overview


## 🛠 Technology Stack
| Technology | Version |
|--------------------------|-----------|
| Java | 17 |
| Spring Boot | 3.3.3 |
| Spring Security | bundled |
| Spring Data JPA | bundled |
| Spring Validation | bundled |
| Springdoc OpenAPI | 2.1.0 |
| Liquibase | latest |
| MapStruct | 1.5.5.Final |
| Lombok | 1.18.36 |
| JWT (jjwt) | 0.11.5 |
| Hibernate Validator | bundled |
| MySQL Connector/J | 8.4.0 / 8.0.33 |
| Docker Compose Support | 3.1.1 |
| Testcontainers (core) | 1.19.0 |
| Testcontainers BOM | 1.21.3 |
| JUnit (Spring Boot Test)| bundled |
| Maven Compiler Plugin | 3.3.0+ |
| Maven Checkstyle Plugin | 3.3.0 |

**Book-Repo** is a full-featured **online book store application** built with **Java & Spring Boot**.
It demonstrates best practices for modern backend development: modular architecture, containerized deployment, and comprehensive testing.

Expand Down Expand Up @@ -85,17 +108,41 @@ docker run -it book-repo mvn test
## 📂 Project Structure
```
book-repo/
├── src/ # Source code (controllers, services, repositories, configs)
├── resources/ # Application configuration & Liquibase migrations
├── Dockerfile # Docker image build
├── docker-compose.yml # Containerized environment setup
└── pom.xml # Maven project descriptor
├── src/
│ ├── main/java/com/bookrepo/
│ │ ├── controller/ # REST controllers (BookController, OrderController, CartController, AuthController)
│ │ ├── dto/ # Data Transfer Objects (BookDTO, UserDTO, OrderDTO, etc.)
│ │ ├── entity/ # JPA entities (Book, User, Role, Cart, Order, OrderItem)
│ │ ├── repository/ # Spring Data repositories for each entity
│ │ ├── service/ # Business logic (BookService, OrderService, CartService, UserService)
│ │ ├── security/ # JWT configuration, filters, role-based access
│ │ └── config/ # Spring and application configuration
│ └── test/java/com/bookrepo/
│ ├── controller/ # Controller layer tests
│ ├── service/ # Unit tests for business logic
│ └── repository/ # Database integration tests with Testcontainers
├── resources/
│ ├── db/changelog/ # Liquibase migration scripts
│ ├── application.yml # Spring Boot configuration
│ └── logback.xml # Logging configuration
├── docs/
│ ├── model-diagram.png # Entity-Relationship diagram
│ └── postman/ # Postman collections for API testing
├── Dockerfile # Docker image build
├── docker-compose.yml # Containerized environment setup
└── pom.xml # Maven project descriptor
```

### 🗃 Domain Model
- **Book**: stores information about title, author, genre, price, stock, etc.
- **User**: application users with roles (ADMIN, CUSTOMER).
- **Role**: defines permissions for users.
- **Cart**: holds items selected by a user before checkout.
- **Order**: finalized purchase with order items, status, and total price.
- **OrderItem**: association between books and orders with quantity & price.
---

## 🗺 Roadmap
- [ ] Implement book search with filters (author, genre, price)
## 🗺 Roadmap
- [ ] Add payment integration (Stripe/PayPal)
- [ ] Improve admin panel for managing books and users
- [ ] Deploy CI/CD pipeline with GitHub Actions
Expand Down