feat: Initial commit - Task Reporter incident response system

Complete implementation of the production line incident response system (生產線異常即時反應系統) including:

Backend (FastAPI):
- User authentication with AD integration and session management
- Chat room management (create, list, update, members, roles)
- Real-time messaging via WebSocket (typing indicators, reactions)
- File storage with MinIO (upload, download, image preview)

Frontend (React + Vite):
- Authentication flow with token management
- Room list with filtering, search, and pagination
- Real-time chat interface with WebSocket
- File upload with drag-and-drop and image preview
- Member management and room settings
- Breadcrumb navigation
- 53 unit tests (Vitest)

Specifications:
- authentication: AD auth, sessions, JWT tokens
- chat-room: rooms, members, templates
- realtime-messaging: WebSocket, messages, reactions
- file-storage: MinIO integration, file management
- frontend-core: React SPA structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
egg
2025-12-01 17:42:52 +08:00
commit c8966477b9
135 changed files with 23269 additions and 0 deletions

19
init_db.py Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env python3
"""Initialize database - create all tables"""
from app.core.database import engine, Base
from app.modules.auth.models import UserSession
from app.modules.chat_room.models import IncidentRoom, RoomMember, RoomTemplate
from app.modules.realtime.models import Message, MessageReaction, MessageEditHistory
from app.modules.file_storage.models import RoomFile
print("Creating database tables...")
Base.metadata.create_all(bind=engine)
print("✓ Database tables created successfully!")
print(f" - {UserSession.__tablename__}")
print(f" - {IncidentRoom.__tablename__}")
print(f" - {RoomMember.__tablename__}")
print(f" - {RoomTemplate.__tablename__}")
print(f" - {Message.__tablename__}")
print(f" - {MessageReaction.__tablename__}")
print(f" - {MessageEditHistory.__tablename__}")
print(f" - {RoomFile.__tablename__}")