fitness-web/app/main.py
Jacob Hinkle 1a2509ab34 Add Plan page with phase timeline and agent phase management API
- New /plan page shows all phases in order with current phase highlighted
- Add GET/POST/PUT /api/agent/phases endpoints for the AI coach
- Plan link added to navigation bar
- Agent config updated with phase management instructions
2026-06-29 10:51:28 -04:00

32 lines
940 B
Python

from pathlib import Path
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from contextlib import asynccontextmanager
from app.config import DATA_DIR
from app.routers import auth, dashboard, workouts, exercises, checkins, profile, chat, agent_api, plan
from scripts.schema import init_db
@asynccontextmanager
async def lifespan(app: FastAPI):
DATA_DIR.mkdir(parents=True, exist_ok=True)
await init_db()
yield
app = FastAPI(title="Fitness Web", lifespan=lifespan)
static_dir = Path(__file__).parent / "static"
app.mount("/static", StaticFiles(directory=str(static_dir)), name="static")
app.include_router(auth.router)
app.include_router(dashboard.router)
app.include_router(workouts.router)
app.include_router(exercises.router)
app.include_router(checkins.router)
app.include_router(profile.router)
app.include_router(chat.router)
app.include_router(agent_api.router)
app.include_router(plan.router)