How boostcampwm2023/ios07-traveline works
1. Repository shape
- This is a two-app monorepo: a NestJS backend under BE/ and an iOS client under iOS/.
- The backend is the API and persistence layer; the iOS app is the primary consumer, built around a layered feature architecture.
2. Backend high-level architecture
- The NestJS app is split by domain modules: auth, users, postings, timelines, social login, email, storage, plus shared database, logging, exception, swagger concerns.
- Request flow is the usual Nest pattern: controller → service → repository/provider → TypeORM-backed database.
3. Backend domain boundaries
- The core business entities are User, Posting, Timeline, and supporting relations like Liked, Report, Block, and SocialLogin.
- The product’s main relationship is “a post contains multiple timeline entries,” with additional user interactions such as likes, reports, and profile/block management.
4. Backend persistence and data access
- Persistence is relational and handled through TypeORM with domain-specific repositories (postings.repository.ts, timelines.repository.ts, users.repository.ts, etc.).
- DTOs and entity classes separate API input/output from stored models, which is important for diagramming the boundary between transport and persistence.
5. Backend cross-cutting services
- auth.guard.ts, exception.filter.ts, and logging.interceptor.ts represent system-wide request handling concerns.
- swagger.setting.ts and the *.swagger.ts files indicate that API contract documentation is a first-class part of the backend surface.
6. Backend external integrations
- AWS SES is used for email delivery, especially for IP-change verification mail flows.
- The storage module abstracts file/image handling, and the views/ directory shows the backend can also render server-side templates for certain flows.
- Deployment is containerized with Docker, automated via GitHub Actions, and fronted by Nginx + Let’s Encrypt for HTTPS.
7. iOS application architecture
- The iOS app uses MVVM + Clean Architecture.
- The codebase is divided into Core, Domain, Data, DesignSystem, and Feature, which cleanly separates shared infrastructure, business rules, data access, UI primitives, and screen-level features.
8. iOS presentation and interaction flow
- Each feature screen follows a ViewController + ViewModel structure with local views and cells inside the feature folder.
- State handling is designed around a unidirectional flow: View events → ViewModel actions/state/side effects → UI updates.
- Combine is used for binding and event streams; Swift Concurrency is used for one-shot async operations like networking.
9. iOS domain and data layers
- Domain/ contains app business models, repository interfaces, and use cases.
- Data/ contains repository implementations, network endpoints, DTO mappings, and storage/cache utilities.
- This boundary matters: feature code depends on use cases and repository interfaces, not concrete network implementations.
10. iOS backend integration
- The network layer is endpoint-driven (AuthEndPoint, PostingEndPoint, TimelineEndPoint, UserEndPoint, etc.) and maps responses into DTOs before converting to domain models.
- The iOS app’s API surface closely mirrors the backend resource split, which makes the architecture diagram easy to align across client and server.
11. iOS feature modules
- Major feature groups are Login, Home/Search/Filter, Travel creation, Timeline list/detail/writing/map, My Page/Profile/Settings, and a Side Menu.
- The home flow focuses on discovery and filtering; the timeline flow focuses on creating and viewing trip itineraries, including a map-based representation.
12. Shared UI and platform support on iOS
- DesignSystem/ contains reusable colors, fonts, images, components, and higher-level widgets such as navigation bars, filters, tags, search, toast, empty states, and bottom sheets.
- Core/ contains app-wide utilities: Combine helpers, keychain wrappers, user defaults wrappers, caching, constants, enums, and generic base ViewModel/state abstractions.
13. Authentication and user session management
- The client supports social login and stores sensitive session data in Keychain.
- The backend contains dedicated auth and social-login strategies, so session establishment is a distinct subsystem rather than embedded in general user logic.
14. Testing and delivery
- The backend includes controller/service unit tests and an e2e test setup; the iOS side includes mock repository implementations to decouple feature development from live APIs.
- CI/CD is built around GitHub Actions, which supports the repo’s split client/server workflow and API-first coordination via Swagger.
Main entry points: main.ts Nest app · Feature Features · Domain Domain · Data Data
Components 29
Monorepo
Two-app repository with backend, iOS client, and delivery automation
- Traveline · Repository root coordinating backend, client, and automation
Backend
NestJS API, domain logic, and persistence
- Nest app · Backend bootstrap and application composition
BE/src/main.ts - Auth · Authentication endpoints, guards, and login orchestration
BE/src/auth - Social login · Apple and Kakao login strategies plus social auth DTOs
BE/src/socialLogin - Users · User profiles, blocks, IP updates, and user-facing API
BE/src/users - Postings · Posting lifecycle, likes, reports, and posting queries
BE/src/postings - Timelines · Timeline CRUD and post itinerary persistence
BE/src/timelines - Database · TypeORM connection and shared database providers
BE/src/database - Email · AWS SES backed mail delivery and verification flows
BE/src/email - Storage · File and image storage abstraction
BE/src/storage - Cross-cutting · Global auth, exception, logging, and swagger concerns
BE/src - Domain models · User, Posting, Timeline, Block, SocialLogin, Like, and Report entities
BE/src - Repositories · Domain repositories wrapping TypeORM queries and persistence logic
BE/src - DTOs · Request and response objects separating API contracts from entities
BE/src - Swagger · OpenAPI configuration and per-module contract annotations
BE/src/swagger
iOS App
Swift client with Clean Architecture and feature modules
- App shell · App lifecycle, root container, and scene wiring
iOS/traveline/Sources/App - Core · Base view model state, caching, keychain, Combine helpers, and utilities
iOS/traveline/Sources/Core - Design system · Reusable colors, fonts, components, and shared views
iOS/traveline/Sources/DesignSystem - Domain · Models, repository interfaces, and use cases
iOS/traveline/Sources/Domain - Data · Network endpoints, DTO mapping, repository implementations, and cache/storage adapters
iOS/traveline/Sources/Data - Features · Screen-level flows built as ViewController plus ViewModel scenes
iOS/traveline/Sources/Feature - Login · Social login and auto-login flow
iOS/traveline/Sources/Feature/LoginFeature - Home/Search · Discovery, search, filtering, and home browsing flow
iOS/traveline/Sources/Feature/HomeFeature - Travel creation · Travel setup, region, period, and tag selection flow
iOS/traveline/Sources/Feature/TravelFeature - Timeline · Timeline list, detail, map, and writing flow
iOS/traveline/Sources/Feature/TimelineFeature - My Page · Profile editing, settings, and personal posting list
iOS/traveline/Sources/Feature/MyPageFeature - Side menu · Navigation drawer and profile summary entry point
iOS/traveline/Sources/Feature/SideFeature
Delivery
CI/CD, deployment, and environment automation
- CI/CD · GitHub Actions workflows for test and deploy
.github/workflows - Deploy stack · Dockerized backend deployment behind Nginx and Let’s Encrypt
BE/Dockerfile
Connections 48
- Traveline → Nest app: contains · Repository includes the NestJS backend entrypoint
- Traveline → App shell: contains · Repository includes the iOS application shell
- Traveline → CI/CD: automates · Shared CI workflows support both apps
- Nest app → Auth: wires · Application module composes auth module
- Nest app → Users: wires · Application module composes users module
- Nest app → Postings: wires · Application module composes postings module
- Nest app → Timelines: wires · Application module composes timelines module
- Nest app → Database: uses · Backend modules depend on shared database providers
- Auth → Social login: delegates · Auth relies on social login strategies
- Auth → Users: reads users · Authentication resolves user records and session state
- Users → Domain models: persists · Users module works with user, block, and social login entities
- Postings → Domain models: persists · Postings module works with posting, like, and report entities
- Timelines → Domain models: persists · Timelines module stores timeline entities
- Repositories → Domain models: queries · Repositories wrap TypeORM access to domain entities
- DTOs → Auth: shapes · Module DTOs define auth request and response contracts
- DTOs → Postings: shapes · Posting DTOs define create, search, and update payloads
- DTOs → Timelines: shapes · Timeline DTOs define create and update payloads
- Cross-cutting → Swagger: documents · Global configuration and per-module swagger annotations
- Cross-cutting → Auth: protects · Auth guard is part of the request pipeline
- Cross-cutting → Nest app: wraps · Exception filter and logging interceptor apply around requests
- Email → Auth: supports · Email service backs verification and account flows
- Storage → Postings: supports · Storage abstraction serves posting media handling
- Storage → Timelines: supports · Storage abstraction serves timeline media handling
- Nest app → Deploy stack: deploys via · Backend is containerized and deployed with the infra stack
- App shell → Core: boots with · App shell depends on shared core utilities
- App shell → Design system: renders with · App shell uses shared UI system
- App shell → Features: hosts · Root container mounts feature scenes
- Features → Login: includes · Feature set includes login flow
- Features → Home/Search: includes · Feature set includes home and search flow
- Features → Travel creation: includes · Feature set includes travel creation flow
- Features → Timeline: includes · Feature set includes timeline flow
- Features → My Page: includes · Feature set includes profile and settings flow
- Features → Side menu: includes · Feature set includes side menu flow
- Domain → Data: abstracts · Use cases depend on repository interfaces, not concrete data sources
- Data → Domain: implements · Repository implementations satisfy domain contracts
- Data → Auth: calls · Network endpoints mirror backend auth resources
- Data → Postings: calls · Network endpoints mirror backend posting resources
- Data → Timelines: calls · Network endpoints mirror backend timeline resources
- Data → Users: calls · Network endpoints mirror backend user resources
- Login → Domain: uses · Login scene is driven by use cases and repository interfaces
- Home/Search → Domain: uses · Discovery flow depends on domain use cases
- Travel creation → Domain: uses · Travel setup flow depends on domain use cases
- Timeline → Domain: uses · Timeline screens depend on domain use cases
- My Page → Domain: uses · Profile and settings flow depends on domain use cases
- Side menu → Domain: uses · Side menu relies on domain use cases
- Core → Data: supports · Keychain, caching, and async helpers support data and session handling
- Design system → Features: supports · Shared UI components are consumed by feature screens
- CI/CD → Nest app: tests · Backend CI runs test workflows