From 5061171e4575d62af4efb8ac687ca622d162e48e Mon Sep 17 00:00:00 2001 From: jungwoo choi Date: Wed, 10 Sep 2025 08:56:29 +0900 Subject: [PATCH] Initial project foundation: Microservices architecture planning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Created CLAUDE.md with architecture guidelines and context recovery guide - Created docs/PLAN.md with progressive implementation strategy - Created docs/PROGRESS.md for checkpoint tracking - Added .gitignore for Python, Node, Docker environments - Established API Gateway pattern with Console as orchestrator πŸ€– Generated with Claude Code Co-Authored-By: Claude --- .gitignore | 67 ++++++++ CLAUDE.md | 269 +++++++++++++++++++++++++++++++ docs/PLAN.md | 401 +++++++++++++++++++++++++++++++++++++++++++++++ docs/PROGRESS.md | 113 +++++++++++++ 4 files changed, 850 insertions(+) create mode 100644 .gitignore create mode 100644 CLAUDE.md create mode 100644 docs/PLAN.md create mode 100644 docs/PROGRESS.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0e44b5b --- /dev/null +++ b/.gitignore @@ -0,0 +1,67 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +env/ +venv/ +.venv +pip-log.txt +pip-delete-this-directory.txt +.pytest_cache/ +*.egg-info/ +dist/ +build/ + +# Node +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* +dist/ +build/ + +# Environment +.env +.env.local +.env.*.local +*.local + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store + +# Docker +*.log +docker-compose.override.yml + +# Database +data/ +*.db +*.sqlite + +# Testing +coverage/ +.coverage +htmlcov/ +.tox/ +.hypothesis/ + +# Temporary +tmp/ +temp/ +*.tmp +*.temp +*.bak + +# Secrets +*.pem +*.key +*.crt +secrets/ \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..05838c0 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,269 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## File Naming Convention +**IMPORTANT**: λͺ¨λ“  λ¬Έμ„œ νŒŒμΌμ€ λŒ€λ¬Έμž.md ν˜•μ‹μœΌλ‘œ 생성 +- 예: README.md, CHANGELOG.md, TODO.md, ARCHITECTURE.md + +## Context Recovery Guide +**IMPORTANT**: μƒˆ μ„Έμ…˜ μ‹œμž‘ μ‹œ λ°˜λ“œμ‹œ 확인할 νŒŒμΌλ“€: +1. `docs/PROGRESS.md` - ν˜„μž¬ μ§„ν–‰ 상황과 λ‹€μŒ 단계 +2. `docs/PLAN.md` - 전체 κ΅¬ν˜„ κ³„νš +3. `docker ps` - μ‹€ν–‰ 쀑인 μ„œλΉ„μŠ€ 확인 + +## Quick Status Check +```bash +# μ§„ν–‰ 상황 λΉ λ₯Έ 확인 +cat docs/PROGRESS.md | grep "Next Action" +``` + +## System Architecture + +### Architecture Pattern: Microservices with Central Console + +**Core Concept**: Console acts as the orchestrator and dashboard, while individual microservices handle domain-specific logic. + +### Architecture Approaches + +#### 1. API Gateway Pattern (Recommended) +Console serves as an API Gateway that: +- Routes requests to appropriate microservices +- Handles authentication/authorization centrally +- Aggregates responses from multiple services +- Provides service discovery and health monitoring + +#### 2. Service Mesh Pattern +- Each service communicates directly via service mesh (Istio/Linkerd) +- Console focuses on monitoring and management +- Better for complex inter-service communication + +#### 3. Event-Driven Architecture +- Services communicate via message broker (RabbitMQ/Kafka) +- Console subscribes to events for real-time monitoring +- Loose coupling between services + +### Technology Stack +- **Backend**: FastAPI (Python 3.11) + Motor (MongoDB async driver) +- **Frontend**: React 18 + Vite + TypeScript + Material-UI v7 +- **Database**: MongoDB 7.0 +- **Cache**: Redis 7 +- **Reverse Proxy**: Nginx +- **Container**: Docker & Docker Compose +- **Version Control**: git +- **API Documentation**: OpenAPI/Swagger +- **Service Communication**: REST + gRPC (for internal services) + +### Service Configuration +- **Nginx**: Port 80 (reverse proxy) +- **Console Backend**: Port 8000 (API Gateway) +- **Console Frontend**: Port 3000 +- **Services**: + - Images: 8001-8002 + - OAuth: 8003-8004 + - Applications: 8005-8006 + - Users: 8007-8008 + - Data: 8009-8010 + - Statistics: 8011-8012 +- **MongoDB**: Port 27017 (internal) +- **Redis**: Port 6379 (internal) + +## Microservices Implementation Strategy + +### Console as API Gateway (Recommended Approach) + +#### Responsibilities +**Console Backend**: +- Service discovery and routing +- Authentication & authorization (JWT/OAuth2) +- Request/response transformation +- Rate limiting & throttling +- Circuit breaking for fault tolerance +- Centralized logging & monitoring +- API composition for complex operations + +**Individual Microservices**: +- Domain-specific business logic +- Own database/collection management +- Event publishing for async operations +- Health endpoints for monitoring +- OpenAPI documentation + +### Service Communication Patterns + +#### 1. Synchronous Communication (REST) +```python +# Console backend routing example +@app.get("/api/users/{user_id}") +async def get_user(user_id: str): + # Route to users service + response = await http_client.get(f"http://users-service:8007/users/{user_id}") + return response.json() +``` + +#### 2. Asynchronous Communication (Event-driven) +```python +# Service publishes event +await redis_client.publish("user.created", user_data) + +# Console subscribes to events +async def handle_user_created(data): + # Update dashboard metrics + await update_statistics(data) +``` + +#### 3. Service Registry Pattern +```yaml +# services-registry.yaml +services: + users: + backend: "http://users-backend:8007" + frontend: "http://users-frontend:8008" + health: "/health" + oauth: + backend: "http://oauth-backend:8003" + frontend: "http://oauth-frontend:8004" + health: "/health" +``` + +### Development Workflow + +#### Commands +```bash +# Start all services +docker-compose up -d + +# Start specific service +docker-compose up -d console users + +# View logs +docker-compose logs -f [service-name] + +# Rebuild service +docker-compose build [service-name] +docker-compose up -d [service-name] + +# Run tests +docker-compose exec [service-name] pytest + +# Database migrations +docker-compose exec [service-name] alembic upgrade head +``` + +#### Service Development Guidelines +1. Each service should be independently deployable +2. Services share nothing except API contracts +3. Use correlation IDs for distributed tracing +4. Implement health checks and readiness probes +5. Version APIs appropriately (e.g., /api/v1/) + +## Project Structure + +``` +site11/ +β”œβ”€β”€ docker-compose.yml +β”œβ”€β”€ nginx/ +β”‚ └── nginx.conf +β”œβ”€β”€ console/ +β”‚ β”œβ”€β”€ backend/ +β”‚ β”‚ β”œβ”€β”€ Dockerfile +β”‚ β”‚ └── requirements.txt +β”‚ └── frontend/ +β”‚ β”œβ”€β”€ Dockerfile +β”‚ β”œβ”€β”€ package.json +β”‚ β”œβ”€β”€ vite.config.ts +β”‚ β”œβ”€β”€ tsconfig.json +β”‚ └── src/ +β”‚ β”œβ”€β”€ App.tsx +β”‚ β”œβ”€β”€ main.tsx +β”‚ β”œβ”€β”€ layouts/ +β”‚ β”‚ └── AdminLayout.tsx +β”‚ └── pages/ +β”‚ β”œβ”€β”€ Login.tsx +β”‚ └── Register.tsx +β”œβ”€β”€ services/ +β”‚ β”œβ”€β”€ images/ +β”‚ β”‚ β”œβ”€β”€ backend/ +β”‚ β”‚ └── frontend/ +β”‚ β”œβ”€β”€ oatuh/ +β”‚ β”‚ β”œβ”€β”€ backend/ +β”‚ β”‚ └── frontend/ +β”‚ β”œβ”€β”€ applications/ +β”‚ β”‚ β”œβ”€β”€ backend/ +β”‚ β”‚ └── frontend/ +β”‚ β”œβ”€β”€ users/ +β”‚ β”‚ β”œβ”€β”€ backend/ +β”‚ β”‚ └── frontend/ +β”‚ β”œβ”€β”€ data/ +β”‚ β”‚ β”œβ”€β”€ backend/ +β”‚ β”‚ └── frontend/ +β”‚ └── statistics/ +β”‚ β”œβ”€β”€ backend/ +β”‚ └── frontend/ +β”œβ”€β”€ docs/ +β”‚ └── PLAN.md +└── CLAUDE.md +``` + +## Service-Specific Architecture + +### Console Service +- **Purpose**: Central orchestrator and dashboard +- **Key Features**: + - Service health monitoring dashboard + - Unified authentication portal + - API Gateway for all services + - Real-time metrics aggregation + - Service configuration management + +### Microservice Template +Each service follows this structure: +``` +service-name/ +β”œβ”€β”€ backend/ +β”‚ β”œβ”€β”€ Dockerfile +β”‚ β”œβ”€β”€ requirements.txt +β”‚ β”œβ”€β”€ app/ +β”‚ β”‚ β”œβ”€β”€ main.py # FastAPI app +β”‚ β”‚ β”œβ”€β”€ models.py # Pydantic models +β”‚ β”‚ β”œβ”€β”€ routes.py # API endpoints +β”‚ β”‚ β”œβ”€β”€ database.py # MongoDB connection +β”‚ β”‚ └── services.py # Business logic +β”‚ └── tests/ +└── frontend/ + β”œβ”€β”€ Dockerfile + β”œβ”€β”€ package.json + └── src/ + β”œβ”€β”€ api/ # Service API client + β”œβ”€β”€ components/ # React components + └── hooks/ # Custom hooks +``` + +## Inter-Service Communication + +### API Gateway Routes (Console) +```python +# Console backend routing configuration +SERVICES = { + "users": {"url": "http://users-backend:8007", "prefix": "/api/users"}, + "oauth": {"url": "http://oauth-backend:8003", "prefix": "/api/auth"}, + "images": {"url": "http://images-backend:8001", "prefix": "/api/images"}, + "applications": {"url": "http://apps-backend:8005", "prefix": "/api/apps"}, + "data": {"url": "http://data-backend:8009", "prefix": "/api/data"}, + "statistics": {"url": "http://stats-backend:8011", "prefix": "/api/stats"} +} +``` + +### Service Discovery +Services register themselves with Console on startup and send periodic heartbeats. + +## Database Strategy +- **Shared MongoDB instance** with separate databases per service +- **Redis** for caching and pub/sub messaging +- Each service owns its data and exposes it via APIs + +## Security Considerations +- JWT tokens issued by OAuth service +- Console validates tokens and forwards to services +- Internal service communication uses service tokens +- Rate limiting at API Gateway level diff --git a/docs/PLAN.md b/docs/PLAN.md new file mode 100644 index 0000000..16a0695 --- /dev/null +++ b/docs/PLAN.md @@ -0,0 +1,401 @@ +# Microservices Architecture Implementation Plan + +## Project Overview +Build a microservices-based platform with a central Console service acting as an orchestrator and API Gateway, managing multiple domain-specific services. + +## Architecture Decision +**Selected Pattern**: API Gateway Pattern with Console as the central orchestrator +- Console handles authentication, routing, and monitoring +- Each microservice focuses on domain-specific logic +- Services communicate via REST APIs and Redis pub/sub + +## Progressive Implementation Strategy + +### Step-by-Step Approach +큰 그림을 λ¨Όμ € κ΅¬μ„±ν•˜κ³ , 핡심 κΈ°λŠ₯λΆ€ν„° μ μ§„μ μœΌλ‘œ ν™•μž₯ν•˜λŠ” μ „λž΅ + +## Implementation Phases + +### Step 1: Minimal Foundation (Day 1-2) +**λͺ©ν‘œ**: κ°€μž₯ 기본적인 ꡬ쑰 확립 +``` +site11/ +β”œβ”€β”€ docker-compose.yml # μ΅œμ†Œ ꡬ성 (Console만) +β”œβ”€β”€ console/ +β”‚ └── backend/ +β”‚ └── main.py # Hello World API +└── README.md +``` + +**Tasks**: +- [ ] κ°„λ‹¨ν•œ docker-compose.yml 생성 +- [ ] Console FastAPI "Hello World" +- [ ] κΈ°λ³Έ health check endpoint +- [ ] Docker둜 μ‹€ν–‰ 확인 + +### Step 2: Add First Service (Day 3-4) +**λͺ©ν‘œ**: Consoleκ³Ό ν•˜λ‚˜μ˜ μ„œλΉ„μŠ€ μ—°κ²° +``` +site11/ +β”œβ”€β”€ docker-compose.yml +β”œβ”€β”€ console/ +β”‚ └── backend/ +β”‚ └── main.py # Gateway μ—­ν•  μΆ”κ°€ +└── services/ + └── users/ + └── backend/ + └── main.py # Users μ„œλΉ„μŠ€ +``` + +**Tasks**: +- [ ] Users μ„œλΉ„μŠ€ 생성 +- [ ] Consoleμ—μ„œ Users둜 λΌμš°νŒ… +- [ ] μ„œλΉ„μŠ€ κ°„ 톡신 ν…ŒμŠ€νŠΈ +- [ ] κ°„λ‹¨ν•œ CRUD API + +### Step 3: Database Integration (Day 5-6) +**λͺ©ν‘œ**: MongoDB μ—°κ²° 및 κΈ°λ³Έ 데이터 μ €μž₯ + +**Tasks**: +- [ ] MongoDB μ»¨ν…Œμ΄λ„ˆ μΆ”κ°€ +- [ ] Consoleκ³Ό Users μ„œλΉ„μŠ€ DB μ—°κ²° +- [ ] κΈ°λ³Έ 데이터 λͺ¨λΈ 생성 +- [ ] μ‹€μ œ 데이터 CRUD ν…ŒμŠ€νŠΈ + +### Step 4: Frontend Skeleton (Week 2) +**λͺ©ν‘œ**: μ΅œμ†Œν•œμ˜ UI ꡬ성 + +**Tasks**: +- [ ] Console Frontend 생성 (React + Vite) +- [ ] κΈ°λ³Έ λ ˆμ΄μ•„μ›ƒ +- [ ] μ„œλΉ„μŠ€ μƒνƒœ ν‘œμ‹œ +- [ ] Nginx μ„€μ • + +### Step 5: Authentication Basic (Week 2) +**λͺ©ν‘œ**: κ°„λ‹¨ν•œ 인증 μ‹œμŠ€ν…œ + +**Tasks**: +- [ ] JWT 토큰 생성 +- [ ] Login endpoint +- [ ] Token 검증 미듀웨어 +- [ ] Protected routes + +### Step 6: Second Service (Week 3) +**λͺ©ν‘œ**: 두 번째 μ„œλΉ„μŠ€ μΆ”κ°€λ‘œ νŒ¨ν„΄ 확립 + +**Tasks**: +- [ ] OAuth λ˜λŠ” Images μ„œλΉ„μŠ€ μΆ”κ°€ +- [ ] Console λΌμš°νŒ… ν™•μž₯ +- [ ] μ„œλΉ„μŠ€ κ°„ 톡신 νŒ¨ν„΄ 확립 +- [ ] Service registry 기초 + +### Step 7: Service Communication (Week 3) +**λͺ©ν‘œ**: μ„œλΉ„μŠ€ κ°„ 톡신 νŒ¨ν„΄ κ΅¬ν˜„ + +**Tasks**: +- [ ] Redis pub/sub μ„€μ • +- [ ] Event 기반 톡신 예제 +- [ ] Service discovery κ΅¬ν˜„ +- [ ] Health check μžλ™ν™” + +### Step 8: Gradual Service Addition (Week 4-5) +**λͺ©ν‘œ**: λ‚˜λ¨Έμ§€ μ„œλΉ„μŠ€ 점진적 μΆ”κ°€ + +**각 μ„œλΉ„μŠ€λ³„λ‘œ**: +- [ ] κΈ°λ³Έ ꡬ쑰 생성 +- [ ] Console μ—°κ²° +- [ ] 핡심 API κ΅¬ν˜„ +- [ ] Frontend μ»΄ν¬λ„ŒνŠΈ μΆ”κ°€ + +## ν˜„μž¬ μ‹œμž‘μ  (NOW) + +### μ¦‰μ‹œ μ‹œμž‘ν•  수 μžˆλŠ” 첫 걸음 + +#### 1. μ΅œμ†Œ Docker ν™˜κ²½ ꡬ성 +```bash +# μ‹€ν–‰ λͺ…λ Ή +docker-compose up -d console +curl http://localhost:8000/health +``` + +#### 2. Console μ„œλΉ„μŠ€λ§ŒμœΌλ‘œ μ‹œμž‘ +- Health endpoint +- κ°„λ‹¨ν•œ API Gateway ꡬ쑰 +- μ„œλΉ„μŠ€ 등둝 μ€€λΉ„ + +#### 3. ν•˜λ‚˜μ”© μΆ”κ°€ν•˜λ©° ν…ŒμŠ€νŠΈ +- Users μ„œλΉ„μŠ€ ν•˜λ‚˜λ§Œ μΆ”κ°€ +- 톡신 확인 +- νŒ¨ν„΄ 확립 ν›„ ν™•μž₯ + +### 핡심 원칙 +1. **μž‘λ™ν•˜λŠ” μ½”λ“œ μš°μ„ ** - μ™„λ²½ν•œ 섀계보닀 λ™μž‘ν•˜λŠ” MVP +2. **점진적 λ³΅μž‘λ„** - κ°„λ‹¨ν•œ 것뢀터 μ‹œμž‘ν•΄μ„œ κΈ°λŠ₯ μΆ”κ°€ +3. **λΉ λ₯Έ ν”Όλ“œλ°±** - 각 λ‹¨κ³„λ§ˆλ‹€ μ‹€ν–‰ν•˜κ³  확인 +4. **νŒ¨ν„΄ 확립** - 첫 μ„œλΉ„μŠ€λ‘œ νŒ¨ν„΄μ„ λ§Œλ“€κ³  볡제 + +--- + +## 상세 κ΅¬ν˜„ κ³„νš (참고용) + +### Phase 1: Foundation Setup (Week 1) +#### Goals +- Set up project structure +- Configure Docker environment +- Establish basic infrastructure + +#### Tasks +- [ ] Initialize Git repository +- [ ] Create Docker Compose configuration +- [ ] Set up Nginx reverse proxy +- [ ] Configure MongoDB and Redis containers +- [ ] Create base directory structure for all services + +#### Deliverables +- Working Docker environment +- Basic networking between containers +- Database and cache ready + +### Phase 2: Console Service - Core (Week 2) +#### Goals +- Implement Console as API Gateway +- Set up authentication system +- Create service registry + +#### Tasks +- [ ] Console Backend + - [ ] FastAPI application setup + - [ ] JWT authentication implementation + - [ ] Service registry and discovery + - [ ] API routing mechanism + - [ ] Health check endpoints +- [ ] Console Frontend + - [ ] React + Vite setup + - [ ] Login/Register pages + - [ ] Admin dashboard layout + - [ ] Service status dashboard + +#### Deliverables +- Working authentication system +- Basic API Gateway functionality +- Service health monitoring dashboard + +### Phase 3: OAuth Service (Week 3) +#### Goals +- Centralized authentication service +- OAuth2 implementation +- User session management + +#### Tasks +- [ ] OAuth Backend + - [ ] OAuth2 server implementation + - [ ] Token generation and validation + - [ ] User authentication endpoints + - [ ] Integration with Console +- [ ] OAuth Frontend + - [ ] OAuth consent screens + - [ ] Token management UI + - [ ] Application registration + +#### Deliverables +- OAuth2 server +- Token-based authentication +- Integration with Console + +### Phase 4: Users Service (Week 4) +#### Goals +- User management microservice +- Profile management +- User data CRUD operations + +#### Tasks +- [ ] Users Backend + - [ ] User model and database schema + - [ ] CRUD APIs for user management + - [ ] Profile management endpoints + - [ ] Integration with OAuth service +- [ ] Users Frontend + - [ ] User list and search + - [ ] Profile editing interface + - [ ] User details view + +#### Deliverables +- Complete user management system +- Profile management features +- Admin user interface + +### Phase 5: Core Microservices (Weeks 5-6) +#### Goals +- Implement remaining core services +- Establish inter-service communication + +#### Services to Implement +1. **Images Service** + - Image upload/download + - Image processing + - Storage management + +2. **Applications Service** + - Application registration + - Configuration management + - Version control + +3. **Data Service** + - Data import/export + - Data transformation + - API for data access + +4. **Statistics Service** + - Metrics collection + - Analytics dashboard + - Report generation + +#### Tasks per Service +- [ ] Backend implementation + - [ ] Domain models + - [ ] Business logic + - [ ] REST APIs + - [ ] Event publishing +- [ ] Frontend implementation + - [ ] Service-specific UI + - [ ] Integration with Console + - [ ] Dashboard widgets + +### Phase 6: Integration & Testing (Week 7) +#### Goals +- End-to-end integration +- Performance optimization +- Security hardening + +#### Tasks +- [ ] Integration Testing + - [ ] Service communication tests + - [ ] Load testing + - [ ] Security testing +- [ ] Optimization + - [ ] Redis caching implementation + - [ ] Database indexing + - [ ] API response optimization +- [ ] Documentation + - [ ] API documentation (OpenAPI) + - [ ] Deployment guide + - [ ] Developer documentation + +#### Deliverables +- Fully integrated system +- Performance benchmarks +- Complete documentation + +### Phase 7: Monitoring & DevOps (Week 8) +#### Goals +- Production readiness +- Monitoring and alerting +- CI/CD pipeline + +#### Tasks +- [ ] Monitoring Setup + - [ ] Prometheus metrics + - [ ] Grafana dashboards + - [ ] Log aggregation (ELK stack) +- [ ] DevOps + - [ ] GitHub Actions CI/CD + - [ ] Automated testing + - [ ] Docker image optimization +- [ ] Production Configuration + - [ ] Environment variables + - [ ] Secrets management + - [ ] Backup strategies + +#### Deliverables +- Production-ready deployment +- Monitoring dashboards +- Automated deployment pipeline + +## Technical Implementation Details + +### Service Communication Flow +``` +Client Request β†’ Nginx β†’ Console (API Gateway) β†’ Microservice + ↓ + Authentication Check + ↓ + Request Routing + ↓ + Response Aggregation +``` + +### Database Strategy +``` +MongoDB Instance +β”œβ”€β”€ console_db # Console service data +β”œβ”€β”€ users_db # Users service data +β”œβ”€β”€ oauth_db # OAuth tokens and sessions +β”œβ”€β”€ images_db # Image metadata +β”œβ”€β”€ applications_db # Application data +β”œβ”€β”€ data_db # Generic data storage +└── statistics_db # Analytics data +``` + +### API Versioning Strategy +- All APIs follow `/api/v1/` pattern +- Version in URL path for major versions +- Header-based versioning for minor updates + +### Security Implementation +1. **Authentication Flow** + - User login β†’ OAuth service + - OAuth service issues JWT + - Console validates JWT on each request + - Console forwards validated requests to services + +2. **Service-to-Service Auth** + - Internal service tokens + - mTLS for production + - Network isolation via Docker networks + +### Development Workflow +1. **Local Development** + ```bash + docker-compose up -d [service-name] + docker-compose logs -f [service-name] + ``` + +2. **Testing** + ```bash + docker-compose exec [service-name] pytest + ``` + +3. **Deployment** + ```bash + docker-compose build + docker-compose up -d + ``` + +## Success Criteria +- [ ] All services independently deployable +- [ ] Console successfully routes to all services +- [ ] Authentication works across all services +- [ ] Health monitoring shows all services green +- [ ] Load testing shows <100ms p95 latency +- [ ] Zero downtime deployments possible + +## Risk Mitigation +1. **Service Failure**: Circuit breakers in Console +2. **Data Consistency**: Event sourcing for critical operations +3. **Performance**: Redis caching layer +4. **Security**: Regular security audits, dependency updates + +## Timeline Summary +- **Week 1**: Foundation and infrastructure +- **Week 2**: Console core implementation +- **Week 3**: OAuth service +- **Week 4**: Users service +- **Weeks 5-6**: Remaining microservices +- **Week 7**: Integration and testing +- **Week 8**: Monitoring and production setup + +## Next Steps +1. Review and approve plan +2. Set up Git repository +3. Begin Phase 1 implementation +4. Schedule weekly progress reviews \ No newline at end of file diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md new file mode 100644 index 0000000..098ed56 --- /dev/null +++ b/docs/PROGRESS.md @@ -0,0 +1,113 @@ +# Progress Tracking & Context Management + +## Purpose +이 νŒŒμΌμ€ Claude의 μ»¨ν…μŠ€νŠΈκ°€ λ¦¬μ…‹λ˜μ–΄λ„ λΉ λ₯΄κ²Œ ν˜„μž¬ μ§„ν–‰ 상황을 νŒŒμ•…ν•˜κ³  μ΄μ–΄μ„œ μž‘μ—…ν•  수 μžˆλ„λ‘ λ•λŠ” 체크포인트 λ¬Έμ„œμž…λ‹ˆλ‹€. + +## Current Status +- **Date Started**: 2025-09-09 +- **Current Phase**: Planning Complete +- **Next Action**: Step 1 - Minimal Foundation κ΅¬ν˜„ + +## Completed Checkpoints +βœ… Project structure planning (CLAUDE.md) +βœ… Implementation plan created (docs/PLAN.md) +βœ… Progressive approach defined + +## Active Working Files +``` +ν˜„μž¬ μž‘μ—… 쀑인 μ£Όμš” 파일: +- /docs/PLAN.md (κ΅¬ν˜„ κ³„νš) +- /CLAUDE.md (μ•„ν‚€ν…μ²˜ κ°€μ΄λ“œ) +- /docs/PROGRESS.md (이 파일) +``` + +## Next Immediate Steps +```bash +# λ‹€μŒ μž‘μ—… μ‹œμž‘ λͺ…λ Ή +# Step 1: Create docker-compose.yml +# Step 2: Create console/backend/main.py +# Step 3: Test with docker-compose up +``` + +## Code Snippets Ready to Use + +### 1. Minimal docker-compose.yml +```yaml +version: '3.8' +services: + console: + build: ./console/backend + ports: + - "8000:8000" + environment: + - ENV=development +``` + +### 2. Console main.py starter +```python +from fastapi import FastAPI +app = FastAPI(title="Console API Gateway") + +@app.get("/health") +async def health(): + return {"status": "healthy", "service": "console"} +``` + +## Important Decisions Made +1. **Architecture**: API Gateway Pattern with Console as orchestrator +2. **Tech Stack**: FastAPI + React + MongoDB + Redis + Docker +3. **Approach**: Progressive implementation (simple to complex) +4. **First Service**: Users service after Console + +## Questions to Ask When Resuming +μƒˆλ‘œμš΄ μ„Έμ…˜μ—μ„œ μ΄μ–΄μ„œ μž‘μ—…ν•  λ•Œ 확인할 사항: +1. "PROGRESS.md νŒŒμΌμ„ ν™•μΈν–ˆλ‚˜μš”?" +2. "λ§ˆμ§€λ§‰μœΌλ‘œ μ™„λ£Œν•œ Step은 λ¬΄μ—‡μΈκ°€μš”?" +3. "ν˜„μž¬ μ—λŸ¬λ‚˜ λΈ”λ‘œν‚Ή μ΄μŠˆκ°€ μžˆλ‚˜μš”?" + +## Git Commits Pattern +각 Step μ™„λ£Œ μ‹œ 컀밋 λ©”μ‹œμ§€: +``` +Step X: [κ°„λ‹¨ν•œ μ„€λͺ…] +- κ΅¬ν˜„ λ‚΄μš© 1 +- κ΅¬ν˜„ λ‚΄μš© 2 +``` + +## Directory Structure Snapshot +``` +site11/ +β”œβ”€β”€ CLAUDE.md βœ… Created +β”œβ”€β”€ docs/ +β”‚ β”œβ”€β”€ PLAN.md βœ… Created +β”‚ └── PROGRESS.md βœ… Created (this file) +β”œβ”€β”€ console/ πŸ”„ Next +β”‚ └── backend/ +β”‚ └── main.py +└── docker-compose.yml πŸ”„ Next +``` + +## Context Recovery Commands +μƒˆ μ„Έμ…˜μ—μ„œ λΉ λ₯΄κ²Œ 상황 νŒŒμ•…ν•˜κΈ°: +```bash +# 1. ν˜„μž¬ ꡬ쑰 확인 +ls -la + +# 2. μ§„ν–‰ 상황 확인 +cat docs/PROGRESS.md + +# 3. λ‹€μŒ 단계 확인 +grep "Step" docs/PLAN.md | head -5 + +# 4. μ‹€ν–‰ 쀑인 μ»¨ν…Œμ΄λ„ˆ 확인 +docker ps +``` + +## Error Log +문제 λ°œμƒ μ‹œ 여기에 기둝: +- (아직 μ—†μŒ) + +## Notes for Next Session +- Step 1λΆ€ν„° μ‹œμž‘ +- docker-compose.yml 생성 ν•„μš” +- console/backend/main.py 생성 ν•„μš” +- λͺ¨λ“  λ¬Έμ„œ νŒŒμΌμ€ λŒ€λ¬Έμž.md ν˜•μ‹μœΌλ‘œ 생성 (예: README.md, SETUP.md) \ No newline at end of file