Add Mago4 demo ERP with Python FastAPI

Implements a working in-memory ERP demo inspired by Mago4, covering
the core modules: dashboard with KPI widgets, customers, suppliers,
products, sales orders, purchase orders, and warehouse inventory.

- FastAPI backend with Pydantic models and REST API (auto-docs at /docs)
- Jinja2 HTML templates with Mago4-style UI (dark sidebar, blue/orange/
  green/red palette, Material Design icons)
- In-memory fake database seeded with sample customers, suppliers,
  products, and orders — ready to swap for SQLAlchemy + SQL Server
- Workarounds for Python 3.14 + Starlette 1.3 / Jinja2 compatibility
  (cache_size=0, new TemplateResponse(request, name, ctx) signature)
- launch.json for one-click preview; run.bat for manual startup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 10:17:57 +02:00
co-authored by Claude Sonnet 4.6
parent 714617a52e
commit 8a9fb5085a
19 changed files with 2835 additions and 412 deletions
+29
View File
@@ -0,0 +1,29 @@
# Mago4 Demo Configuration
# Questo file può essere usato per estendere la configurazione
[Database]
TYPE=in-memory
# Per SQL Server: mssql+pyodbc://user:password@server/dbname?driver=ODBC+Driver+17+for+SQL+Server
# Per PostgreSQL: postgresql://user:password@localhost/dbname
# Per SQLite: sqlite:///./mago4.db
[Server]
HOST=127.0.0.1
PORT=8000
DEBUG=True
RELOAD=True
[Features]
ENABLE_AUTH=False
ENABLE_PDF_EXPORT=False
ENABLE_EMAIL_NOTIFICATIONS=False
ENABLE_MULTICOMPANY=False
[Pagination]
DEFAULT_PAGE_SIZE=20
MAX_PAGE_SIZE=100
[Validation]
MIN_CREDIT_LIMIT=1000
MIN_PAYMENT_TERMS=1
MAX_REORDER_QUANTITY=10000