## Vendor-in-Token Architecture (Complete Migration) - Migrate all vendor API endpoints from require_vendor_context() to token_vendor_id - Update permission dependencies to extract vendor from JWT token - Add vendor exceptions: VendorAccessDeniedException, VendorOwnerOnlyException, InsufficientVendorPermissionsException - Shop endpoints retain require_vendor_context() for URL-based detection - Add AUTH-004 architecture rule enforcing vendor context patterns - Fix marketplace router missing /marketplace prefix ## Exception Pattern Fixes (API-003/API-004) - Services raise domain exceptions, endpoints let them bubble up - Add code_quality and content_page exception modules - Move business logic from endpoints to services (admin, auth, content_page) - Fix exception handling in admin, shop, and vendor endpoints ## Tailwind CSS Consolidation - Consolidate CSS to per-area files (admin, vendor, shop, platform) - Remove shared/cdn-fallback.html and shared/css/tailwind.min.css - Update all templates to use area-specific Tailwind output files - Remove Node.js config (package.json, postcss.config.js, tailwind.config.js) ## Documentation & Cleanup - Update vendor-in-token-architecture.md with completed migration status - Update architecture-rules.md with new rules - Move migration docs to docs/development/migration/ - Remove duplicate/obsolete documentation files - Merge pytest.ini settings into pyproject.toml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
80 lines
3.0 KiB
HTML
80 lines
3.0 KiB
HTML
{# app/templates/admin/base.html #}
|
|
<!DOCTYPE html>
|
|
<html :class="{ 'dark': dark }" x-data="{% block alpine_data %}data(){% endblock %}" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>{% block title %}Admin Panel{% endblock %} - Multi-Tenant Platform</title>
|
|
|
|
<!-- Fonts: Local fallback + Google Fonts -->
|
|
<link href="/static/shared/fonts/inter.css" rel="stylesheet" />
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
|
|
|
<!-- Tailwind CSS v4 (built locally via standalone CLI) -->
|
|
<link rel="stylesheet" href="{{ url_for('static', path='admin/css/tailwind.output.css') }}" />
|
|
|
|
<!-- Alpine Cloak -->
|
|
<style>
|
|
[x-cloak] { display: none !important; }
|
|
</style>
|
|
|
|
{% block extra_head %}{% endblock %}
|
|
</head>
|
|
<body x-cloak>
|
|
<div class="flex h-screen bg-gray-50 dark:bg-gray-900" :class="{ 'overflow-hidden': isSideMenuOpen }">
|
|
<!-- Sidebar (server-side included) -->
|
|
{% include 'admin/partials/sidebar.html' %}
|
|
|
|
<div class="flex flex-col flex-1 w-full">
|
|
<!-- Header (server-side included) -->
|
|
{% include 'admin/partials/header.html' %}
|
|
|
|
<!-- Main Content -->
|
|
<main class="h-full overflow-y-auto">
|
|
<div class="container px-6 mx-auto grid">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Core Scripts - ORDER MATTERS! -->
|
|
|
|
<!-- 1. FIRST: Log Configuration -->
|
|
<script src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
|
|
|
|
<!-- 2. SECOND: Icons (before Alpine.js) -->
|
|
<script src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
|
|
|
|
<!-- 3. THIRD: Alpine.js Base Data -->
|
|
<script src="{{ url_for('static', path='admin/js/init-alpine.js') }}"></script>
|
|
|
|
<!-- 4. FOURTH: Utils (standalone utilities) -->
|
|
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
|
|
|
|
<!-- 5. FIFTH: API Client (depends on Utils) -->
|
|
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
|
|
|
|
<!-- 6. SIXTH: Alpine.js v3 with CDN fallback (with defer) -->
|
|
<script>
|
|
(function() {
|
|
var script = document.createElement('script');
|
|
script.defer = true;
|
|
script.src = 'https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js';
|
|
|
|
script.onerror = function() {
|
|
console.warn('Alpine.js CDN failed, loading local copy...');
|
|
var fallbackScript = document.createElement('script');
|
|
fallbackScript.defer = true;
|
|
fallbackScript.src = '{{ url_for("static", path="shared/js/vendor/alpine.min.js") }}';
|
|
document.head.appendChild(fallbackScript);
|
|
};
|
|
|
|
document.head.appendChild(script);
|
|
})();
|
|
</script>
|
|
|
|
<!-- 7. LAST: Page-specific scripts -->
|
|
{% block extra_scripts %}{% endblock %}
|
|
</body>
|
|
</html> |