feat(api): A3 backend skeleton with FastAPI + SQLModel

- 3 tables: Meeting / TranscriptSegment / Summary (with state machine)
- Routes: /api/upload-url + /api/upload-complete + meetings CRUD
- MinIO presigned PUT for direct browser upload
- BackgroundTasks state-machine stub for A5 to flesh out
- SQLite for local dev, PostgreSQL+asyncpg for prod
- CORS configured for frontend on 4490

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 19:14:16 +08:00
parent 4f064bb470
commit 3111c854c5
7 changed files with 272 additions and 0 deletions

38
api/app/schemas.py Normal file
View File

@@ -0,0 +1,38 @@
from datetime import datetime
from typing import Optional
from pydantic import BaseModel
from .models import MeetingStatus
class UploadUrlRequest(BaseModel):
filename: str
content_type: str = "audio/mp4"
title: Optional[str] = None
participants: Optional[str] = None
class UploadUrlResponse(BaseModel):
meeting_id: int
upload_url: str
object_key: str
class UploadCompleteRequest(BaseModel):
meeting_id: int
file_size: int
class MeetingRead(BaseModel):
id: int
title: str
participants: Optional[str] = None
duration: Optional[int] = None
file_size: Optional[int] = None
status: MeetingStatus
chunks_done: int
chunks_total: int
error: Optional[str] = None
created_at: datetime
class Config:
from_attributes = True