이 문서는 리빗 앱의 기술 스택과 아키텍처를 정의합니다.
1. 기술 스택 요약
MVP 스택
| 카테고리 |
선택 |
이유 |
| 모바일 |
Flutter |
크로스플랫폼, 애니메이션 강점 |
| 백엔드 |
Spring Boot (Kotlin) |
포폴 어필, 학습 목표 |
| 메인 DB |
PostgreSQL + pgvector |
관계형 + RAG 벡터 검색 |
| 캐시 |
Redis |
세션, 에너지 상태 |
| 검색 |
PostgreSQL Full-Text |
MVP는 충분 |
| 배포 |
Railway |
간단, 빠른 시작 |
| AI |
Claude Sonnet + GPT-4o-mini + Gemini Flash |
균형 플랜 (품질+비용) |
| 푸시 |
FCM |
Flutter 궁합 |
| 스토리지 |
Firebase Storage |
FCM과 통합 |
| 인증 |
JWT + Google/Apple OAuth |
표준 |
| 분석 |
Firebase Analytics |
무료, 통합 |
2. 모바일 앱 (Flutter)
선택 이유
| 장점 |
설명 |
| 크로스플랫폼 |
iOS/Android 동시 개발 |
| 애니메이션 |
리빗 캐릭터 표현에 강점 |
| 빠른 개발 |
Hot Reload |
| UI 자유도 |
커스텀 위젯 |
주요 패키지
dependencies:
# 상태관리
flutter_riverpod: ^2.0.0
# 네트워크
dio: ^5.0.0
# 로컬 저장
shared_preferences: ^2.0.0
hive: ^2.0.0
# 인증
google_sign_in: ^6.0.0
sign_in_with_apple: ^5.0.0
# 푸시
firebase_messaging: ^14.0.0
firebase_analytics: ^10.0.0
# 애니메이션
rive: ^0.12.0 # 리빗 캐릭터
lottie: ^2.0.0
# UI
flutter_svg: ^2.0.0
cached_network_image: ^3.0.0
3. 백엔드 (Spring Boot + Kotlin)
선택 이유
| 장점 |
설명 |
| 기업 수요 |
국내 백엔드 주력 |
| Kotlin |
Java 호환 + 간결함, 트렌드 |
| 생태계 |
풍부한 라이브러리 |
| 포폴 어필 |
중견 기업 타겟 |
프로젝트 구조
src/main/kotlin/com/rebeet/
├── RebeetApplication.kt
├── config/
│ ├── SecurityConfig.kt
│ ├── RedisConfig.kt
│ └── OpenAIConfig.kt
├── domain/
│ ├── user/
│ ├── goal/
│ ├── track/
│ ├── mission/
│ ├── diary/
│ └── chat/
├── infrastructure/
│ ├── ai/
│ ├── persistence/
│ └── external/
└── common/
├── exception/
└── util/
주요 의존성
dependencies {
// Spring
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-validation")
// Kotlin
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
// Database
runtimeOnly("org.postgresql:postgresql")
// JWT
implementation("io.jsonwebtoken:jjwt-api:0.11.5")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.11.5")
// OpenAI
implementation("com.theokanning.openai-gpt3-java:service:0.18.2")
// Firebase
implementation("com.google.firebase:firebase-admin:9.2.0")
}