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:
@@ -43,11 +43,11 @@ All CMS pages are accessible on your shop frontend:
|
||||
|
||||
```
|
||||
# For domain/subdomain access
|
||||
https://wizamart.shop/about
|
||||
https://orion.shop/about
|
||||
https://fashionhub.store/contact
|
||||
|
||||
# For path-based access
|
||||
http://localhost:8000/store/wizamart/faq
|
||||
http://localhost:8000/store/orion/faq
|
||||
http://localhost:8000/stores/fashionhub/shipping
|
||||
```
|
||||
|
||||
@@ -113,13 +113,13 @@ When a customer visits `/about`:
|
||||
- Title: "About Our Platform"
|
||||
- Content: Generic platform description
|
||||
|
||||
**WizaMart Override:**
|
||||
**Orion Override:**
|
||||
- Slug: `about`
|
||||
- Title: "About WizaMart"
|
||||
- Content: WizaMart-specific content
|
||||
- Title: "About Orion"
|
||||
- Content: Orion-specific content
|
||||
|
||||
**Result:**
|
||||
- `wizamart.shop/about` → Shows WizaMart custom version
|
||||
- `orion.shop/about` → Shows Orion custom version
|
||||
- `fashionhub.store/about` → Shows platform default (no override)
|
||||
|
||||
## Footer Navigation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Configuration Guide
|
||||
|
||||
Environment configuration for the Wizamart API.
|
||||
Environment configuration for the Orion API.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
@@ -8,8 +8,8 @@ Create a `.env` file in your project root:
|
||||
|
||||
```env
|
||||
# Database Configuration
|
||||
DATABASE_URL=sqlite:///./wizamart.db
|
||||
# For PostgreSQL: DATABASE_URL=postgresql://user:password@localhost:5432/wizamart
|
||||
DATABASE_URL=sqlite:///./orion.db
|
||||
# For PostgreSQL: DATABASE_URL=postgresql://user:password@localhost:5432/orion
|
||||
|
||||
# Security
|
||||
JWT_SECRET_KEY=your-super-secret-key-change-in-production
|
||||
@@ -39,7 +39,7 @@ RATE_LIMIT_WINDOW=3600
|
||||
### Development
|
||||
```env
|
||||
DEBUG=True
|
||||
DATABASE_URL=sqlite:///./wizamart.db
|
||||
DATABASE_URL=sqlite:///./orion.db
|
||||
```
|
||||
|
||||
### Production
|
||||
@@ -49,4 +49,4 @@ DATABASE_URL=postgresql://user:password@host:5432/db
|
||||
JWT_SECRET_KEY=production-secret-key
|
||||
```
|
||||
|
||||
*This guide is under development. See [Installation](installation.md) for complete setup instructions.*
|
||||
*This guide is under development. See [Installation](installation.md) for complete setup instructions.*
|
||||
|
||||
@@ -8,8 +8,8 @@ Quick reference for common database operations. See `DATABASE_SETUP_GUIDE.md` fo
|
||||
|
||||
```bash
|
||||
# 1. Clone and setup
|
||||
git clone <wizamart-repo>
|
||||
cd wizamart-repo
|
||||
git clone <orion-repo>
|
||||
cd orion-repo
|
||||
python -m venv venv
|
||||
venv\Scripts\activate # Windows
|
||||
pip install -r requirements.txt
|
||||
@@ -46,7 +46,7 @@ python -m uvicorn app.main:app --reload
|
||||
Remove-Item alembic\versions\*.py -Exclude __init__.py
|
||||
|
||||
# 2. Delete database
|
||||
Remove-Item wizamart.db
|
||||
Remove-Item orion.db
|
||||
|
||||
# 3. Regenerate
|
||||
alembic revision --autogenerate -m "Initial migration"
|
||||
@@ -83,10 +83,10 @@ alembic current
|
||||
alembic history --verbose
|
||||
|
||||
# List all tables
|
||||
python -c "import sqlite3; conn = sqlite3.connect('wizamart.db'); cursor = conn.cursor(); cursor.execute('SELECT name FROM sqlite_master WHERE type=\"table\" ORDER BY name;'); [print(t[0]) for t in cursor.fetchall()]"
|
||||
python -c "import sqlite3; conn = sqlite3.connect('orion.db'); cursor = conn.cursor(); cursor.execute('SELECT name FROM sqlite_master WHERE type=\"table\" ORDER BY name;'); [print(t[0]) for t in cursor.fetchall()]"
|
||||
|
||||
# Check specific table
|
||||
python -c "import sqlite3; conn = sqlite3.connect('wizamart.db'); cursor = conn.cursor(); cursor.execute('PRAGMA table_info(store_themes)'); [print(col) for col in cursor.fetchall()]"
|
||||
python -c "import sqlite3; conn = sqlite3.connect('orion.db'); cursor = conn.cursor(); cursor.execute('PRAGMA table_info(store_themes)'); [print(col) for col in cursor.fetchall()]"
|
||||
```
|
||||
|
||||
---
|
||||
@@ -208,7 +208,7 @@ python -c "from models.database.my_model import MyModel; print('✓ Import works
|
||||
│ ├── seed_database.py ← Seed script
|
||||
│ └── reset_database.ps1 ← Reset script
|
||||
├── alembic.ini ← Alembic config
|
||||
└── wizamart.db ← SQLite database
|
||||
└── orion.db ← SQLite database
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
This guide walks you through setting up the Wizamart database from scratch. Whether you're a new developer joining the team or need to reset your local database, this document covers everything you need to know.
|
||||
This guide walks you through setting up the Orion database from scratch. Whether you're a new developer joining the team or need to reset your local database, this document covers everything you need to know.
|
||||
|
||||
---
|
||||
|
||||
@@ -30,8 +30,8 @@ This guide walks you through setting up the Wizamart database from scratch. Whet
|
||||
|
||||
```bash
|
||||
# 1. Clone the repository
|
||||
git clone <wizamart-repo>
|
||||
cd wizamart-repo
|
||||
git clone <orion-repo>
|
||||
cd orion-repo
|
||||
|
||||
# 2. Create virtual environment
|
||||
python -m venv venv
|
||||
@@ -56,10 +56,10 @@ Create or update `.env` file in project root:
|
||||
|
||||
```env
|
||||
# Database Configuration
|
||||
DATABASE_URL=sqlite:///./wizamart.db
|
||||
DATABASE_URL=sqlite:///./orion.db
|
||||
|
||||
# For PostgreSQL (production):
|
||||
# DATABASE_URL=postgresql://user:password@localhost:5432/wizamart
|
||||
# DATABASE_URL=postgresql://user:password@localhost:5432/orion
|
||||
|
||||
# Other required settings
|
||||
SECRET_KEY=your-secret-key-here-change-in-production
|
||||
@@ -83,10 +83,10 @@ alembic init alembic
|
||||
```ini
|
||||
# alembic.ini
|
||||
# Find this line and update:
|
||||
sqlalchemy.url = sqlite:///./wizamart.db
|
||||
sqlalchemy.url = sqlite:///./orion.db
|
||||
|
||||
# Or for PostgreSQL:
|
||||
# sqlalchemy.url = postgresql://user:password@localhost:5432/wizamart
|
||||
# sqlalchemy.url = postgresql://user:password@localhost:5432/orion
|
||||
```
|
||||
|
||||
**Configure `alembic/env.py`:**
|
||||
@@ -179,7 +179,7 @@ auth_manager = AuthManager()
|
||||
# Create admin user
|
||||
admin = User(
|
||||
username="admin",
|
||||
email="admin@wizamart.com",
|
||||
email="admin@orion.lu",
|
||||
hashed_password=auth_manager.hash_password("admin123"),
|
||||
role="admin",
|
||||
is_active=True,
|
||||
@@ -253,9 +253,9 @@ if ($confirm -ne "YES") {
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Step 1: Backing up current database..." -ForegroundColor Yellow
|
||||
if (Test-Path wizamart.db) {
|
||||
$backupName = "wizamart_backup_$(Get-Date -Format 'yyyyMMdd_HHmmss').db"
|
||||
Copy-Item wizamart.db $backupName
|
||||
if (Test-Path orion.db) {
|
||||
$backupName = "orion_backup_$(Get-Date -Format 'yyyyMMdd_HHmmss').db"
|
||||
Copy-Item orion.db $backupName
|
||||
Write-Host "✓ Backup created: $backupName" -ForegroundColor Green
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ Write-Host "✓ Old migrations removed" -ForegroundColor Green
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Step 3: Deleting database..." -ForegroundColor Yellow
|
||||
Remove-Item wizamart.db -ErrorAction SilentlyContinue
|
||||
Remove-Item orion.db -ErrorAction SilentlyContinue
|
||||
Write-Host "✓ Database deleted" -ForegroundColor Green
|
||||
|
||||
Write-Host ""
|
||||
@@ -289,7 +289,7 @@ Write-Host ""
|
||||
Write-Host "Step 6: Verifying tables..." -ForegroundColor Yellow
|
||||
python -c @"
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('wizamart.db')
|
||||
conn = sqlite3.connect('orion.db')
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('SELECT name FROM sqlite_master WHERE type=\"table\" ORDER BY name;')
|
||||
tables = [t[0] for t in cursor.fetchall()]
|
||||
@@ -346,9 +346,9 @@ fi
|
||||
|
||||
echo ""
|
||||
echo "Step 1: Backing up current database..."
|
||||
if [ -f wizamart.db ]; then
|
||||
backup_name="wizamart_backup_$(date +%Y%m%d_%H%M%S).db"
|
||||
cp wizamart.db "$backup_name"
|
||||
if [ -f orion.db ]; then
|
||||
backup_name="orion_backup_$(date +%Y%m%d_%H%M%S).db"
|
||||
cp orion.db "$backup_name"
|
||||
echo "✓ Backup created: $backup_name"
|
||||
fi
|
||||
|
||||
@@ -361,7 +361,7 @@ echo "✓ Old migrations removed"
|
||||
|
||||
echo ""
|
||||
echo "Step 3: Deleting database..."
|
||||
rm -f wizamart.db
|
||||
rm -f orion.db
|
||||
echo "✓ Database deleted"
|
||||
|
||||
echo ""
|
||||
@@ -378,7 +378,7 @@ echo ""
|
||||
echo "Step 6: Verifying tables..."
|
||||
python -c "
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('wizamart.db')
|
||||
conn = sqlite3.connect('orion.db')
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('SELECT name FROM sqlite_master WHERE type=\"table\" ORDER BY name;')
|
||||
tables = [t[0] for t in cursor.fetchall()]
|
||||
@@ -419,14 +419,14 @@ If you prefer to run commands manually:
|
||||
|
||||
```bash
|
||||
# 1. Backup (optional)
|
||||
cp wizamart.db wizamart_backup.db # Windows: copy wizamart.db wizamart_backup.db
|
||||
cp orion.db orion_backup.db # Windows: copy orion.db orion_backup.db
|
||||
|
||||
# 2. Remove migrations
|
||||
rm alembic/versions/*.py # Windows: Remove-Item alembic\versions\*.py -Exclude __init__.py
|
||||
touch alembic/versions/__init__.py # Windows: New-Item -Path alembic\versions\__init__.py
|
||||
|
||||
# 3. Delete database
|
||||
rm wizamart.db # Windows: Remove-Item wizamart.db
|
||||
rm orion.db # Windows: Remove-Item orion.db
|
||||
|
||||
# 4. Generate migration
|
||||
alembic revision --autogenerate -m "Initial migration - all tables"
|
||||
@@ -459,7 +459,7 @@ alembic current
|
||||
```python
|
||||
import sqlite3
|
||||
|
||||
conn = sqlite3.connect('wizamart.db')
|
||||
conn = sqlite3.connect('orion.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
# List all tables
|
||||
@@ -710,20 +710,20 @@ from datetime import datetime, timezone
|
||||
def seed_database():
|
||||
"""Seed database with initial data."""
|
||||
db = SessionLocal()
|
||||
|
||||
|
||||
try:
|
||||
print("🌱 Seeding database...")
|
||||
|
||||
|
||||
# Check if admin already exists
|
||||
existing_admin = db.query(User).filter(User.username == "admin").first()
|
||||
if existing_admin:
|
||||
print("⚠️ Admin user already exists, skipping...")
|
||||
return
|
||||
|
||||
|
||||
# Create admin user
|
||||
admin = User(
|
||||
username="admin",
|
||||
email="admin@wizamart.com",
|
||||
email="admin@orion.lu",
|
||||
hashed_password=get_password_hash("admin123"),
|
||||
is_admin=True,
|
||||
is_active=True,
|
||||
@@ -733,7 +733,7 @@ def seed_database():
|
||||
db.add(admin)
|
||||
db.flush()
|
||||
print(f"✓ Admin user created (ID: {admin.id})")
|
||||
|
||||
|
||||
# Create test store
|
||||
store = Store(
|
||||
store_code="TESTSTORE",
|
||||
@@ -750,15 +750,15 @@ def seed_database():
|
||||
db.add(store)
|
||||
db.flush()
|
||||
print(f"✓ Test store created: {store.store_code}")
|
||||
|
||||
|
||||
db.commit()
|
||||
|
||||
|
||||
print("\n✅ Database seeded successfully!")
|
||||
print("\n📝 Login Credentials:")
|
||||
print(" URL: http://localhost:8000/admin/login")
|
||||
print(" Username: admin")
|
||||
print(" Password: admin123")
|
||||
|
||||
|
||||
except Exception as e:
|
||||
db.rollback()
|
||||
print(f"❌ Error seeding database: {e}")
|
||||
@@ -843,7 +843,7 @@ project/
|
||||
│ ├── seed_database.py # Development seed
|
||||
│ └── reset_database.ps1 # Reset script
|
||||
├── alembic.ini # Alembic config
|
||||
├── wizamart.db # SQLite database (gitignored)
|
||||
├── orion.db # SQLite database (gitignored)
|
||||
└── .env # Environment variables (gitignored)
|
||||
```
|
||||
|
||||
@@ -878,6 +878,6 @@ When adding new models:
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2025-10-27
|
||||
**Maintainer:** Development Team
|
||||
**Questions?** Contact the team lead or check internal documentation.
|
||||
**Last Updated:** 2025-10-27
|
||||
**Maintainer:** Development Team
|
||||
**Questions?** Contact the team lead or check internal documentation.
|
||||
|
||||
@@ -28,7 +28,7 @@ cp .env.example .env
|
||||
|
||||
# Edit .env with your database configuration
|
||||
# The default works with docker-compose:
|
||||
DATABASE_URL=postgresql://wizamart_user:secure_password@localhost:5432/wizamart_db
|
||||
DATABASE_URL=postgresql://orion_user:secure_password@localhost:5432/orion_db
|
||||
```
|
||||
|
||||
!!! note "PostgreSQL Required"
|
||||
@@ -140,7 +140,7 @@ make migrate-down
|
||||
make backup-db
|
||||
|
||||
# Delete database and recreate from scratch
|
||||
del wizamart.db # or drop PostgreSQL database
|
||||
del orion.db # or drop PostgreSQL database
|
||||
make migrate-up
|
||||
```
|
||||
|
||||
@@ -148,7 +148,7 @@ make migrate-up
|
||||
|
||||
### Development (Docker - Recommended)
|
||||
```env
|
||||
DATABASE_URL=postgresql://wizamart_user:secure_password@localhost:5432/wizamart_db
|
||||
DATABASE_URL=postgresql://orion_user:secure_password@localhost:5432/orion_db
|
||||
```
|
||||
- Start with `make docker-up`
|
||||
- Consistent environment matching production
|
||||
@@ -156,14 +156,14 @@ DATABASE_URL=postgresql://wizamart_user:secure_password@localhost:5432/wizamart_
|
||||
|
||||
### Development (Local PostgreSQL)
|
||||
```env
|
||||
DATABASE_URL=postgresql://user:password@localhost:5432/wizamart_dev
|
||||
DATABASE_URL=postgresql://user:password@localhost:5432/orion_dev
|
||||
```
|
||||
- Use if you prefer a local PostgreSQL installation
|
||||
- Ensure PostgreSQL 15+ is installed
|
||||
|
||||
### Production
|
||||
```env
|
||||
DATABASE_URL=postgresql://user:password@production-host:5432/wizamart_prod
|
||||
DATABASE_URL=postgresql://user:password@production-host:5432/orion_prod
|
||||
```
|
||||
- PostgreSQL is required for production
|
||||
- Migrations are applied automatically during deployment
|
||||
@@ -224,7 +224,7 @@ python scripts/create_test_data.py
|
||||
```
|
||||
|
||||
**What it creates:**
|
||||
- 3 test stores (WizaMart, Fashion Hub, The Book Store)
|
||||
- 3 test stores (Orion, Fashion Hub, The Book Store)
|
||||
- 20 marketplace products per store
|
||||
- Store-specific products with pricing
|
||||
- Store themes with custom colors
|
||||
@@ -261,7 +261,7 @@ python scripts/create_landing_page.py
|
||||
|
||||
# Or programmatically in Python
|
||||
from scripts.create_landing_page import create_landing_page
|
||||
create_landing_page('wizamart', template='modern')
|
||||
create_landing_page('orion', template='modern')
|
||||
```
|
||||
|
||||
**Available templates:**
|
||||
@@ -292,7 +292,7 @@ python scripts/create_landing_page.py
|
||||
make dev
|
||||
|
||||
# 6. Test the shop
|
||||
# Visit: http://localhost:8000/stores/wizamart/shop/
|
||||
# Visit: http://localhost:8000/stores/orion/shop/
|
||||
```
|
||||
|
||||
### Common Issues
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Installation Guide
|
||||
|
||||
This guide will help you set up the Wizamart Platform for development or production use.
|
||||
This guide will help you set up the Orion Platform for development or production use.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -20,8 +20,8 @@ Before you begin, ensure you have the following installed:
|
||||
### 1. Clone the Repository
|
||||
|
||||
```bash
|
||||
git clone <wizamart-repo>
|
||||
cd wizamart-repo
|
||||
git clone <orion-repo>
|
||||
cd orion-repo
|
||||
```
|
||||
|
||||
### 2. Create Virtual Environment
|
||||
@@ -62,9 +62,9 @@ pip install -r requirements-docs.txt # or make install-docs
|
||||
|
||||
1. **Create Database**:
|
||||
```sql
|
||||
CREATE DATABASE wizamart_db;
|
||||
CREATE USER wizamart_user WITH PASSWORD 'your_password';
|
||||
GRANT ALL PRIVILEGES ON DATABASE wizamart_db TO wizamart_user;
|
||||
CREATE DATABASE orion_db;
|
||||
CREATE USER orion_user WITH PASSWORD 'your_password';
|
||||
GRANT ALL PRIVILEGES ON DATABASE orion_db TO orion_user;
|
||||
```
|
||||
|
||||
2. **Create Environment File**:
|
||||
@@ -75,12 +75,12 @@ pip install -r requirements-docs.txt # or make install-docs
|
||||
3. **Configure `.env` file**:
|
||||
```env
|
||||
# Database
|
||||
DATABASE_URL=postgresql://wizamart_user:your_password@localhost/wizamart
|
||||
|
||||
DATABASE_URL=postgresql://orion_user:your_password@localhost/orion
|
||||
|
||||
# Security
|
||||
SECRET_KEY=your-super-secret-key-here
|
||||
JWT_SECRET_KEY=your-jwt-secret-key-here
|
||||
|
||||
|
||||
# Environment
|
||||
ENVIRONMENT=development
|
||||
DEBUG=True
|
||||
@@ -89,9 +89,9 @@ pip install -r requirements-docs.txt # or make install-docs
|
||||
#### Option B: Docker PostgreSQL
|
||||
|
||||
```bash
|
||||
docker run --name wizamart-postgres \
|
||||
-e POSTGRES_DB=wizamart_import \
|
||||
-e POSTGRES_USER=wizamart_user \
|
||||
docker run --name orion-postgres \
|
||||
-e POSTGRES_DB=orion_import \
|
||||
-e POSTGRES_USER=orion_user \
|
||||
-e POSTGRES_PASSWORD=your_password \
|
||||
-p 5432:5432 \
|
||||
-d postgres:15
|
||||
@@ -151,8 +151,8 @@ The application will be available at:
|
||||
|
||||
1. **Clone and navigate to project**:
|
||||
```bash
|
||||
git clone <wizamart-repo>
|
||||
cd wizamart-repo
|
||||
git clone <orion-repo>
|
||||
cd orion-repo
|
||||
```
|
||||
|
||||
2. **Start all services**:
|
||||
@@ -175,11 +175,11 @@ The application will be available at:
|
||||
2. **Run with environment variables**:
|
||||
```bash
|
||||
docker run -d \
|
||||
--name wizamart-api \
|
||||
--name orion-api \
|
||||
-p 8000:8000 \
|
||||
-e DATABASE_URL="postgresql://user:pass@host/db" \
|
||||
-e SECRET_KEY="your-secret-key" \
|
||||
wizamart-import
|
||||
orion-import
|
||||
```
|
||||
|
||||
## Verification
|
||||
@@ -252,7 +252,7 @@ pytest -m integration
|
||||
| `R2_ACCOUNT_ID` | Cloudflare account ID | - | ❌ (if r2) |
|
||||
| `R2_ACCESS_KEY_ID` | R2 access key | - | ❌ (if r2) |
|
||||
| `R2_SECRET_ACCESS_KEY` | R2 secret key | - | ❌ (if r2) |
|
||||
| `R2_BUCKET_NAME` | R2 bucket name | `wizamart-media` | ❌ |
|
||||
| `R2_BUCKET_NAME` | R2 bucket name | `orion-media` | ❌ |
|
||||
| `R2_PUBLIC_URL` | Custom public URL for R2 | - | ❌ |
|
||||
|
||||
### CloudFlare CDN
|
||||
@@ -312,4 +312,4 @@ If you encounter issues:
|
||||
|
||||
- **[Quick Start Guide](quickstart.md)** - Get familiar with basic operations
|
||||
- **[Configuration Guide](configuration.md)** - Detailed configuration options
|
||||
- **[API Documentation](../api/index.md)** - Explore the API endpoints
|
||||
- **[API Documentation](../api/index.md)** - Explore the API endpoints
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Quick Start Guide
|
||||
|
||||
Get up and running with the Wizamart API in 5 minutes.
|
||||
Get up and running with the Orion API in 5 minutes.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -11,8 +11,8 @@ Get up and running with the Wizamart API in 5 minutes.
|
||||
|
||||
```bash
|
||||
# 1. Clone and setup
|
||||
git clone <wizamart-repo>
|
||||
cd wizamart-repo
|
||||
git clone <orion-repo>
|
||||
cd orion-repo
|
||||
make setup
|
||||
|
||||
# 2. Start development
|
||||
@@ -35,4 +35,4 @@ open http://localhost:8000/docs
|
||||
- [Configuration](configuration.md) - Environment configuration
|
||||
- [API Documentation](../api/index.md) - Explore the API
|
||||
|
||||
*This guide is under development. For detailed instructions, see [Installation](installation.md).*
|
||||
*This guide is under development. For detailed instructions, see [Installation](installation.md).*
|
||||
|
||||
Reference in New Issue
Block a user