feat: initial Skeen-CRM AI Agent architecture

- FastAPI + Python 3.12 backend
- Meta WhatsApp Business API client (official)
- OpenAI GPT-4o with function calling
- RAG vector store with pgvector
- ERPNext Frappe REST client
- Celery + Redis async task queue
- PostgreSQL with migrations (Alembic)
- Docker Compose full stack
- Enterprise logging, metrics, health checks
This commit is contained in:
root
2026-04-29 05:30:59 +00:00
commit d30b22b50c
44 changed files with 3603 additions and 0 deletions

102
pyproject.toml Normal file
View File

@@ -0,0 +1,102 @@
[project]
name = "skeen-crm-agent"
version = "0.1.0"
description = "SKEEN CRM AI Agent for WhatsApp Business API + ERPNext"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
# Web Framework
"fastapi>=0.111.0",
"uvicorn[standard]>=0.30.0",
"python-multipart>=0.0.9",
"python-jose[cryptography]>=3.3.0",
"passlib[bcrypt]>=1.7.4",
"httpx[http2]>=0.27.0",
"tenacity>=8.3.0",
# Database
"sqlalchemy[asyncio]>=2.0.30",
"asyncpg>=0.29.0",
"sqlmodel>=0.0.19",
"alembic>=1.13.0",
"pgvector>=0.2.5",
# Redis & Celery
"redis>=5.0.0",
"celery>=5.4.0",
# AI / LLM
"openai>=1.30.0",
"tiktoken>=0.7.0",
# Configuration & Validation
"pydantic>=2.7.0",
"pydantic-settings>=2.2.0",
"email-validator>=2.1.0",
# Observability
"structlog>=24.1.0",
"prometheus-client>=0.20.0",
"asgi-correlation-id>=4.3.0",
# Utilities
"orjson>=3.10.0",
"python-dateutil>=2.9.0",
"pendulum>=3.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.2.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=5.0.0",
"httpx>=0.27.0",
"respx>=0.21.0",
"ruff>=0.4.0",
"mypy>=1.10.0",
"pre-commit>=3.7.0",
"types-python-dateutil>=2.9.0",
"types-passlib>=1.7.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
target-version = "py312"
line-length = 100
select = [
"E", "F", "W", "I", "N", "D", "UP", "B", "C4", "SIM", "ARG",
"PTH", "ERA", "RUF", "ASYNC", "S", "C90",
]
ignore = ["D100", "D104", "D107", "S101"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v --tb=short --strict-markers"
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests",
]
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/migrations/*"]
[tool.coverage.report]
precision = 2
fail_under = 80