How vikkushnir/book-store works
Main Components
a) Client Layer:
• External Client Applications (Web/Mobile)
• Swagger UI for API documentation
b) API Gateway Layer:
• Security Filter Chain (JWT Authentication)
• Global Exception Handler
• Controllers (Authentication, Book, Category, Order, ShoppingCart)
c) Service Layer:
• Authentication Service
• Book Service
• Category Service
• Shopping Cart Service
• Order Service
• User Service
d) Data Access Layer:
• Repositories
• Specification Providers (for search functionality)
• Entity Models
e) Database Layer:
• MySQL Database
• Liquibase Migrations
Component Relationships
• Client → API Gateway (REST calls)
• API Gateway → Security Filter (JWT validation)
• Controllers → Services (business logic)
• Services → Repositories (data access)
• Repositories → Database (persistence)
Specific Implementation Details
┌─ Security ─────────────┐
• JWT Authentication │
• Role-based Access │
• Custom UserDetails │
• ┘
┌─ Data Transfer ────────┐
• Request DTOs │
• Response DTOs │
• Mappers (MapStruct) │
• ┘
┌─ Domain Models ────────┐
• User/Role │
• Book/Category │
• Order/OrderItem │
• ShoppingCart/Item │
• ┘
Special Features to Highlight
• Liquibase Database Migration
• Specification Pattern for Book Search
• JWT Token Authentication Flow
• Shopping Cart to Order Process
Technical Stack Indicators
Technology badges for:
• Spring Boot
• Spring Security
• MySQL
• Hibernate
• MapStruct
• Docker
• Lombok
Data Flow Patterns
Flows:
User Authentication Flow:
Client → AuthController → AuthService → UserRepository → Database
Book Search Flow:
Client → BookController → BookService → BookSpecification → BookRepository → Database
Order Processing Flow:
Client → OrderController → OrderService → ShoppingCartService → OrderRepository → Database