Spaces:
Sleeping
Sleeping
Commit History
-
feat: add FastAPI backend (Phase 1 — feature/backend)
Fabio Antonini +1: Claude Sonnet 4.6New backend/ package with 35 REST endpoints: - config.py: pydantic-settings (DB, MinIO, JWT, Ollama, CORS) - database.py: async SQLAlchemy engine + session dependency - models/user.py: User, Organization, Role (admin/examiner/viewer) - models/project.py: Project, Document, Analysis ORM models - auth/password.py: bcrypt hash/verify - auth/jwt.py: access token (30min) + refresh token (7d) - auth/dependencies.py: get_current_user(), require_role() - routers/auth.py: POST /auth/login|refresh|logout - routers/users.py: CRUD /users/ + /users/me - routers/projects.py: CRUD /projects/ + document upload/delete - routers/analysis.py: POST /analysis/{htr,sig,ner,writer,grapho,pipeline,dating} - routers/rag.py: streaming SSE /rag/chat + doc management - storage/minio_client.py: async MinIO wrapper (anyio thread offload) - main.py: FastAPI app with CORS, lifespan, health check - Dockerfile: backend container image - .env.example: environment variable template Also: - requirements-backend.txt: fast…76f414d