dotb_ai-platform/.env.example
hungtran24 6577bb74be refactor: simplify scoring service, AI profile revisions and test suite
Phase 2 and 3 of the platform rework.

- Neutral request/response contract: external_id, metadata, X-AI-Key,
  run_id in the response; client-specific fields removed.
- AI profile is a revision table: saving creates an inactive revision,
  activation is separate, try-run does not store a run. One
  chat-completions gateway serves AIHub and OpenAI-compatible profiles.
- Add between and in rule operators.
- Contracts moved to contracts/lead-scoring/ with a score-response fixture.
- Admin Web updated for revisions, runs and the neutral fixture.
- Consolidate tests; remove rewrite_architect.md and the stale handoff doc;
  rewrite spec, CONTEXT and ARCHITECTURE for the current design.

Not verified: live AIHub/OpenAI behavior, Omni/EMS integration.
2026-10-09 08:23:21 +07:00

37 lines
2.0 KiB
Plaintext

# Example values for local development only. Do not use these credentials in staging/production.
# .env is ignored by Git. .env.test is local-only and must point to ai_platform_test.
# Compose interpolates this file; only explicitly listed environment entries reach containers.
# Docker Compose PostgreSQL (local only)
POSTGRES_USER=ai_platform
POSTGRES_PASSWORD=local-change-this-password
POSTGRES_DB=ai_platform
POSTGRES_PORT=55432
# Shared backend port for native Make commands and the Compose host mapping.
BACKEND_PORT=8000
WEB_PORT=3000
# Backend: read by ai_platform.infrastructure.config.settings.Settings (AI_PLATFORM_ prefix)
AI_PLATFORM_ENVIRONMENT=development
AI_PLATFORM_DATABASE_URL=postgresql+asyncpg://ai_platform:local-change-this-password@127.0.0.1:55432/ai_platform
AI_PLATFORM_ADMIN_COOKIE_SECURE=false
AI_PLATFORM_SESSION_TTL_SECONDS=28800
# Lead Scoring AI profile (provider, URL, model) is edited in Admin Web. AIHub profiles use the
# client key from the X-AI-Key request header; no server setting is needed.
# Optional server-only OpenAI-compatible endpoint for an openai_compatible profile.
# Run the backend natively when CLIProxy binds only to 127.0.0.1 on the host.
# Optional default OpenAI-compatible URL and key for this URL only.
# Admin Web may save another URL per AI profile; this key is never forwarded to other URLs.
# AI_PLATFORM_OPENAI_BASE_URL=http://127.0.0.1:8317
# Optional on local development loopback; configure separately before using a protected URL.
# AI_PLATFORM_OPENAI_API_KEY=
# Choose provider, URL and model in Admin Web Cấu hình AI; keys never go in the browser.
# Compose web origin only; native SvelteKit dev reads apps/web/.env.
WEB_ORIGIN=http://localhost:3000
# Web header label; set test only when the backend uses an isolated test database.
WEB_ENVIRONMENT=development
# Optional server-only key for the internal fixture runner; issue a separate test app.
# LEAD_SCORING_FIXTURE_APP_API_KEY=
# Do not place app keys, V-Keys, admin sessions or backend URLs in PUBLIC_* variables.