feat: initialiser le projet CVP (Next.js 14 + FastAPI + PostgreSQL)
- Frontend : Next.js 14 App Router, TypeScript strict, Tailwind 3, shadcn/ui, next-intl (fr/en) - Backend : FastAPI, SQLAlchemy 2 async, Alembic, Pydantic 2, Python 3.11 - Infrastructure : Docker Compose (PostgreSQL 16 + Ollama) - Tooling : ESLint + Prettier (frontend), Ruff (backend), pytest - Structure complète des dossiers avec pages et routers placeholder
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import logging
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from app.api.routes import candidatures, cv, offres, parametres, profil
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
app = FastAPI(
|
||||
title="CVP API",
|
||||
description="API pour la recherche d'emploi intelligente",
|
||||
version="0.1.0",
|
||||
)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["http://localhost:3000"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
async def health_check() -> dict[str, str]:
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
app.include_router(offres.router, prefix="/api")
|
||||
app.include_router(profil.router, prefix="/api")
|
||||
app.include_router(cv.router, prefix="/api")
|
||||
app.include_router(candidatures.router, prefix="/api")
|
||||
app.include_router(parametres.router, prefix="/api")
|
||||
Reference in New Issue
Block a user