How learnathon-by-geeky-solutions/byte-breeze works
Project Type & Purpose
• This is a monolithic, full-stack web application (“Smart Parcel Delivery System”) built on Java Spring Boot.
• It exposes role-based UIs (Customer, Rider, Admin) via Thymeleaf templates and static assets, hosts REST endpoints (e.g. for shipping cost calculation), persists data in PostgreSQL, and integrates with external services (SSLCommerz payment API, OpenTelemetry backends).
High-Level Component Breakdown
a. Front-End Clients
• Web browsers for three user roles (Customer, Rider, Admin).
• Static assets (CSS/JS under src/main/resources/static) and Thymeleaf templates (src/main/resources/templates).
b. Application Server (Spring Boot)
• Controllers (MVC & REST under com.bytebreeze.quickdrop.controller)
• Service Layer (business logic under com.bytebreeze.quickdrop.service)
• Data Access (Spring Data JPA repositories under com.bytebreeze.quickdrop.repository + Hibernate entities)
• Configuration (ModelMapper, RestTemplate, OpenTelemetry exporters, security)
• Utilities (file storage, hashing, profile settings)
c. Database
• PostgreSQL instance (local via docker-compose or Azure VM)
• Flyway-managed schema migrations under src/main/resources/db/migration
d. External Services
• SSLCommerz Payment Gateway
• Observability: OpenTelemetry traces → Jaeger, metrics → Prometheus/Grafana, logs → ELK (Loki)
e. DevOps / CI-CD
• Dockerfile + docker-compose.yml for local environment
• GitHub Actions workflows for build, test, code formatting, coverage
• Deployment targets: Render (PAAS) for dev, Azure VM (IAAS) for prod
Interactions & Data Flows
• Browser → HTTPS → Spring Boot DispatcherServlet → Controller
• Controller ↔ DTO ↔ Service layer → Repository → JDBC → PostgreSQL
• Service layer ↔ External REST API (SSLCommerz) via RestTemplate
• Service layer instrumented with OpenTelemetry SDK → OTLP exporter → Jaeger/Prometheus/Loki
• CI pipeline: Git push → GitHub Actions → Docker image build → Deploy to Render/Azure
Architectural Patterns & Design Principles
• Layered MVC (Presentation → Controller → Service → Repository → Database)
• DTO mapping via ModelMapper for separation of API and persistence models
• Repository Pattern with Spring Data JPA
• Configuration by profile (dev/prod/test) using Spring Boot’s application-*.properties
• Exception handling with custom exceptions and @ControllerAdvice (not shown but implied)
• Security via Spring Security + JWT and role-based access controls in SecurityConfig