feat: Freelancer Match — полная продакшн версия с AI-матчингом и escrow

This commit is contained in:
root
2026-07-03 12:12:43 +00:00
commit ec2e9bf508
37 changed files with 1564 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
"""FastAPI приложение — Freelancer Match."""
import logging
from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.config import settings
from app.api.auth import router as auth_router
from app.api.projects import router as projects_router
from app.api.proposals import router as proposals_router
from app.api.ai import router as ai_router
from app.api.escrow import router as escrow_router
logging.basicConfig(level=logging.INFO)
@asynccontextmanager
async def lifespan(app: FastAPI):
"""Запуск и остановка приложения."""
logging.info("🚀 Freelancer Match starting...")
yield
logging.info("🛑 Freelancer Match shutting down.")
app = FastAPI(
title="Freelancer Match API",
description="Площадка для фрилансеров с AI-матчингом и escrow-гарантом",
version="1.0.0",
lifespan=lifespan,
)
# CORS
app.add_middleware(
CORSMiddleware,
allow_origins=settings.ALLOWED_ORIGINS,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Routes
app.include_router(auth_router)
app.include_router(projects_router)
app.include_router(proposals_router)
app.include_router(ai_router)
app.include_router(escrow_router)
@app.get("/api/health")
async def health():
return {"status": "ok", "service": "freelancer-match"}