## 📦 프로젝트 전체 구조
openstack-ai-notice-chatbot/
├── 🚀 main.py # FastAPI 앱 진입점
│
├── ⚙️ core/
│ ├── config.py # Settings (DB · JWT · vLLM · SYSTEM_PROMPT)
│ ├── security.py # bcrypt + JWT 생성/검증
│ ├── auth.py # 쿠키 기반 optional/required 인증
│ ├── exception.py # 전역 예외 처리 (401→/login, 404→/, 500→error.html)
│ └── templates.py # Jinja2 설정
│
├── 🗄️ db/
│ ├── base_class.py
│ ├── base.py # 모든 모델 import 집결
│ └── session.py
│
├── 🧩 models/
│ ├── school_model.py
│ ├── department_model.py
│ ├── user_model.py
│ ├── notice_model.py # embedding 컬럼 (vector 1024) 포함
│ ├── chat_session_model.py
│ └── chat_message_model.py
│
├── 📨 schemas/
│ ├── user_schema.py
│ ├── school_schema.py
│ ├── notice_schema.py # NoticeOut · NoticeDetail (content 포함)
│ └── chat_schema.py
│
├── 🗂️ crud/
│ ├── user_crud.py
│ ├── school_crud.py
│ ├── notice_crud.py # RAG 검색 · 집계 · 최신 조회 포함
│ └── chat_crud.py
│
├── 🧭 api/
│ ├── routers.py # /api/auth · /api/schools · /api/notices · /api/chat
│ ├── pages.py # 페이지 라우터 5개
│ └── endpoints/
│ ├── user_endpoint.py # 회원가입 · 로그인 · 로그아웃 · 내 정보
│ ├── school_endpoint.py # 학교 목록 · 학과 목록
│ ├── notice_endpoint.py # 공지 목록 · 공지 상세
│ └── chat_endpoint.py # 채팅 · 세션 CRUD · RAG 파이프라인
│
├── 📄 templates/
│ ├── partials/ # 공통 레이아웃
│ │ ├── head_meta.html
│ │ ├── header.html
│ │ └── footer.html
│ ├── 🏠 home.html
│ ├── 🔐 login.html
│ ├── 📝 register.html
│ ├── 💬 chat.html
│ ├── 📢 notices.html
│ └── ⚠️ error.html
│
└── 🌐 static/
├── 🎨 css/
│ ├── common.css
│ ├── home.css
│ ├── login.css
│ ├── register.css
│ ├── chat.css
│ ├── notices.css
│ └── error.css
└── ⚙️ js/
├── apiClient.js # 공통 API 요청 · 401/422 처리
├── home.js
├── login.js
├── register.js
├── chat.js # 세션 CRUD · 로딩버블 · 예시버튼
└── notices.js # 필터 · 검색 · 모달 · 페이지네이션