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:
@@ -1,8 +1,8 @@
|
||||
# Wizamart Multi-Tenant URL Routing Guide
|
||||
# Orion Multi-Tenant URL Routing Guide
|
||||
|
||||
## Quick Answer
|
||||
|
||||
**How do customers access a store's storefront in Wizamart?**
|
||||
**How do customers access a store's storefront in Orion?**
|
||||
|
||||
There are three ways depending on the deployment mode:
|
||||
|
||||
@@ -13,8 +13,8 @@ There are three ways depending on the deployment mode:
|
||||
https://STORE_SUBDOMAIN.platform.com/storefront/products
|
||||
|
||||
Example:
|
||||
https://acme.wizamart.com/storefront/products
|
||||
https://techpro.wizamart.com/storefront/categories/electronics
|
||||
https://acme.orion.lu/storefront/products
|
||||
https://techpro.orion.lu/storefront/categories/electronics
|
||||
```
|
||||
|
||||
### 2. **CUSTOM DOMAIN MODE** (Production - Premium)
|
||||
@@ -39,7 +39,7 @@ http://localhost:8000/platforms/loyalty/stores/techpro/storefront/checkout
|
||||
|
||||
## Multi-Platform URL Routing
|
||||
|
||||
Wizamart supports multiple platforms (OMS, Loyalty, Site Builder), each with its own marketing site and store ecosystem.
|
||||
Orion supports multiple platforms (OMS, Loyalty, Site Builder), each with its own marketing site and store ecosystem.
|
||||
|
||||
### Platform URL Structure
|
||||
|
||||
@@ -61,8 +61,8 @@ Wizamart supports multiple platforms (OMS, Loyalty, Site Builder), each with its
|
||||
|
||||
| URL | What it serves |
|
||||
|-----|----------------|
|
||||
| `wizamart.lu/` | Main marketing site homepage |
|
||||
| `wizamart.lu/about` | Main marketing site about page |
|
||||
| `orion.lu/` | Main marketing site homepage |
|
||||
| `orion.lu/about` | Main marketing site about page |
|
||||
| `oms.lu/` | OMS platform homepage |
|
||||
| `oms.lu/pricing` | OMS platform pricing page |
|
||||
| `oms.lu/admin/` | Admin panel for OMS platform |
|
||||
@@ -138,7 +138,7 @@ Request arrives
|
||||
|
||||
| Platform | Code | Dev URL | Prod Domain |
|
||||
|----------|------|---------|-------------|
|
||||
| Main Marketing | `main` | `localhost:8000/` | `wizamart.lu` |
|
||||
| Main Marketing | `main` | `localhost:8000/` | `orion.lu` |
|
||||
| OMS | `oms` | `localhost:8000/platforms/oms/` | `oms.lu` |
|
||||
| Loyalty | `loyalty` | `localhost:8000/platforms/loyalty/` | `loyalty.lu` |
|
||||
| Site Builder | `site-builder` | `localhost:8000/platforms/site-builder/` | `sitebuilder.lu` |
|
||||
@@ -155,12 +155,12 @@ Request arrives
|
||||
|
||||
**Example:**
|
||||
- Store subdomain: `acme`
|
||||
- Platform domain: `wizamart.com`
|
||||
- Customer Storefront URL: `https://acme.wizamart.com/storefront/products`
|
||||
- Product Detail: `https://acme.wizamart.com/storefront/products/123`
|
||||
- Platform domain: `orion.lu`
|
||||
- Customer Storefront URL: `https://acme.orion.lu/storefront/products`
|
||||
- Product Detail: `https://acme.orion.lu/storefront/products/123`
|
||||
|
||||
**How It Works:**
|
||||
1. Customer visits `https://acme.wizamart.com/storefront/products`
|
||||
1. Customer visits `https://acme.orion.lu/storefront/products`
|
||||
2. `store_context_middleware` detects subdomain `"acme"`
|
||||
3. Queries: `SELECT * FROM stores WHERE subdomain = 'acme'`
|
||||
4. Finds Store with ID=1 (ACME Store)
|
||||
@@ -171,7 +171,7 @@ Request arrives
|
||||
9. Renders template with ACME's colors, logo, and products
|
||||
|
||||
**Advantages:**
|
||||
- Single SSL certificate for all stores (*.wizamart.com)
|
||||
- Single SSL certificate for all stores (*.orion.lu)
|
||||
- Easy to manage DNS (just add subdomains)
|
||||
- Customers don't need to bring their own domain
|
||||
|
||||
@@ -199,7 +199,7 @@ id | store_id | domain | is_active | is_verified
|
||||
|
||||
**How It Works:**
|
||||
1. Customer visits `https://store.acme-corp.com/storefront/products`
|
||||
2. `store_context_middleware` detects custom domain (not *.wizamart.com, not localhost)
|
||||
2. `store_context_middleware` detects custom domain (not *.orion.lu, not localhost)
|
||||
3. Normalizes domain to `"store.acme-corp.com"`
|
||||
4. Queries: `SELECT * FROM store_domains WHERE domain = 'store.acme-corp.com'`
|
||||
5. Finds `StoreDomain` with `store_id = 1`
|
||||
@@ -249,17 +249,17 @@ id | store_id | domain | is_active | is_verified
|
||||
|
||||
### Subdomain/Custom Domain (PRODUCTION)
|
||||
```
|
||||
https://acme.wizamart.com/storefront/ → Homepage
|
||||
https://acme.wizamart.com/storefront/products → Product Catalog
|
||||
https://acme.wizamart.com/storefront/products/123 → Product Detail
|
||||
https://acme.wizamart.com/storefront/categories/electronics → Category Page
|
||||
https://acme.wizamart.com/storefront/cart → Shopping Cart
|
||||
https://acme.wizamart.com/storefront/checkout → Checkout
|
||||
https://acme.wizamart.com/storefront/search?q=laptop → Search Results
|
||||
https://acme.wizamart.com/storefront/account/login → Customer Login
|
||||
https://acme.wizamart.com/storefront/account/dashboard → Account Dashboard (Auth Required)
|
||||
https://acme.wizamart.com/storefront/account/orders → Order History (Auth Required)
|
||||
https://acme.wizamart.com/storefront/account/profile → Profile (Auth Required)
|
||||
https://acme.orion.lu/storefront/ → Homepage
|
||||
https://acme.orion.lu/storefront/products → Product Catalog
|
||||
https://acme.orion.lu/storefront/products/123 → Product Detail
|
||||
https://acme.orion.lu/storefront/categories/electronics → Category Page
|
||||
https://acme.orion.lu/storefront/cart → Shopping Cart
|
||||
https://acme.orion.lu/storefront/checkout → Checkout
|
||||
https://acme.orion.lu/storefront/search?q=laptop → Search Results
|
||||
https://acme.orion.lu/storefront/account/login → Customer Login
|
||||
https://acme.orion.lu/storefront/account/dashboard → Account Dashboard (Auth Required)
|
||||
https://acme.orion.lu/storefront/account/orders → Order History (Auth Required)
|
||||
https://acme.orion.lu/storefront/account/profile → Profile (Auth Required)
|
||||
```
|
||||
|
||||
### Path-Based (DEVELOPMENT)
|
||||
@@ -304,7 +304,7 @@ POST /api/v1/storefront/stores/1/products/{id}/reviews → Add product review
|
||||
|
||||
### Example: No Cross-Store Leakage
|
||||
```python
|
||||
# Customer on acme.wizamart.com tries to access TechPro's products
|
||||
# Customer on acme.orion.lu tries to access TechPro's products
|
||||
# They make API call to /api/v1/storefront/stores/2/products
|
||||
|
||||
# Backend checks:
|
||||
@@ -317,14 +317,14 @@ if store.id != requested_store_id: # if 1 != 2
|
||||
|
||||
## Request Lifecycle: Complete Flow
|
||||
|
||||
### Scenario: Customer visits `https://acme.wizamart.com/storefront/products`
|
||||
### Scenario: Customer visits `https://acme.orion.lu/storefront/products`
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ 1. REQUEST ARRIVES │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
method: GET
|
||||
host: acme.wizamart.com
|
||||
host: acme.orion.lu
|
||||
path: /storefront/products
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
@@ -332,7 +332,7 @@ if store.id != requested_store_id: # if 1 != 2
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
A) store_context_middleware
|
||||
├─ Detects host: "acme.wizamart.com"
|
||||
├─ Detects host: "acme.orion.lu"
|
||||
├─ Extracts subdomain: "acme"
|
||||
├─ Queries: SELECT * FROM stores WHERE subdomain = 'acme'
|
||||
└─ Sets: request.state.store = Store(ACME Store)
|
||||
@@ -391,7 +391,7 @@ if store.id != requested_store_id: # if 1 != 2
|
||||
Each store's storefront is fully branded with their custom theme:
|
||||
|
||||
```python
|
||||
# Theme loaded for https://acme.wizamart.com
|
||||
# Theme loaded for https://acme.orion.lu
|
||||
request.state.theme = {
|
||||
"theme_name": "modern",
|
||||
"colors": {
|
||||
@@ -438,7 +438,7 @@ In Jinja2 template:
|
||||
- Each store looks completely separate and branded
|
||||
|
||||
### 2. Store Perspective
|
||||
- Stores can use a subdomain (free/standard): `acme.wizamart.com`
|
||||
- Stores can use a subdomain (free/standard): `acme.orion.lu`
|
||||
- Or their own custom domain (premium): `store.acme-corp.com`
|
||||
- Both routes go to the exact same backend code
|
||||
|
||||
@@ -471,7 +471,7 @@ app.include_router(storefront_pages.router, prefix="/stores/{store_code}/storefr
|
||||
**How This Works:**
|
||||
|
||||
1. **For Subdomain/Custom Domain Mode:**
|
||||
- URL: `https://acme.wizamart.com/storefront/products`
|
||||
- URL: `https://acme.orion.lu/storefront/products`
|
||||
- Matches: First router with `/storefront` prefix
|
||||
- Route: `@router.get("/products")` → Full path: `/storefront/products`
|
||||
|
||||
@@ -528,4 +528,4 @@ Set-Cookie: customer_token=eyJ...; Path=/storefront; HttpOnly; SameSite=Lax
|
||||
---
|
||||
|
||||
Generated: January 30, 2026
|
||||
Wizamart Version: Current Development
|
||||
Orion Version: Current Development
|
||||
|
||||
Reference in New Issue
Block a user