How up2code/spring-book-store works
Main Components
a) Application Layer:
• Spring Boot Application Core
• Controllers (Auth, Author, Book)
• Services Layer
• Repository Layer
• Security Components (JWT)
• Entity Models
• DTOs/Request Models
b) Infrastructure:
• PostgreSQL Database
• Monitoring Stack
• Prometheus (Metrics Collection)
• Grafana (Visualization)
• pgAdmin (Database Management)
[Client Layer]
• ↓
[Application Layer]
• ↓
[Data & Monitoring Layer]
Detailed Component Breakdown
a) Client Layer:
• External API consumers
• Swagger UI endpoint
• OpenAPI documentation endpoint
b) Application Layer (Spring Boot):
• Security Filter Chain
• JWT Authentication Filter
• Security Config
• Controllers Layer
• AuthController
• AuthorController
• BookController
• Service Layer
• BookService
• AuthorService
• CustomUserDetailsService
• Repository Layer
• BookRepository
• AuthorRepository
• Entity Models
• Book
• Author
c) Data & Monitoring Layer:
• PostgreSQL Database
• Prometheus (Metrics Collection)
• Grafana (Dashboards)
• pgAdmin
Important Relationships
• JWT Authentication flow
• CRUD operations flow
• Monitoring data flow
• Database connections
Technical Details
• Port mappings:
• Main application: 8080
• Prometheus: 9090
• Grafana: 3000
• Database credentials (noted in configuration)
• JWT security implementation