2.0 KiB
2.0 KiB
AGENTS.md
Scope
- This repo uses
backend/app/for the backend andfrontend/for the Vite React app.
Real Entrypoints
- Current backend app entrypoint is
backend/app/main.py, exportingappfromapp.api.main. - Current backend dev start command is
python -m uvicorn app.main:app --reloadwithPYTHONPATH=backend. dev.sh start api --foregroundis the repo script flow that encodes the expected backend startup behavior.- Frontend dev server is
frontendVite on port5173, proxying/apitohttp://localhost:8000.
Commands
- Backend install:
pip install -r backend/requirements.txt - Backend run from repo root:
PYTHONPATH=backend uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload - Frontend install:
cd frontend && npm install - Frontend dev:
cd frontend && npm run dev - Frontend build:
cd frontend && npm run build - Frontend lint:
cd frontend && npm run lint
Infra And Env
- Backend settings load from root
.env, notbackend/.env, becausebackend/app/config/settings.pyusesenv_file = ".env". - Docker infra is defined in
docker/docker-compose.yml; it starts Milvus, MinIO, Redis, and PostgreSQL. - Default local service ports: Milvus
19530, MinIO9000/9001, Redis6379, PostgreSQL5432, backend8000, frontend5173. - LLM base URLs in
.env.examplepoint at a shared remote gateway (http://6.86.80.4:30080/v1); do not assume offline/local-only LLM execution.
Verification
- Root pytest config in
pyproject.tomlpoints at roottests/, and those tests import frombackend/appviaPYTHONPATHsetup. - For frontend-only changes, run
npm run lintandnpm run buildinfrontend. - For backend changes, prefer focused import/startup verification against
backend/app, and run roottests/when the environment supports it.
Gotchas
- Backend settings load from root
.env, notbackend/.env, becausebackend/app/config/settings.pyusesenv_file = ".env". - The root
pyproject.tomlis the active Python package manifest for the repo.