How ezzanzzan/2023-dong-gle works
Project Type and Purpose
• This is a full-stack web application called “Donggle” that allows users to write or import text editor content and publish it to various blogging platforms (Tistory, Medium, Notion).
• The backend is a single Spring Boot monolith exposing REST APIs. The frontend is a TypeScript React SPA served through Nginx.
• It integrates with several external APIs for publishing and OAuth and uses AWS for file storage.
File-Structure Analysis
• Top level contains two main folders: backend and frontend, plus Docker Compose and Nginx configs under conf-dev, conf-prod, and compose-*.yml.
• Backend follows a layered MVC approach:
• ui (REST controllers)
• application (use-case services, request/response DTOs, client abstractions)
• domain (entities, value objects, parsers, renderers)
• infrastructure (HTTP clients for external services, S3 file handler, OAuth clients)
• repository (Spring Data JPA interfaces)
• config (environment, dev/test data initialization)
• exception (authentication, business, not-found)
• tests mirror each layer.
• Frontend is a React SPA with:
• routers & pages
• shared components (common controls, category, writing, publishing sections)
• API wrappers under apis/*.ts
• global state & React Contexts
• Cypress for E2E tests and Jest for unit tests
• Webpack/Docker config for builds.
• Infrastructure: multiple Dockerfiles (front/back), blue‐green compose files, Nginx templates, deploy.sh script.
README Insights
• Confirms the tech stack: AWS RDS (MySQL), Redis, S3, Spring Boot, React, TypeScript.
a. Main Components
• User’s Web Browser (SPA)
• Front-end Nginx (Docker / AWS ALB)
• React Application (served by Nginx)
• API Gateway / Back-end Nginx (routes to Spring Boot)
• Spring Boot Service (controllers, services, repositories)
• MySQL Database (RDS)
• Redis Cache
• S3 Bucket (for media uploads)
• External API Services: Notion API, Medium API, Tistory API, Kakao OAuth
• Blue-Green Deployment Env (two application sets, traffic switcher)
b. Relationships & Interactions
• Browser → HTTP over TLS → Front-end Nginx → React assets
• React → REST calls → Back-end Nginx → Spring Boot controllers
• Controllers → Application services → Repositories → MySQL
• Controllers / Services → Redis (caching tokens, sessions)
• File upload/download endpoints → S3 client (presigned URLs)
• Publishing Service → External blog APIs (HTTP clients)
• OAuth flow → Kakao API → Back-end authentication service
• Blue-Green deployer switches Nginx upstreams between two Spring Boot sets.
c. Architectural Patterns & Principles
• Layered (MVC + service + repository) architecture in backend
• Aspect-oriented concurrency control (NoConcurrentExecution)
• Parser / Renderer modules separate content transformation from I/O
• API wrappers isolate external service contracts
• Single-page application with API boundary
• Blue-Green deployment for zero downtime
d. Key Technologies
• Java + Spring Boot (Gradle), Spring Data JPA, Spring AOP
• React + TypeScript, Webpack, MSW (mock Service Worker), Cypress
• Docker & Docker Compose, Nginx, AWS RDS, ElastiCache Redis, S3