refactor: rename shop to storefront for consistency
Rename all "shop" directories and references to "storefront" to match the API and route naming convention already in use. Renamed directories: - app/templates/shop/ → app/templates/storefront/ - static/shop/ → static/storefront/ - app/templates/shared/macros/shop/ → .../macros/storefront/ - docs/frontend/shop/ → docs/frontend/storefront/ Renamed files: - shop.css → storefront.css - shop-layout.js → storefront-layout.js Updated references in: - app/routes/storefront_pages.py (21 template references) - app/modules/cms/routes/pages/vendor.py - app/templates/storefront/base.html (static paths) - All storefront templates (extends/includes) - docs/architecture/frontend-structure.md This aligns the template/static naming with: - Route file: storefront_pages.py - API directory: app/api/v1/storefront/ - Module routes: */routes/api/storefront.py - URL paths: /storefront/* Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@@ -213,7 +213,7 @@ async def vendor_content_page(
|
||||
storefront_locale = vendor.storefront_locale
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/content-page.html",
|
||||
"storefront/content-page.html",
|
||||
{
|
||||
"request": request,
|
||||
"page": page,
|
||||
|
||||
@@ -238,7 +238,7 @@ async def shop_products_page(request: Request, db: Session = Depends(get_db)):
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/products.html", get_storefront_context(request, db=db)
|
||||
"storefront/products.html", get_storefront_context(request, db=db)
|
||||
)
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ async def shop_product_detail_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/product.html", get_storefront_context(request, db=db, product_id=product_id)
|
||||
"storefront/product.html", get_storefront_context(request, db=db, product_id=product_id)
|
||||
)
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ async def shop_category_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/category.html", get_storefront_context(request, db=db, category_slug=category_slug)
|
||||
"storefront/category.html", get_storefront_context(request, db=db, category_slug=category_slug)
|
||||
)
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ async def shop_cart_page(request: Request, db: Session = Depends(get_db)):
|
||||
},
|
||||
)
|
||||
|
||||
return templates.TemplateResponse("shop/cart.html", get_storefront_context(request, db=db))
|
||||
return templates.TemplateResponse("storefront/cart.html", get_storefront_context(request, db=db))
|
||||
|
||||
|
||||
@router.get("/checkout", response_class=HTMLResponse, include_in_schema=False)
|
||||
@@ -327,7 +327,7 @@ async def shop_checkout_page(request: Request, db: Session = Depends(get_db)):
|
||||
},
|
||||
)
|
||||
|
||||
return templates.TemplateResponse("shop/checkout.html", get_storefront_context(request, db=db))
|
||||
return templates.TemplateResponse("storefront/checkout.html", get_storefront_context(request, db=db))
|
||||
|
||||
|
||||
@router.get("/search", response_class=HTMLResponse, include_in_schema=False)
|
||||
@@ -345,7 +345,7 @@ async def shop_search_page(request: Request, db: Session = Depends(get_db)):
|
||||
},
|
||||
)
|
||||
|
||||
return templates.TemplateResponse("shop/search.html", get_storefront_context(request, db=db))
|
||||
return templates.TemplateResponse("storefront/search.html", get_storefront_context(request, db=db))
|
||||
|
||||
|
||||
# ============================================================================
|
||||
@@ -369,7 +369,7 @@ async def shop_register_page(request: Request, db: Session = Depends(get_db)):
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/register.html", get_storefront_context(request, db=db)
|
||||
"storefront/account/register.html", get_storefront_context(request, db=db)
|
||||
)
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ async def shop_login_page(request: Request, db: Session = Depends(get_db)):
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/login.html", get_storefront_context(request, db=db)
|
||||
"storefront/account/login.html", get_storefront_context(request, db=db)
|
||||
)
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ async def shop_forgot_password_page(request: Request, db: Session = Depends(get_
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/forgot-password.html", get_storefront_context(request, db=db)
|
||||
"storefront/account/forgot-password.html", get_storefront_context(request, db=db)
|
||||
)
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ async def shop_reset_password_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/reset-password.html", get_storefront_context(request, db=db)
|
||||
"storefront/account/reset-password.html", get_storefront_context(request, db=db)
|
||||
)
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ async def shop_account_dashboard_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/dashboard.html", get_storefront_context(request, user=current_customer)
|
||||
"storefront/account/dashboard.html", get_storefront_context(request, user=current_customer)
|
||||
)
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ async def shop_orders_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/orders.html", get_storefront_context(request, user=current_customer)
|
||||
"storefront/account/orders.html", get_storefront_context(request, user=current_customer)
|
||||
)
|
||||
|
||||
|
||||
@@ -556,7 +556,7 @@ async def shop_order_detail_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/order-detail.html",
|
||||
"storefront/account/order-detail.html",
|
||||
get_storefront_context(request, user=current_customer, order_id=order_id),
|
||||
)
|
||||
|
||||
@@ -582,7 +582,7 @@ async def shop_profile_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/profile.html", get_storefront_context(request, user=current_customer)
|
||||
"storefront/account/profile.html", get_storefront_context(request, user=current_customer)
|
||||
)
|
||||
|
||||
|
||||
@@ -607,7 +607,7 @@ async def shop_addresses_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/addresses.html", get_storefront_context(request, user=current_customer)
|
||||
"storefront/account/addresses.html", get_storefront_context(request, user=current_customer)
|
||||
)
|
||||
|
||||
|
||||
@@ -632,7 +632,7 @@ async def shop_wishlist_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/wishlist.html", get_storefront_context(request, user=current_customer)
|
||||
"storefront/account/wishlist.html", get_storefront_context(request, user=current_customer)
|
||||
)
|
||||
|
||||
|
||||
@@ -657,7 +657,7 @@ async def shop_settings_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/settings.html", get_storefront_context(request, user=current_customer)
|
||||
"storefront/account/settings.html", get_storefront_context(request, user=current_customer)
|
||||
)
|
||||
|
||||
|
||||
@@ -682,7 +682,7 @@ async def shop_messages_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/messages.html", get_storefront_context(request, db=db, user=current_customer)
|
||||
"storefront/account/messages.html", get_storefront_context(request, db=db, user=current_customer)
|
||||
)
|
||||
|
||||
|
||||
@@ -713,7 +713,7 @@ async def shop_message_detail_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/account/messages.html",
|
||||
"storefront/account/messages.html",
|
||||
get_storefront_context(
|
||||
request, db=db, user=current_customer, conversation_id=conversation_id
|
||||
),
|
||||
@@ -790,7 +790,7 @@ async def generic_content_page(
|
||||
)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"shop/content-page.html", get_storefront_context(request, db=db, page=page)
|
||||
"storefront/content-page.html", get_storefront_context(request, db=db, page=page)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/account/addresses.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/account/addresses.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}My Addresses - {{ vendor.name }}{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/account/dashboard.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/account/dashboard.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
{% from 'shared/macros/modals.html' import confirm_modal %}
|
||||
|
||||
{% block title %}My Account - {{ vendor.name }}{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{# app/templates/shop/account/forgot-password.html #}
|
||||
{# app/templates/storefront/account/forgot-password.html #}
|
||||
{# standalone #}
|
||||
<!DOCTYPE html>
|
||||
<html :class="{ 'dark': dark }" x-data="forgotPassword()" lang="en">
|
||||
@@ -1,4 +1,4 @@
|
||||
{# app/templates/shop/account/login.html #}
|
||||
{# app/templates/storefront/account/login.html #}
|
||||
<!DOCTYPE html>
|
||||
<html :class="{ 'dark': dark }" x-data="customerLogin()" lang="en">
|
||||
<head>
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/account/messages.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/account/messages.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Messages - {{ vendor.name }}{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/account/order-detail.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/account/order-detail.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Order Details - {{ vendor.name }}{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/account/orders.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/account/orders.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Order History - {{ vendor.name }}{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/account/profile.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/account/profile.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}My Profile - {{ vendor.name }}{% endblock %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{# app/templates/shop/account/register.html #}
|
||||
{# app/templates/storefront/account/register.html #}
|
||||
{# standalone #}
|
||||
<!DOCTYPE html>
|
||||
<html :class="{ 'dark': dark }" x-data="customerRegistration()" lang="en">
|
||||
@@ -1,4 +1,4 @@
|
||||
{# app/templates/shop/account/reset-password.html #}
|
||||
{# app/templates/storefront/account/reset-password.html #}
|
||||
{# standalone #}
|
||||
<!DOCTYPE html>
|
||||
<html :class="{ 'dark': dark }" x-data="resetPassword()" lang="en">
|
||||
@@ -1,4 +1,4 @@
|
||||
{# app/templates/shop/base.html #}
|
||||
{# app/templates/storefront/base.html #}
|
||||
{# Base template for vendor shop frontend with theme support #}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" x-data="{% block alpine_data %}shopLayoutData(){% endblock %}" x-bind:class="{ 'dark': dark }">
|
||||
@@ -38,7 +38,7 @@
|
||||
</style>
|
||||
|
||||
{# Tailwind CSS v4 (built locally via standalone CLI) #}
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='shop/css/tailwind.output.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='storefront/css/tailwind.output.css') }}">
|
||||
|
||||
{# Flag Icons for Language Selector with local fallback #}
|
||||
<link
|
||||
@@ -48,7 +48,7 @@
|
||||
/>
|
||||
|
||||
{# Base Shop Styles #}
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='shop/css/shop.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='storefront/css/storefront.css') }}">
|
||||
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
@@ -321,7 +321,7 @@
|
||||
<script src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
|
||||
|
||||
{# 4. Base Shop Layout (Alpine.js component - must load before Alpine) #}
|
||||
<script src="{{ url_for('static', path='shop/js/shop-layout.js') }}"></script>
|
||||
<script src="{{ url_for('static', path='storefront/js/storefront-layout.js') }}"></script>
|
||||
|
||||
{# 5. Utilities #}
|
||||
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/cart.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/cart.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Shopping Cart{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/checkout.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/checkout.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Checkout - {{ vendor.name }}{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/content-page.html #}
|
||||
{# app/templates/storefront/content-page.html #}
|
||||
{# Generic CMS content page template #}
|
||||
{% extends "shop/base.html" %}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{# Dynamic title from CMS #}
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/400.html #}
|
||||
{# app/templates/storefront/errors/400.html #}
|
||||
{# 400 Bad Request error page #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}❌{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/401.html #}
|
||||
{# app/templates/storefront/errors/401.html #}
|
||||
{# 401 Unauthorized error page - prompts login #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}🔐{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/403.html #}
|
||||
{# app/templates/storefront/errors/403.html #}
|
||||
{# 403 Forbidden error page - access restricted #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}🔒{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/404.html #}
|
||||
{# app/templates/storefront/errors/404.html #}
|
||||
{# 404 Not Found error page - uses base template with custom icon and message #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}🔍{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/422.html #}
|
||||
{# app/templates/storefront/errors/422.html #}
|
||||
{# 422 Unprocessable Entity error page - validation errors #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}📝{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/429.html #}
|
||||
{# app/templates/storefront/errors/429.html #}
|
||||
{# 429 Too Many Requests error page - rate limiting #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}⏱️{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/500.html #}
|
||||
{# app/templates/storefront/errors/500.html #}
|
||||
{# 500 Internal Server Error page #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}😔{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/502.html #}
|
||||
{# app/templates/storefront/errors/502.html #}
|
||||
{# 502 Bad Gateway error page - upstream service unavailable #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}🔧{% endblock %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{# app/templates/shop/errors/base.html #}
|
||||
{# app/templates/storefront/errors/base.html #}
|
||||
{# Error page base template using Tailwind CSS with vendor theme support #}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="h-full">
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/errors/generic.html #}
|
||||
{# app/templates/storefront/errors/generic.html #}
|
||||
{# Generic error page - fallback for any error code #}
|
||||
{% extends "shop/errors/base.html" %}
|
||||
{% extends "storefront/errors/base.html" %}
|
||||
|
||||
{% block icon %}⚠️{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/home.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/home.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Home{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/product.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/product.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}{{ product.name if product else 'Product' }}{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{# app/templates/shop/products.html #}
|
||||
{% extends "shop/base.html" %}
|
||||
{# app/templates/storefront/products.html #}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Products{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/templates/shop/search.html #}
|
||||
{# app/templates/storefront/search.html #}
|
||||
{# noqa: FE-001 - Shop uses custom pagination with vendor-themed styling (CSS variables) #}
|
||||
{% extends "shop/base.html" %}
|
||||
{% extends "storefront/base.html" %}
|
||||
|
||||
{% block title %}Search Results{% if query %} for "{{ query }}"{% endif %}{% endblock %}
|
||||
|
||||
@@ -7,7 +7,7 @@ This application has **4 distinct frontends**, each with its own templates and s
|
||||
1. **Platform** - Public platform pages (homepage, about, contact)
|
||||
2. **Admin** - Administrative control panel
|
||||
3. **Vendor** - Vendor management portal
|
||||
4. **Shop** - Customer-facing e-commerce store
|
||||
4. **Storefront** - Customer-facing e-commerce store
|
||||
|
||||
## Directory Structure
|
||||
|
||||
@@ -17,7 +17,7 @@ app/
|
||||
│ ├── platform/ # Platform public pages
|
||||
│ ├── admin/ # Admin portal pages
|
||||
│ ├── vendor/ # Vendor portal pages
|
||||
│ ├── shop/ # Shop customer pages
|
||||
│ ├── storefront/ # Storefront customer pages
|
||||
│ └── shared/ # Shared components (emails, errors)
|
||||
│
|
||||
└── static/
|
||||
@@ -33,7 +33,7 @@ app/
|
||||
│ ├── js/
|
||||
│ ├── css/
|
||||
│ └── img/
|
||||
├── shop/ # Shop static assets
|
||||
├── storefront/ # Storefront static assets
|
||||
│ ├── js/
|
||||
│ ├── css/
|
||||
│ └── img/
|
||||
@@ -130,13 +130,13 @@ app/
|
||||
|
||||
---
|
||||
|
||||
### 4. Shop Frontend
|
||||
### 4. Storefront Frontend
|
||||
|
||||
**Purpose:** Customer-facing e-commerce store
|
||||
|
||||
**Location:**
|
||||
- Templates: `app/templates/shop/`
|
||||
- Static: `static/shop/`
|
||||
- Templates: `app/templates/storefront/`
|
||||
- Static: `static/storefront/`
|
||||
|
||||
**Pages:**
|
||||
- Product catalog
|
||||
@@ -153,7 +153,7 @@ app/
|
||||
- Payment integration
|
||||
- Shopping cart management
|
||||
|
||||
**Routes:** `/shop/*`
|
||||
**Routes:** `/storefront/*`
|
||||
|
||||
**Authentication:** Optional (required for checkout)
|
||||
|
||||
@@ -230,23 +230,23 @@ Each frontend has its own static directory for frontend-specific assets. Use the
|
||||
|
||||
---
|
||||
|
||||
### Shop Static Assets (`static/shop/`)
|
||||
### Storefront Static Assets (`static/storefront/`)
|
||||
|
||||
**JavaScript Files:**
|
||||
```html
|
||||
<!-- In shop templates -->
|
||||
<script src="{{ url_for('static', path='shop/js/cart.js') }}"></script>
|
||||
<script src="{{ url_for('static', path='shop/js/checkout.js') }}"></script>
|
||||
<!-- In storefront templates -->
|
||||
<script src="{{ url_for('static', path='storefront/js/cart.js') }}"></script>
|
||||
<script src="{{ url_for('static', path='storefront/js/checkout.js') }}"></script>
|
||||
```
|
||||
|
||||
**CSS Files:**
|
||||
```html
|
||||
<link href="{{ url_for('static', path='shop/css/product-gallery.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', path='storefront/css/product-gallery.css') }}" rel="stylesheet">
|
||||
```
|
||||
|
||||
**Images:**
|
||||
```html
|
||||
<img src="{{ url_for('static', path='shop/img/placeholder-product.jpg') }}" alt="Product">
|
||||
<img src="{{ url_for('static', path='storefront/img/placeholder-product.jpg') }}" alt="Product">
|
||||
```
|
||||
|
||||
---
|
||||
@@ -271,7 +271,7 @@ Icon system (used by all 4 frontends) → static/shared/js/icons.js
|
||||
Admin dashboard chart → static/admin/js/charts.js
|
||||
Vendor product form → static/vendor/js/product-form.js
|
||||
Platform hero image → static/platform/img/hero.jpg
|
||||
Shop product carousel → static/shop/js/carousel.js
|
||||
Storefront product carousel → static/storefront/js/carousel.js
|
||||
```
|
||||
|
||||
---
|
||||
@@ -287,7 +287,7 @@ app/modules/{module}/static/
|
||||
├── admin/js/ # Admin pages for this module
|
||||
├── vendor/js/ # Vendor pages for this module
|
||||
├── shared/js/ # Shared across admin/vendor for this module
|
||||
└── shop/js/ # Shop pages for this module (if applicable)
|
||||
└── storefront/js/ # Storefront pages for this module (if applicable)
|
||||
```
|
||||
|
||||
### How Module Static Files Are Served
|
||||
@@ -385,7 +385,7 @@ The codebase distinguishes between three types of users:
|
||||
|
||||
This distinction is important:
|
||||
- `admin-users.js` and `users.js` manage **internal platform users** → Stay in `static/admin/js/`
|
||||
- `customers.js` manages **shop customers** → Lives in the customers module
|
||||
- `customers.js` manages **storefront customers** → Lives in the customers module
|
||||
|
||||
---
|
||||
|
||||
@@ -453,7 +453,7 @@ Each frontend has a base template:
|
||||
- `platform/base.html`
|
||||
- `admin/base.html`
|
||||
- `vendor/base.html`
|
||||
- `shop/base.html`
|
||||
- `storefront/base.html`
|
||||
|
||||
**Benefits:**
|
||||
- Consistent layout within frontend
|
||||
@@ -465,7 +465,7 @@ Each frontend has a base template:
|
||||
All frontends communicate with backend via APIs:
|
||||
- `/api/v1/admin/*` - Admin APIs
|
||||
- `/api/v1/vendor/*` - Vendor APIs
|
||||
- `/api/v1/shop/*` - Shop APIs
|
||||
- `/api/v1/storefront/*` - Storefront APIs
|
||||
- `/api/v1/platform/*` - Platform APIs
|
||||
|
||||
**Benefits:**
|
||||
@@ -483,7 +483,7 @@ All frontends communicate with backend via APIs:
|
||||
| Platform | Alpine.js | Tailwind | Heroicons | No | `/` |
|
||||
| Admin | Alpine.js | Tailwind | Heroicons | Yes (Admin) | `/admin` |
|
||||
| Vendor | Alpine.js | Tailwind | Heroicons | Yes (Vendor) | `/vendor/{code}` |
|
||||
| Shop | Alpine.js | Tailwind | Heroicons | Optional | `/shop` |
|
||||
| Storefront | Alpine.js | Tailwind | Heroicons | Optional | `/storefront` |
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
@@ -1,4 +1,4 @@
|
||||
// static/shop/js/shop-layout.js
|
||||
// static/storefront/js/storefront-layout.js
|
||||
/**
|
||||
* Shop Layout Component
|
||||
* Provides base functionality for vendor shop pages
|
||||