feat: add module definition completeness validation and permissions
Add new validation rules MOD-020 to MOD-023 for module definition completeness and standardize permissions across all modules. Changes: - Add MOD-020: Module definitions must have required attributes - Add MOD-021: Modules with menus should have features - Add MOD-022: Feature modules should have permissions - Add MOD-023: Modules with routers should use get_*_with_routers pattern Module permissions added: - analytics: view, export, manage_dashboards - billing: view_tiers, manage_tiers, view_subscriptions, manage_subscriptions, view_invoices - cart: view, manage - checkout: view_settings, manage_settings - cms: view_pages, manage_pages, view_media, manage_media, manage_themes - loyalty: view_programs, manage_programs, view_rewards, manage_rewards - marketplace: view_integration, manage_integration, sync_products - messaging: view_messages, send_messages, manage_templates - payments: view_gateways, manage_gateways, view_transactions Module improvements: - Complete cart module with features and permissions - Complete checkout module with features and permissions - Add features to catalog module - Add version to cms module - Fix loyalty platform_router attachment - Add path definitions to payments module - Remove empty scheduled_tasks from dev_tools module Documentation: - Update module-system.md with new validation rules - Update architecture-rules.md with MOD-020 to MOD-023 Tests: - Add unit tests for module definition completeness - Add tests for permission structure validation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
0
static/platform/css/.gitkeep
Normal file
0
static/platform/css/.gitkeep
Normal file
287
static/platform/css/tailwind.css
Normal file
287
static/platform/css/tailwind.css
Normal file
@@ -0,0 +1,287 @@
|
||||
/* static/platform/css/tailwind.css */
|
||||
/* Tailwind CSS v4 source file for Platform frontend */
|
||||
/* CSS-first configuration - no tailwind.config.js needed */
|
||||
|
||||
@import "tailwindcss";
|
||||
|
||||
/* Content sources for tree-shaking */
|
||||
@source "../../../app/templates/platform/**/*.html";
|
||||
@source "../../../app/templates/shared/**/*.html";
|
||||
@source "../js/**/*.js";
|
||||
|
||||
/* ==========================================================================
|
||||
THEME CONFIGURATION
|
||||
Migrated from legacy tailwind.config.js with Windmill color palette
|
||||
========================================================================== */
|
||||
|
||||
@theme {
|
||||
/* Font Family - Inter as primary sans-serif */
|
||||
--font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
|
||||
/* ==========================================================================
|
||||
COLOR PALETTE
|
||||
Custom colors from Windmill/Flowbite design system
|
||||
========================================================================== */
|
||||
|
||||
/* Gray - Custom darker palette */
|
||||
--color-gray-50: #f9fafb;
|
||||
--color-gray-100: #f4f5f7;
|
||||
--color-gray-200: #e5e7eb;
|
||||
--color-gray-300: #d5d6d7;
|
||||
--color-gray-400: #9e9e9e;
|
||||
--color-gray-500: #707275;
|
||||
--color-gray-600: #4c4f52;
|
||||
--color-gray-700: #24262d;
|
||||
--color-gray-800: #1a1c23;
|
||||
--color-gray-900: #121317;
|
||||
|
||||
/* Cool Gray */
|
||||
--color-cool-gray-50: #fbfdfe;
|
||||
--color-cool-gray-100: #f1f5f9;
|
||||
--color-cool-gray-200: #e2e8f0;
|
||||
--color-cool-gray-300: #cfd8e3;
|
||||
--color-cool-gray-400: #97a6ba;
|
||||
--color-cool-gray-500: #64748b;
|
||||
--color-cool-gray-600: #475569;
|
||||
--color-cool-gray-700: #364152;
|
||||
--color-cool-gray-800: #27303f;
|
||||
--color-cool-gray-900: #1a202e;
|
||||
|
||||
/* Red */
|
||||
--color-red-50: #fdf2f2;
|
||||
--color-red-100: #fde8e8;
|
||||
--color-red-200: #fbd5d5;
|
||||
--color-red-300: #f8b4b4;
|
||||
--color-red-400: #f98080;
|
||||
--color-red-500: #f05252;
|
||||
--color-red-600: #e02424;
|
||||
--color-red-700: #c81e1e;
|
||||
--color-red-800: #9b1c1c;
|
||||
--color-red-900: #771d1d;
|
||||
|
||||
/* Orange */
|
||||
--color-orange-50: #fff8f1;
|
||||
--color-orange-100: #feecdc;
|
||||
--color-orange-200: #fcd9bd;
|
||||
--color-orange-300: #fdba8c;
|
||||
--color-orange-400: #ff8a4c;
|
||||
--color-orange-500: #ff5a1f;
|
||||
--color-orange-600: #d03801;
|
||||
--color-orange-700: #b43403;
|
||||
--color-orange-800: #8a2c0d;
|
||||
--color-orange-900: #771d1d;
|
||||
|
||||
/* Yellow */
|
||||
--color-yellow-50: #fdfdea;
|
||||
--color-yellow-100: #fdf6b2;
|
||||
--color-yellow-200: #fce96a;
|
||||
--color-yellow-300: #faca15;
|
||||
--color-yellow-400: #e3a008;
|
||||
--color-yellow-500: #c27803;
|
||||
--color-yellow-600: #9f580a;
|
||||
--color-yellow-700: #8e4b10;
|
||||
--color-yellow-800: #723b13;
|
||||
--color-yellow-900: #633112;
|
||||
|
||||
/* Green */
|
||||
--color-green-50: #f3faf7;
|
||||
--color-green-100: #def7ec;
|
||||
--color-green-200: #bcf0da;
|
||||
--color-green-300: #84e1bc;
|
||||
--color-green-400: #31c48d;
|
||||
--color-green-500: #0e9f6e;
|
||||
--color-green-600: #057a55;
|
||||
--color-green-700: #046c4e;
|
||||
--color-green-800: #03543f;
|
||||
--color-green-900: #014737;
|
||||
|
||||
/* Teal */
|
||||
--color-teal-50: #edfafa;
|
||||
--color-teal-100: #d5f5f6;
|
||||
--color-teal-200: #afecef;
|
||||
--color-teal-300: #7edce2;
|
||||
--color-teal-400: #16bdca;
|
||||
--color-teal-500: #0694a2;
|
||||
--color-teal-600: #047481;
|
||||
--color-teal-700: #036672;
|
||||
--color-teal-800: #05505c;
|
||||
--color-teal-900: #014451;
|
||||
|
||||
/* Blue */
|
||||
--color-blue-50: #ebf5ff;
|
||||
--color-blue-100: #e1effe;
|
||||
--color-blue-200: #c3ddfd;
|
||||
--color-blue-300: #a4cafe;
|
||||
--color-blue-400: #76a9fa;
|
||||
--color-blue-500: #3f83f8;
|
||||
--color-blue-600: #1c64f2;
|
||||
--color-blue-700: #1a56db;
|
||||
--color-blue-800: #1e429f;
|
||||
--color-blue-900: #233876;
|
||||
|
||||
/* Indigo */
|
||||
--color-indigo-50: #f0f5ff;
|
||||
--color-indigo-100: #e5edff;
|
||||
--color-indigo-200: #cddbfe;
|
||||
--color-indigo-300: #b4c6fc;
|
||||
--color-indigo-400: #8da2fb;
|
||||
--color-indigo-500: #6875f5;
|
||||
--color-indigo-600: #5850ec;
|
||||
--color-indigo-700: #5145cd;
|
||||
--color-indigo-800: #42389d;
|
||||
--color-indigo-900: #362f78;
|
||||
|
||||
/* Purple */
|
||||
--color-purple-50: #f6f5ff;
|
||||
--color-purple-100: #edebfe;
|
||||
--color-purple-200: #dcd7fe;
|
||||
--color-purple-300: #cabffd;
|
||||
--color-purple-400: #ac94fa;
|
||||
--color-purple-500: #9061f9;
|
||||
--color-purple-600: #7e3af2;
|
||||
--color-purple-700: #6c2bd9;
|
||||
--color-purple-800: #5521b5;
|
||||
--color-purple-900: #4a1d96;
|
||||
|
||||
/* Pink */
|
||||
--color-pink-50: #fdf2f8;
|
||||
--color-pink-100: #fce8f3;
|
||||
--color-pink-200: #fad1e8;
|
||||
--color-pink-300: #f8b4d9;
|
||||
--color-pink-400: #f17eb8;
|
||||
--color-pink-500: #e74694;
|
||||
--color-pink-600: #d61f69;
|
||||
--color-pink-700: #bf125d;
|
||||
--color-pink-800: #99154b;
|
||||
--color-pink-900: #751a3d;
|
||||
|
||||
/* Extended max-height */
|
||||
--max-height-xl: 36rem;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
DARK MODE VARIANT
|
||||
Matches the .dark class pattern used in templates
|
||||
========================================================================== */
|
||||
|
||||
@variant dark (&:where(.dark, .dark *));
|
||||
|
||||
/* ==========================================================================
|
||||
CUSTOM UTILITIES
|
||||
Shadow outline utilities (migrated from plugin)
|
||||
========================================================================== */
|
||||
|
||||
@utility shadow-outline-gray {
|
||||
box-shadow: 0 0 0 3px hsla(0, 0%, 84%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-red {
|
||||
box-shadow: 0 0 0 3px hsla(0, 90%, 84%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-orange {
|
||||
box-shadow: 0 0 0 3px hsla(24, 97%, 77%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-yellow {
|
||||
box-shadow: 0 0 0 3px hsla(45, 97%, 53%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-green {
|
||||
box-shadow: 0 0 0 3px hsla(156, 70%, 70%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-teal {
|
||||
box-shadow: 0 0 0 3px hsla(183, 71%, 69%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-blue {
|
||||
box-shadow: 0 0 0 3px hsla(214, 95%, 84%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-indigo {
|
||||
box-shadow: 0 0 0 3px hsla(227, 94%, 85%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-purple {
|
||||
box-shadow: 0 0 0 3px hsla(259, 97%, 87%, 0.45);
|
||||
}
|
||||
|
||||
@utility shadow-outline-pink {
|
||||
box-shadow: 0 0 0 3px hsla(327, 87%, 84%, 0.45);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
FORM STYLES
|
||||
Custom form placeholder styling (replaces @tailwindcss/custom-forms)
|
||||
========================================================================== */
|
||||
|
||||
@layer base {
|
||||
input::placeholder,
|
||||
textarea::placeholder {
|
||||
color: var(--color-gray-400);
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
PLATFORM-SPECIFIC COMPONENTS
|
||||
========================================================================== */
|
||||
|
||||
@layer components {
|
||||
/* Gradient backgrounds */
|
||||
.gradient-primary {
|
||||
background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-purple-500) 100%);
|
||||
}
|
||||
|
||||
.gradient-accent {
|
||||
background: linear-gradient(135deg, var(--color-purple-500) 0%, var(--color-pink-500) 100%);
|
||||
}
|
||||
|
||||
/* Primary button */
|
||||
.btn-primary {
|
||||
background-color: var(--color-indigo-500);
|
||||
color: white;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 0.5rem;
|
||||
font-weight: 600;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
opacity: 0.9;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* Secondary button */
|
||||
.btn-secondary {
|
||||
background-color: var(--color-gray-100);
|
||||
color: var(--color-gray-700);
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 0.5rem;
|
||||
font-weight: 600;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.dark .btn-secondary {
|
||||
background-color: var(--color-gray-700);
|
||||
color: var(--color-gray-100);
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background-color: var(--color-gray-200);
|
||||
}
|
||||
|
||||
.dark .btn-secondary:hover {
|
||||
background-color: var(--color-gray-600);
|
||||
}
|
||||
|
||||
/* Card hover effect */
|
||||
.card-hover {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.card-hover:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
}
|
||||
2
static/platform/css/tailwind.output.css
Normal file
2
static/platform/css/tailwind.output.css
Normal file
File diff suppressed because one or more lines are too long
0
static/platform/img/.gitkeep
Normal file
0
static/platform/img/.gitkeep
Normal file
0
static/platform/js/.gitkeep
Normal file
0
static/platform/js/.gitkeep
Normal file
Reference in New Issue
Block a user