feat: initial project setup with scenarios, database and web ui

Add complete mockupAWS platform for AWS cost estimation:
- FastAPI backend with scenario management
- PostgreSQL database schema for scenarios, metrics, logs
- AWS pricing table with real pricing data
- React frontend dashboard (planned)
- PII detection and token counting
- Report generation (PDF/CSV)
- Complete test suite with pytest
- Docker Compose setup
- Documentation: README, PRD, Architecture
- OpenCode configuration (.opencode/)
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-07 12:52:18 +02:00
parent b539134280
commit 59e5cf48f0
23 changed files with 2982 additions and 29 deletions

99
.opencode/opencode.json Normal file
View File

@@ -0,0 +1,99 @@
{
"project": {
"name": "mockupAWS",
"description": "Simulatore locale del backend AWS per LogWhispererAI - Profiler e Cost Estimator",
"type": "python-fastapi",
"version": "0.1.0"
},
"language": "it",
"tech_stack": {
"framework": "FastAPI",
"python_version": ">=3.11",
"key_dependencies": [
"fastapi>=0.110.0",
"pydantic>=2.7.0",
"tiktoken>=0.6.0",
"uvicorn>=0.29.0"
],
"dev_dependencies": [
"pytest>=8.1.1",
"httpx>=0.27.0"
],
"package_manager": "uv"
},
"architecture": {
"pattern": "layered",
"principles": [
"Safety First - Validazione integrità payload e sanitizzazione dati",
"Little Often - Processamento a piccoli batch",
"Double Check - Validazione finale prompt prima calcolo costi"
],
"components": [
{
"name": "Ingestion API",
"path": "src/main.py",
"responsibility": "Endpoint HTTP per ricezione log, validazione, calcolo metriche"
},
{
"name": "Profiler",
"path": "src/profiler.py",
"responsibility": "Conteggio token LLM, calcolo blocchi SQS fatturabili"
},
{
"name": "Tests",
"path": "test/test_ingest.py",
"responsibility": "Test TDD per metriche, validazione payload, token count"
}
]
},
"development": {
"methodology": "TDD",
"workflow": "Spec-Driven",
"commit_style": "Conventional Commits",
"git_strategy": "feature-branch"
},
"conventions": {
"code_style": "PEP8",
"naming": {
"functions": "snake_case",
"classes": "PascalCase",
"constants": "UPPER_CASE"
},
"imports": [
"Importare sempre prima le librerie standard",
"Poi le librerie di terze parti",
"Infine i moduli locali"
]
},
"aws_simulation": {
"services": [
{
"name": "SQS",
"billing_block_size": "64KB (65536 bytes)",
"metric": "sqs_billing_blocks"
},
{
"name": "Lambda",
"metric": "lambda_simulated_invocations"
},
{
"name": "Bedrock/LLM",
"tokenizer": "cl100k_base",
"metric": "llm_estimated_input_tokens"
}
]
},
"export_files": {
"prd": "export/prd.md",
"architecture": "export/architecture.md",
"kanban": "export/kanban.md",
"progress": "export/progress.md",
"githistory": "export/githistory.md"
},
"commands": {
"install": "uv sync",
"run": "uv run uvicorn src.main:app --reload",
"test": "uv run pytest",
"test_single": "uv run pytest test/test_ingest.py::test_name -v"
}
}