-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllms-full.txt
More file actions
31 lines (25 loc) · 1.36 KB
/
llms-full.txt
File metadata and controls
31 lines (25 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Flowfull Python Starter — Full guide for LLMs
Architecture:
- FastAPI (`app/main.py`), CORS, startup/shutdown events.
- Auth: `app/lib/auth/bridge_validator.py` (Flowless), `middleware.py` (`require_auth`, `optional_auth`, `require_user_type`).
- DB: `app/lib/database/connection.py` (AsyncEngine, AsyncSession), dialect auto-detection.
- Routes: `app/routes/api.py`, `app/routes/health.py`.
- Models: `app/models/user.py`.
Configuration:
- `.env` with `DATABASE_URL`, `FLOWLESS_API_URL`, `BRIDGE_VALIDATION_SECRET`, `AUTH_VALIDATION_MODE`, CORS, optional `REDIS_URL`.
- Migrations via Alembic.
Patterns:
- Bridge Validation uses `POST /auth/bridge/validate` with `X-Bridge-Secret`.
- Hybrid cache: in-memory LRU with optional Redis.
- User responses via `UserResponse` (includes optional `last_name`).
- Admin-only for `/api/v1/users`, `/api/v1/users/{user_id}`, `/api/v1/admin/users`.
Best practices:
- Avoid reserved names (e.g., `metadata` in SQLAlchemy models; use `user_metadata`).
- Use `structlog` for error handling and Pydantic for responses.
- On Windows, prefer `--host 127.0.0.1` or add firewall rule when using `0.0.0.0`.
Requests to the LLM should:
- Maintain project style and conventions.
- Avoid unnecessary dependencies.
- Propose minimal, safe changes.
- Include concrete commands to try changes when possible.
Quick references: see `docs/` for friendly guides.