Add Figma-ready wireframe SVGs and user creation script
This commit is contained in:
parent
07824dbfb1
commit
f1e1af0f96
47
design/wireframes/admin_dashboard.svg
Normal file
47
design/wireframes/admin_dashboard.svg
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="800" viewBox="0 0 1200 800">
|
||||
<style>
|
||||
.title{font:700 20px/1.2 Arial,Helvetica,sans-serif}
|
||||
.label{font:500 14px/1.2 Arial,Helvetica,sans-serif}
|
||||
.muted{font:400 12px/1.2 Arial,Helvetica,sans-serif;fill:#666}
|
||||
.box{fill:#fff;stroke:#ccc}
|
||||
</style>
|
||||
<rect width="100%" height="100%" fill="#f6f7fb"/>
|
||||
<text x="32" y="40" class="title">ADMIN DASHBOARD — Wireframe</text>
|
||||
|
||||
<!-- KPIs -->
|
||||
<g transform="translate(32,64)">
|
||||
<rect x="0" y="0" width="1120" height="88" class="box"/>
|
||||
<text x="18" y="28" class="label">KPIs: Orders</text>
|
||||
<text x="260" y="28" class="label">Revenue</text>
|
||||
<text x="520" y="28" class="label">Users</text>
|
||||
<text x="18" y="56" class="muted">Quick date picker • comparison</text>
|
||||
</g>
|
||||
|
||||
<!-- Layout -->
|
||||
<g transform="translate(32,168)">
|
||||
<rect x="0" y="0" width="240" height="560" class="box"/>
|
||||
<text x="18" y="24" class="label">Sidebar — Navigation</text>
|
||||
|
||||
<rect x="260" y="0" width="892" height="560" class="box"/>
|
||||
<text x="278" y="24" class="label">Main Area</text>
|
||||
|
||||
<!-- Order Management -->
|
||||
<rect x="278" y="40" width="540" height="180" fill="#fff" stroke="#e0e0e0"/>
|
||||
<text x="288" y="64" class="label">Order Management — Filters, Search, Table</text>
|
||||
|
||||
<!-- Seller Approval -->
|
||||
<rect x="828" y="40" width="332" height="120" fill="#fff" stroke="#e0e0e0"/>
|
||||
<text x="838" y="64" class="label">Seller Approval — Pending list</text>
|
||||
|
||||
<!-- Map -->
|
||||
<rect x="278" y="236" width="442" height="240" fill="#fff" stroke="#e0e0e0"/>
|
||||
<text x="288" y="260" class="label">Delivery Tracking Map — live pins</text>
|
||||
|
||||
<!-- Reports -->
|
||||
<rect x="732" y="236" width="428" height="240" fill="#fff" stroke="#e0e0e0"/>
|
||||
<text x="742" y="260" class="label">Financial Reports — charts, exports</text>
|
||||
</g>
|
||||
|
||||
<text x="32" y="760" class="muted">Notes: table supports bulk actions, seller profile preview, export CSV</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
27
design/wireframes/buyer_mobile_dashboard.svg
Normal file
27
design/wireframes/buyer_mobile_dashboard.svg
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="420" height="920" viewBox="0 0 420 920">
|
||||
<style>
|
||||
.title{font:700 16px/1.2 Arial,Helvetica,sans-serif}
|
||||
.label{font:500 12px/1.2 Arial,Helvetica,sans-serif}
|
||||
.muted{font:400 11px/1.2 Arial,Helvetica,sans-serif;fill:#666}
|
||||
.box{fill:#fff;stroke:#ddd}
|
||||
</style>
|
||||
<rect width="100%" height="100%" fill="#fbfbfd"/>
|
||||
<text x="16" y="28" class="title">BUYER MOBILE DASHBOARD — Wireframe</text>
|
||||
|
||||
<g transform="translate(16,48)">
|
||||
<rect x="0" y="0" width="388" height="140" class="box"/>
|
||||
<text x="14" y="24" class="label">Order Tracking — progress bar, ETA, contact driver</text>
|
||||
|
||||
<rect x="0" y="160" width="388" height="220" class="box"/>
|
||||
<text x="14" y="184" class="label">Order History — list with Reorder</text>
|
||||
|
||||
<rect x="0" y="392" width="388" height="180" class="box"/>
|
||||
<text x="14" y="416" class="label">Address Management — add/edit/delete</text>
|
||||
|
||||
<rect x="0" y="588" width="388" height="140" class="box"/>
|
||||
<text x="14" y="612" class="label">Saved Payment Methods — add, set default</text>
|
||||
</g>
|
||||
|
||||
<text x="16" y="900" class="muted">Notes: push notifications, one-tap reorder</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
30
design/wireframes/delivery_agent_mobile.svg
Normal file
30
design/wireframes/delivery_agent_mobile.svg
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="420" height="920" viewBox="0 0 420 920">
|
||||
<style>
|
||||
.title{font:700 16px/1.2 Arial,Helvetica,sans-serif}
|
||||
.label{font:500 12px/1.2 Arial,Helvetica,sans-serif}
|
||||
.muted{font:400 11px/1.2 Arial,Helvetica,sans-serif;fill:#666}
|
||||
.box{fill:#fff;stroke:#ddd}
|
||||
</style>
|
||||
<rect width="100%" height="100%" fill="#f7f9fc"/>
|
||||
<text x="16" y="28" class="title">DELIVERY AGENT (MOBILE) — Wireframe</text>
|
||||
|
||||
<g transform="translate(16,48)">
|
||||
<rect x="0" y="0" width="388" height="220" class="box"/>
|
||||
<text x="14" y="24" class="label">Map View (half screen) — route & pins</text>
|
||||
|
||||
<rect x="0" y="236" width="388" height="220" class="box"/>
|
||||
<text x="14" y="260" class="label">Today's Deliveries — swipeable list items</text>
|
||||
|
||||
<rect x="0" y="472" width="388" height="140" class="box"/>
|
||||
<text x="14" y="496" class="label">Navigation — deep link / start nav</text>
|
||||
|
||||
<rect x="0" y="628" width="388" height="120" class="box"/>
|
||||
<text x="14" y="652" class="label">COD Collection — collect, record receipt</text>
|
||||
|
||||
<rect x="0" y="760" width="388" height="120" class="box"/>
|
||||
<text x="14" y="784" class="label">Proof of Delivery — photo + signature</text>
|
||||
</g>
|
||||
|
||||
<text x="16" y="900" class="muted">Notes: offline maps, quick call, signature capture</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
30
design/wireframes/seller_dashboard.svg
Normal file
30
design/wireframes/seller_dashboard.svg
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="800" viewBox="0 0 1200 800">
|
||||
<style>
|
||||
.title{font:700 20px/1.2 Arial,Helvetica,sans-serif}
|
||||
.label{font:500 14px/1.2 Arial,Helvetica,sans-serif}
|
||||
.muted{font:400 12px/1.2 Arial,Helvetica,sans-serif;fill:#666}
|
||||
.box{fill:#fff;stroke:#ccc}
|
||||
</style>
|
||||
<rect width="100%" height="100%" fill="#fbfcfe"/>
|
||||
<text x="32" y="40" class="title">SELLER DASHBOARD — Wireframe</text>
|
||||
|
||||
<g transform="translate(32,72)">
|
||||
<rect x="0" y="0" width="200" height="640" class="box"/>
|
||||
<text x="18" y="24" class="label">Left Nav — Dashboard / Orders / Inventory / Settings</text>
|
||||
|
||||
<rect x="220" y="0" width="912" height="320" class="box"/>
|
||||
<text x="236" y="24" class="label">Store KPIs — Orders Today, Sales</text>
|
||||
|
||||
<rect x="220" y="348" width="560" height="364" fill="#fff" stroke="#e0e0e0"/>
|
||||
<text x="236" y="372" class="label">Order Processing — list, status chips, detail panel</text>
|
||||
|
||||
<rect x="796" y="348" width="336" height="180" fill="#fff" stroke="#e0e0e0"/>
|
||||
<text x="806" y="372" class="label">Inventory — bulk actions, inline edit</text>
|
||||
|
||||
<rect x="796" y="538" width="336" height="174" fill="#fff" stroke="#e0e0e0"/>
|
||||
<text x="806" y="562" class="label">Sales Analytics — charts, top products</text>
|
||||
</g>
|
||||
|
||||
<text x="32" y="760" class="muted">Notes: CSV import/export; quick packing slip print</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
35
scripts/create_user.py
Normal file
35
scripts/create_user.py
Normal file
@ -0,0 +1,35 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Ensure this script is run from project root
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if BASE_DIR not in sys.path:
|
||||
sys.path.insert(0, BASE_DIR)
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
||||
import django
|
||||
django.setup()
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
username = os.environ.get('JM_USERNAME')
|
||||
email = os.environ.get('JM_EMAIL', '')
|
||||
password = os.environ.get('JM_PASSWORD')
|
||||
is_super = os.environ.get('JM_SUPER', '0') == '1'
|
||||
|
||||
if not username or not password:
|
||||
print('JM_USERNAME and JM_PASSWORD environment variables are required')
|
||||
sys.exit(2)
|
||||
|
||||
if User.objects.filter(username=username).exists():
|
||||
print(f"User '{username}' already exists")
|
||||
sys.exit(0)
|
||||
|
||||
if is_super:
|
||||
User.objects.create_superuser(username=username, email=email, password=password)
|
||||
print(f"Superuser '{username}' created")
|
||||
else:
|
||||
User.objects.create_user(username=username, email=email, password=password)
|
||||
print(f"User '{username}' created")
|
||||
|
||||
sys.exit(0)
|
||||
Loading…
x
Reference in New Issue
Block a user