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:
2026-02-14 16:46:56 +01:00
parent 34ee7bb7ad
commit e9253fbd84
184 changed files with 1227 additions and 1228 deletions

View File

@@ -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.