# boostcampwm2023/ios07-traveline architecture

> Architecture diagram of the GitHub repository boostcampwm2023/ios07-traveline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/boostcampwm2023/ios07-traveline
- Repository: https://github.com/boostcampwm2023/ios07-traveline

## Overview

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: [`BE/src/main.ts`](https://github.com/boostcampwm2023/ios07-traveline/blob/main/BE/src/main.ts) (Nest app), [`iOS/traveline/Sources/Feature`](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature) (Features), [`iOS/traveline/Sources/Domain`](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Domain) (Domain), [`iOS/traveline/Sources/Data`](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Data) (Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_monorepo["Monorepo"]
  node_root["Traveline<br/>monorepo"]
end

subgraph group_backend["Backend"]
  node_be_app["Nest app<br/>nestjs entry<br/>[main.ts]"]
  node_be_auth["Auth<br/>api module"]
  node_be_social["Social login<br/>strategy module"]
  node_be_users["Users<br/>domain module"]
  node_be_postings["Postings<br/>domain module"]
  node_be_timelines["Timelines<br/>domain module"]
  node_be_database[("Database<br/>persistence module")]
  node_be_email["Email<br/>integration service"]
  node_be_storage["Storage<br/>integration service"]
  node_be_crosscut["Cross-cutting<br/>request pipeline"]
  node_be_entities[("Domain models<br/>typeorm entities")]
  node_be_repos["Repositories<br/>data access"]
  node_be_dtos["DTOs<br/>transport layer"]
  node_be_swagger["Swagger<br/>api docs"]
end

subgraph group_ios["iOS App"]
  node_ios_app["App shell<br/>swift entry"]
  node_ios_core["Core<br/>shared infra"]
  node_ios_design["Design system<br/>ui kit"]
  node_ios_domain["Domain<br/>business layer"]
  node_ios_data["Data"]
  node_ios_features["Features<br/>presentation modules"]
  node_ios_login["Login<br/>feature group"]
  node_ios_home["Home/Search<br/>feature group"]
  node_ios_travel["Travel creation<br/>feature group"]
  node_ios_timeline["Timeline<br/>feature group"]
  node_ios_mypage["My Page<br/>feature group"]
  node_ios_side["Side menu<br/>feature group"]
end

subgraph group_delivery["Delivery"]
  node_ci_cd["CI/CD<br/>automation<br/>[workflows]"]
  node_deploy_stack["Deploy stack<br/>infra"]
end

node_root -->|"contains"| node_be_app
node_root -->|"contains"| node_ios_app
node_root -->|"automates"| node_ci_cd
node_be_app -->|"wires"| node_be_auth
node_be_app -->|"wires"| node_be_users
node_be_app -->|"wires"| node_be_postings
node_be_app -->|"wires"| node_be_timelines
node_be_app -->|"uses"| node_be_database
node_be_auth -->|"delegates"| node_be_social
node_be_auth -->|"reads users"| node_be_users
node_be_users -->|"persists"| node_be_entities
node_be_postings -->|"persists"| node_be_entities
node_be_timelines -->|"persists"| node_be_entities
node_be_repos -->|"queries"| node_be_entities
node_be_dtos -->|"shapes"| node_be_auth
node_be_dtos -->|"shapes"| node_be_postings
node_be_dtos -->|"shapes"| node_be_timelines
node_be_crosscut -->|"documents"| node_be_swagger
node_be_crosscut -->|"protects"| node_be_auth
node_be_crosscut -->|"wraps"| node_be_app
node_be_email -->|"supports"| node_be_auth
node_be_storage -->|"supports"| node_be_postings
node_be_storage -->|"supports"| node_be_timelines
node_be_app -->|"deploys via"| node_deploy_stack
node_ios_app -->|"boots with"| node_ios_core
node_ios_app -->|"renders with"| node_ios_design
node_ios_app -->|"hosts"| node_ios_features
node_ios_features -->|"includes"| node_ios_login
node_ios_features -->|"includes"| node_ios_home
node_ios_features -->|"includes"| node_ios_travel
node_ios_features -->|"includes"| node_ios_timeline
node_ios_features -->|"includes"| node_ios_mypage
node_ios_features -->|"includes"| node_ios_side
node_ios_domain -->|"abstracts"| node_ios_data
node_ios_data -->|"implements"| node_ios_domain
node_ios_data -->|"calls"| node_be_auth
node_ios_data -->|"calls"| node_be_postings
node_ios_data -->|"calls"| node_be_timelines
node_ios_data -->|"calls"| node_be_users
node_ios_login -->|"uses"| node_ios_domain
node_ios_home -->|"uses"| node_ios_domain
node_ios_travel -->|"uses"| node_ios_domain
node_ios_timeline -->|"uses"| node_ios_domain
node_ios_mypage -->|"uses"| node_ios_domain
node_ios_side -->|"uses"| node_ios_domain
node_ios_core -->|"supports"| node_ios_data
node_ios_design -->|"supports"| node_ios_features
node_ci_cd -->|"tests"| node_be_app

click node_be_app "https://github.com/boostcampwm2023/ios07-traveline/blob/main/BE/src/main.ts"
click node_be_auth "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/auth"
click node_be_social "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/socialLogin"
click node_be_users "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/users"
click node_be_postings "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/postings"
click node_be_timelines "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/timelines"
click node_be_database "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/database"
click node_be_email "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/email"
click node_be_storage "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/storage"
click node_be_crosscut "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src"
click node_be_entities "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src"
click node_be_repos "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src"
click node_be_dtos "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src"
click node_be_swagger "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/swagger"
click node_ios_app "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/App"
click node_ios_core "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Core"
click node_ios_design "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/DesignSystem"
click node_ios_domain "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Domain"
click node_ios_data "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Data"
click node_ios_features "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature"
click node_ios_login "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/LoginFeature"
click node_ios_home "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/HomeFeature"
click node_ios_travel "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/TravelFeature"
click node_ios_timeline "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/TimelineFeature"
click node_ios_mypage "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/MyPageFeature"
click node_ios_side "https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/SideFeature"
click node_ci_cd "https://github.com/boostcampwm2023/ios07-traveline/blob/main/.github/workflows"
click node_deploy_stack "https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/Dockerfile"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_root toneBlue
class node_be_app,node_be_auth,node_be_social,node_be_users,node_be_postings,node_be_timelines,node_be_database,node_be_email,node_be_storage,node_be_crosscut,node_be_entities,node_be_repos,node_be_dtos,node_be_swagger toneAmber
class node_ios_app,node_ios_core,node_ios_design,node_ios_domain,node_ios_data,node_ios_features,node_ios_login,node_ios_home,node_ios_travel,node_ios_timeline,node_ios_mypage,node_ios_side toneMint
class node_ci_cd,node_deploy_stack toneRose
```

## Components

### Monorepo

Two-app repository with backend, iOS client, and delivery automation

- **Traveline**: monorepo · Repository root coordinating backend, client, and automation

### Backend

NestJS API, domain logic, and persistence

- [Nest app](https://github.com/boostcampwm2023/ios07-traveline/blob/main/BE/src/main.ts): nestjs entry · Backend bootstrap and application composition · `BE/src/main.ts`
- [Auth](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/auth): api module · Authentication endpoints, guards, and login orchestration · `BE/src/auth`
- [Social login](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/socialLogin): strategy module · Apple and Kakao login strategies plus social auth DTOs · `BE/src/socialLogin`
- [Users](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/users): domain module · User profiles, blocks, IP updates, and user-facing API · `BE/src/users`
- [Postings](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/postings): domain module · Posting lifecycle, likes, reports, and posting queries · `BE/src/postings`
- [Timelines](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/timelines): domain module · Timeline CRUD and post itinerary persistence · `BE/src/timelines`
- [Database](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/database): persistence module · TypeORM connection and shared database providers · `BE/src/database`
- [Email](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/email): integration service · AWS SES backed mail delivery and verification flows · `BE/src/email`
- [Storage](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/storage): integration service · File and image storage abstraction · `BE/src/storage`
- [Cross-cutting](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src): request pipeline · Global auth, exception, logging, and swagger concerns · `BE/src`
- [Domain models](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src): typeorm entities · User, Posting, Timeline, Block, SocialLogin, Like, and Report entities · `BE/src`
- [Repositories](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src): data access · Domain repositories wrapping TypeORM queries and persistence logic · `BE/src`
- [DTOs](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src): transport layer · Request and response objects separating API contracts from entities · `BE/src`
- [Swagger](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/src/swagger): api docs · OpenAPI configuration and per-module contract annotations · `BE/src/swagger`

### iOS App

Swift client with Clean Architecture and feature modules

- [App shell](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/App): swift entry · App lifecycle, root container, and scene wiring · `iOS/traveline/Sources/App`
- [Core](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Core): shared infra · Base view model state, caching, keychain, Combine helpers, and utilities · `iOS/traveline/Sources/Core`
- [Design system](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/DesignSystem): ui kit · Reusable colors, fonts, components, and shared views · `iOS/traveline/Sources/DesignSystem`
- [Domain](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Domain): business layer · Models, repository interfaces, and use cases · `iOS/traveline/Sources/Domain`
- [Data](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Data): data layer · Network endpoints, DTO mapping, repository implementations, and cache/storage adapters · `iOS/traveline/Sources/Data`
- [Features](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature): presentation modules · Screen-level flows built as ViewController plus ViewModel scenes · `iOS/traveline/Sources/Feature`
- [Login](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/LoginFeature): feature group · Social login and auto-login flow · `iOS/traveline/Sources/Feature/LoginFeature`
- [Home/Search](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/HomeFeature): feature group · Discovery, search, filtering, and home browsing flow · `iOS/traveline/Sources/Feature/HomeFeature`
- [Travel creation](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/TravelFeature): feature group · Travel setup, region, period, and tag selection flow · `iOS/traveline/Sources/Feature/TravelFeature`
- [Timeline](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/TimelineFeature): feature group · Timeline list, detail, map, and writing flow · `iOS/traveline/Sources/Feature/TimelineFeature`
- [My Page](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/MyPageFeature): feature group · Profile editing, settings, and personal posting list · `iOS/traveline/Sources/Feature/MyPageFeature`
- [Side menu](https://github.com/boostcampwm2023/ios07-traveline/tree/main/iOS/traveline/Sources/Feature/SideFeature): feature group · Navigation drawer and profile summary entry point · `iOS/traveline/Sources/Feature/SideFeature`

### Delivery

CI/CD, deployment, and environment automation

- [CI/CD](https://github.com/boostcampwm2023/ios07-traveline/blob/main/.github/workflows): automation · GitHub Actions workflows for test and deploy · `.github/workflows`
- [Deploy stack](https://github.com/boostcampwm2023/ios07-traveline/tree/main/BE/Dockerfile): infra · Dockerized backend deployment behind Nginx and Let’s Encrypt · `BE/Dockerfile`

## Connections

- 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
