How ddan-dda-ra/ddan-ddan-server works
Project type and purpose
• From the file tree and minimal README, this is a Kotlin‐based Spring Boot server application (“ddan-ddan-server”) that provides RESTful endpoints supporting user authentication (OAuth via Kakao/Apple), user/pet management, ranking, daily info, and push notifications. It uses MongoDB as its primary data store, integrates with Firebase Cloud Messaging (FCM) and Slack webhooks, and schedules background jobs.
File structure
• Top-level build files (Gradle, Dockerignore, GitHub workflows) indicate containerization and CI/CD.
• src/main/kotlin/notbe/tmtm/ddanddanserver is organized by layers:
• presentation (controllers, DTOs, filters, schedulers)
• application (Processor and Service classes)
• domain (use cases, gateways, models, exceptions)
• infrastructure (API clients, database repositories/entities, gateway implementations)
• common and config modules for cross‐cutting concerns (security, JWT, Swagger, Mongo converters).
• src/main/resources holds YAML configs for multiple environments.
• Tests mirror domain/use cases for unit testing.
Detail
• Layer’s boundaries and Adapters (e.g. JWTAuthFilter as a security adapter, MongoConverter as a data adapter)
• Both synchronous flows (HTTP requests) and asynchronous/scheduled flows (notifications)
• Don’t omit small but critical modules (SwaggerConfig, WebSecurityConfig, OAuthProcessorFactory)