How 023-dev/biram works
Project Type and Purpose
• This is a single-deploy Spring Boot application (monolithic server-side system) structured as a modular, hexagonal (ports-and-adapters) architecture.
• It exposes REST endpoints and WebSocket channels for features around auctions, bidding, chat, notifications, user management, daily activities, images, reviews and wishes.
• It integrates with relational storage via JPA, Redis caching, AWS S3 for media, OAuth2 providers (Kakao/Naver), JWT security, and a message broker for asynchronous notifications and bid events.
High-Level Components
• Clients: Browser or mobile apps
• HTTP(S) REST clients
• WebSocket clients (chat/notification channels)
• Spring Boot Application (“biram-service”):
• UI Layer: @RestController and WebSocket controllers per module
• Application Layer: port interfaces + service implementations per module
• Domain Layer: core entities, value objects, business rules
• Infrastructure Layer: adapters for JPA repositories, Redis caches, message brokers, S3 manager, OAuth2, JWT filters
• Global Config: security, Web MVC, WebSocket, Swagger, Redis, QueryDSL, S3, AWS, auditing
• Exception Handling: centralized @ControllerAdvice and custom exceptions
• Scheduling: auction expiration scheduler
• External Systems:
• RDBMS (e.g., MySQL/PostgreSQL)
• Redis cluster (caching, token store, auction/bid caches)
• AWS S3 bucket (image storage)
• OAuth2 Identity Providers (Kakao, Naver)
• Message broker (e.g., RabbitMQ/Kafka) for notifications and bid‐publish
• CI/CD pipeline (GitHub Actions + Docker + docker-compose)
Relationships and Data Flows
• Clients → HTTP Controllers → Application Services → Domain → Repositories (JPA) → RDBMS
• Clients → WebSocket Controllers → Application Services → Domain → Message Broker / In-memory session manager
• Application Services ↔ Redis Adapter for caching auction/bid/wish data
• Image upload requests → S3Service → AWS S3
• OAuth2 login flow → OAuth2TokenLoginFilter → OAuth2 providers → JwtTokenizer → Clients
• Auction expiration → Scheduled task → AuctionExpiredService → Message Broker → AuctionExpirationListener
Architectural Patterns & Principles
• Hexagonal (Ports & Adapters): each module defines input/output ports and has adapters in infrastructure.
• Layered: UI → Application → Domain → Infrastructure
• Module-per-Bounded-Context: auction, bid, chat, member, notification, review, wish, daily, image
• Infrastructure-agnostic domain; use DI to inject ports.
• Centralized cross-cutting concerns: security, exception handling, swagger, auditing.