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:
31
api/app/main.py
Normal file
31
api/app/main.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from contextlib import asynccontextmanager
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from .config import settings
|
||||
from .db import init_db
|
||||
from .routers import meetings as meetings_router
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
await init_db()
|
||||
yield
|
||||
|
||||
|
||||
app = FastAPI(title="MeetNote API", version="0.1.0", lifespan=lifespan)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=settings.cors_origins_list,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
app.include_router(meetings_router.router)
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
async def health():
|
||||
return {"ok": True, "service": "meetnote-api", "version": "0.1.0"}
|
||||
Reference in New Issue
Block a user