- Layered Architecture를 따르는 디렉토리 파일 구조 문서
계층 |
디렉토리 위치 |
설명 |
Presentation |
app/api/ |
FastAPI 라우터, 사용자 요청/응답 |
Application (Service) |
app/service/ |
비즈니스 로직 |
Business (Domain) |
app/domain/ |
도메인 로직 |
Persistence, Database
|
app/infrastructure/ |
DB 연결, 세션 설정 |
- |
app/core/ , app/common/
|
공통 |
- |
app/tmp/ |
임시 파일 |
- |
tests/ |
테스트 코드 |
app/
├─api/
│ ├─routes/ # Presentation
│ │ └─v1/
│ │ ├─auth.py
│ │ └─translate.py
│ └─deps.py # 의존성 주입
├─service/ # Application
│ ├─UserService.py
│ ├─AuthService.py
│ ├─RegisterService.py
│ ├─PaperService.py
│ ├─FileService.py
│ ├─TranslateService.py
│ ├─EmailService.py
│ ├─FormService.py
│ ├─SmtpService.py
│ ├─LoggerService.py
│ ├─StatusService.py
│ └─RecordService.py
├─domain/ # Business
│ ├─User.py
│ ├─Auth.py
│ ├─Register.py
│ ├─Paper.py
│ ├─File.py
│ ├─Translate.py
│ ├─Email.py
│ ├─Form.py
│ ├─Smtp.py
│ ├─Logger.py
│ ├─Status.py
│ └─Record.py
├─infrastructure/ # Persistence, Database
│ ├─db/
│ │ ├─conn.py # session.py
│ │ ├─crud.py
│ │ └─schema.py
│ ├─UserRepository.py
│ ├─AuthRepository.py
│ ├─RegisterRepository.py
│ ├─PaperRepository.py
│ ├─TranslateRepository.py
│ ├─EmailRepository.py
│ ├─SmtpRepository.py
│ └─LoggerRepository.py
├─core/
│ ├─config.py
│ ├─lifespan.py
│ ├─middlewares.py
│ ├─Security.py
│ ├─Request.py
│ ├─Response.py
│ └─Exceptions.py
├─common/ # 유틸성 함수
│ ├─const.py
│ ├─Masking.py
│ ├─Generator.py
│ ├─Validator.py
│ ├─Attachment.py
│ ├─Prompt.py
│ └─Prompts/
│ └─[시스템 프롬프트]
└─tmp/
├─docs/
│ └─[문서]
└─videos/
└─[영상]
tests/
└─[테스트 코드 및 테스트용 파일]
main.py
models.py
requirements.txt
README.md
docker-compose.yml
Dockerfile
init.sql
pytest.ini
.env
.gitignore
.github/
└─workflows/
└─test.yml