refactor: rename Wizamart to Orion across entire codebase
Replace all ~1,086 occurrences of Wizamart/wizamart/WIZAMART/WizaMart with Orion/orion/ORION across 184 files. This includes database identifiers, email addresses, domain references, R2 bucket names, DNS prefixes, encryption salt, Celery app name, config defaults, Docker configs, CI configs, documentation, seed data, and templates. Renames homepage-wizamart.html template to homepage-orion.html. Fixes duplicate file_pattern key in api.yaml architecture rule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ Complete guide to the multi-tenant architecture supporting custom domains, subdo
|
||||
|
||||
## Overview
|
||||
|
||||
The Wizamart platform supports **three deployment modes** for multi-tenancy, allowing each store to have their own isolated shop while sharing the same application instance and database.
|
||||
The Orion platform supports **three deployment modes** for multi-tenancy, allowing each store to have their own isolated shop while sharing the same application instance and database.
|
||||
|
||||
**Key Concept**: One application, multiple isolated store shops, each accessible via different URLs.
|
||||
|
||||
@@ -148,15 +148,15 @@ For path-based routing, clean paths are extracted:
|
||||
|
||||
**Path-Based Shop Routes** (Development):
|
||||
```
|
||||
Original: /stores/WIZAMART/shop/products
|
||||
Extracted: store_code = "WIZAMART"
|
||||
Original: /stores/ORION/shop/products
|
||||
Extracted: store_code = "ORION"
|
||||
Clean: /shop/products
|
||||
```
|
||||
|
||||
**Store Dashboard Routes** (All environments):
|
||||
```
|
||||
Original: /store/WIZAMART/dashboard
|
||||
Extracted: store_code = "WIZAMART"
|
||||
Original: /store/ORION/dashboard
|
||||
Extracted: store_code = "ORION"
|
||||
Clean: /dashboard
|
||||
```
|
||||
|
||||
@@ -197,13 +197,13 @@ CREATE TABLE store_domains (
|
||||
```sql
|
||||
-- Stores
|
||||
INSERT INTO stores (code, name) VALUES
|
||||
('wizamart', 'Wizamart Shop'),
|
||||
('orion', 'Orion Shop'),
|
||||
('techstore', 'Tech Store'),
|
||||
('fashionhub', 'Fashion Hub');
|
||||
|
||||
-- Custom Domains
|
||||
INSERT INTO store_domains (store_id, domain) VALUES
|
||||
(1, 'wizamart.com'),
|
||||
(1, 'orion.lu'),
|
||||
(2, 'mytechstore.net');
|
||||
```
|
||||
|
||||
@@ -421,16 +421,16 @@ Host: customdomain.com
|
||||
**Request**:
|
||||
```http
|
||||
GET /shop/products HTTP/1.1
|
||||
Host: wizamart.myplatform.com
|
||||
Host: orion.myplatform.com
|
||||
```
|
||||
|
||||
**Processing**:
|
||||
```
|
||||
1. StoreContextMiddleware
|
||||
- Checks: host != "myplatform.com"
|
||||
- Extracts: subdomain = "wizamart"
|
||||
- Queries: stores WHERE code = "wizamart"
|
||||
- Sets: request.state.store = <Store "wizamart">
|
||||
- Extracts: subdomain = "orion"
|
||||
- Queries: stores WHERE code = "orion"
|
||||
- Sets: request.state.store = <Store "orion">
|
||||
|
||||
2-4. Same as Example 1
|
||||
```
|
||||
@@ -439,7 +439,7 @@ Host: wizamart.myplatform.com
|
||||
|
||||
**Request**:
|
||||
```http
|
||||
GET /stores/WIZAMART/shop/products HTTP/1.1
|
||||
GET /stores/ORION/shop/products HTTP/1.1
|
||||
Host: myplatform.com
|
||||
```
|
||||
|
||||
@@ -447,15 +447,15 @@ Host: myplatform.com
|
||||
```
|
||||
1. StoreContextMiddleware
|
||||
- Checks: path starts with "/store/"
|
||||
- Extracts: code = "WIZAMART"
|
||||
- Queries: stores WHERE code = "WIZAMART"
|
||||
- Extracts: code = "ORION"
|
||||
- Queries: stores WHERE code = "ORION"
|
||||
- Sets: request.state.store = <Store>
|
||||
- Sets: request.state.clean_path = "/shop/products"
|
||||
|
||||
2. FastAPI Router
|
||||
- Routes registered with prefix: /stores/{store_code}/shop
|
||||
- Matches: /stores/WIZAMART/shop/products
|
||||
- store_code path parameter = "WIZAMART"
|
||||
- Matches: /stores/ORION/shop/products
|
||||
- store_code path parameter = "ORION"
|
||||
|
||||
3-4. Same as previous examples (Context, Theme middleware)
|
||||
```
|
||||
@@ -491,9 +491,9 @@ def test_shop_page_multi_tenant(client):
|
||||
# Test subdomain routing
|
||||
response = client.get(
|
||||
"/shop/products",
|
||||
headers={"Host": "wizamart.platform.com"}
|
||||
headers={"Host": "orion.platform.com"}
|
||||
)
|
||||
assert "Wizamart" in response.text
|
||||
assert "Orion" in response.text
|
||||
|
||||
# Test different store
|
||||
response = client.get(
|
||||
|
||||
Reference in New Issue
Block a user