refactor: remove all backward compatibility code across 70 files
Some checks failed
Some checks failed
Clean up 28 backward compatibility instances identified in the codebase. The app is not live, so all shims are replaced with the target architecture: - Remove legacy Inventory.location column (use bin_location exclusively) - Remove dashboard _extract_metric_value helper (use flat metrics dict) - Remove legacy stat field duplicates (total_stores, total_imports, etc.) - Remove 13 re-export shims and class aliases across modules - Remove module-enabling JSON fallback (use PlatformModule junction table) - Remove menu_to_legacy_format() conversion (return dataclasses directly) - Remove title/description from MarketplaceProductBase schema - Clean billing convenience method docstrings - Clean test fixtures and backward-compat comments - Add PlatformModule seeding to init_production.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -54,7 +54,7 @@ Complete step-by-step guide for deploying Orion on a Hetzner Cloud VPS.
|
||||
|
||||
**Deferred (not urgent, do when all platforms ready):**
|
||||
|
||||
- [ ] DNS A + AAAA records for platform domains (`oms.lu`, `rewardflow.lu`)
|
||||
- [ ] DNS A + AAAA records for platform domains (`omsflow.lu`, `rewardflow.lu`)
|
||||
- [ ] Uncomment platform domains in Caddyfile after DNS propagation
|
||||
|
||||
!!! success "Progress — 2026-02-14"
|
||||
@@ -63,7 +63,7 @@ Complete step-by-step guide for deploying Orion on a Hetzner Cloud VPS.
|
||||
- **Wizamart → Orion rename** — 1,086 occurrences replaced across 184 files (database identifiers, email addresses, domains, config, templates, docs, seed data)
|
||||
- Template renamed: `homepage-wizamart.html` → `homepage-orion.html`
|
||||
- **Production DB rebuilt from scratch** with Orion naming (`orion_db`, `orion_user`)
|
||||
- Platform domains configured in seed data: wizard.lu (main), oms.lu, rewardflow.lu (loyalty)
|
||||
- Platform domains configured in seed data: wizard.lu (main), omsflow.lu, rewardflow.lu (loyalty)
|
||||
- Docker volume explicitly named `orion_postgres_data`
|
||||
- `.dockerignore` added — prevents `.env` from being baked into Docker images
|
||||
- `env_file: .env` added to `docker-compose.yml` — containers load host env vars properly
|
||||
@@ -438,7 +438,7 @@ Before setting up Caddy, point your domain's DNS to the server.
|
||||
| A | `git` | `91.99.65.229` | 300 |
|
||||
| A | `flower` | `91.99.65.229` | 300 |
|
||||
|
||||
### oms.lu (OMS Platform) — TODO
|
||||
### omsflow.lu (OMS Platform) — TODO
|
||||
|
||||
| Type | Name | Value | TTL |
|
||||
|---|---|---|---|
|
||||
@@ -470,7 +470,7 @@ It should match the value in the Hetzner Cloud Console (Networking tab). Then cr
|
||||
| AAAA | `git` | `2a01:4f8:1c1a:b39c::1` | 300 |
|
||||
| AAAA | `flower` | `2a01:4f8:1c1a:b39c::1` | 300 |
|
||||
|
||||
Repeat for `oms.lu` and `rewardflow.lu`.
|
||||
Repeat for `omsflow.lu` and `rewardflow.lu`.
|
||||
|
||||
!!! tip "DNS propagation"
|
||||
Set TTL to 300 (5 minutes) initially. DNS changes can take up to 24 hours to propagate globally, but usually complete within 30 minutes. Verify with: `dig api.wizard.lu +short`
|
||||
@@ -502,14 +502,14 @@ www.wizard.lu {
|
||||
redir https://wizard.lu{uri} permanent
|
||||
}
|
||||
|
||||
# ─── Platform 2: OMS (oms.lu) ───────────────────────────────
|
||||
# Uncomment after DNS is configured for oms.lu
|
||||
# oms.lu {
|
||||
# ─── Platform 2: OMS (omsflow.lu) ───────────────────────────────
|
||||
# Uncomment after DNS is configured for omsflow.lu
|
||||
# omsflow.lu {
|
||||
# reverse_proxy localhost:8001
|
||||
# }
|
||||
#
|
||||
# www.oms.lu {
|
||||
# redir https://oms.lu{uri} permanent
|
||||
# www.omsflow.lu {
|
||||
# redir https://omsflow.lu{uri} permanent
|
||||
# }
|
||||
|
||||
# ─── Platform 3: Loyalty+ (rewardflow.lu) ──────────────────
|
||||
@@ -537,14 +537,14 @@ flower.wizard.lu {
|
||||
```
|
||||
|
||||
!!! info "How multi-platform routing works"
|
||||
All platform domains (`wizard.lu`, `oms.lu`, `rewardflow.lu`) point to the **same FastAPI backend** on port 8001. The `PlatformContextMiddleware` reads the `Host` header to detect which platform the request is for. Caddy preserves the Host header by default, so no extra configuration is needed.
|
||||
All platform domains (`wizard.lu`, `omsflow.lu`, `rewardflow.lu`) point to the **same FastAPI backend** on port 8001. The `PlatformContextMiddleware` reads the `Host` header to detect which platform the request is for. Caddy preserves the Host header by default, so no extra configuration is needed.
|
||||
|
||||
The `domain` column in the `platforms` database table must match:
|
||||
|
||||
| Platform | code | domain |
|
||||
|---|---|---|
|
||||
| Main | `main` | `wizard.lu` |
|
||||
| OMS | `oms` | `oms.lu` |
|
||||
| OMS | `oms` | `omsflow.lu` |
|
||||
| Loyalty+ | `loyalty` | `rewardflow.lu` |
|
||||
|
||||
Start Caddy:
|
||||
@@ -588,17 +588,17 @@ cd ~/gitea && docker compose up -d gitea
|
||||
|
||||
Stores on each platform use two routing modes:
|
||||
|
||||
- **Standard (subdomain)**: `acme.oms.lu` — included in the base subscription
|
||||
- **Standard (subdomain)**: `acme.omsflow.lu` — included in the base subscription
|
||||
- **Premium (custom domain)**: `acme.lu` — available with premium subscription tiers
|
||||
|
||||
Both modes are handled by the `StoreContextMiddleware` which reads the `Host` header, so Caddy just needs to forward requests and preserve the header.
|
||||
|
||||
#### Wildcard Subdomains (for store subdomains)
|
||||
|
||||
When stores start using subdomains like `acme.oms.lu`, add wildcard blocks:
|
||||
When stores start using subdomains like `acme.omsflow.lu`, add wildcard blocks:
|
||||
|
||||
```caddy
|
||||
*.oms.lu {
|
||||
*.omsflow.lu {
|
||||
reverse_proxy localhost:8001
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ docker stats --no-stream
|
||||
|---|---|---|---|
|
||||
| Orion API | 8000 | 8001 | `api.wizard.lu` |
|
||||
| Main Platform | 8000 | 8001 | `wizard.lu` |
|
||||
| OMS Platform | 8000 | 8001 | `oms.lu` (TODO) |
|
||||
| OMS Platform | 8000 | 8001 | `omsflow.lu` (TODO) |
|
||||
| Loyalty+ Platform | 8000 | 8001 | `rewardflow.lu` (TODO) |
|
||||
| PostgreSQL | 5432 | 5432 | (internal only) |
|
||||
| Redis | 6379 | 6380 | (internal only) |
|
||||
@@ -1250,7 +1250,7 @@ After Caddy is configured:
|
||||
| Gitea | `https://git.wizard.lu` |
|
||||
| Flower | `https://flower.wizard.lu` |
|
||||
| Grafana | `https://grafana.wizard.lu` |
|
||||
| OMS Platform | `https://oms.lu` (after DNS) |
|
||||
| OMS Platform | `https://omsflow.lu` (after DNS) |
|
||||
| Loyalty+ Platform | `https://rewardflow.lu` (after DNS) |
|
||||
|
||||
Direct IP access (temporary, until firewall rules are removed):
|
||||
|
||||
Reference in New Issue
Block a user