How zuramai/mazer works
Project Type and Purpose
• This is a static front-end admin dashboard template built with Bootstrap 5, SCSS, and Vanilla JS, packaged and served via Vite (with Docker support). There is no backend—it’s purely client-side assets and HTML templates.
File Structure
• Top-level build/config files:
• Dockerfile, .dockerignore
• vite.config.js, package.json
• Source folder (src/):
• HTML pages and layout templates (*.html, layouts/, partials/)
• JSON files for menus (sidebar-items.json, horizontal-menu-items.json)
• Assets:
– SCSS modules under assets/scss/ (variables, components, pages, themes)
– JavaScript under assets/js/ (application logic)
– Static assets under assets/static/ (fonts, images, static JS)
• Build scripts & workflows in .github/workflows/ for demo, release, stale checks.
README for Additional Insights
• Dev workflow: npm install → npm run dev (Vite dev server at localhost:5173)
• Production: npm run build outputs compiled CSS/JS; can be served via Docker container or CDN.
• External libs: ApexCharts, Perfect Scrollbar, various editors (Quill, CKEditor), Leaflet, Datatables, SweetAlert2, Toastify, Iconly, Dripicons.
Main Components & Their Relationships
a. Developer Workstation
• Source code (HTML/SCSS/JS)
• Vite tool + Node.js/npm
b. Build Pipeline (Vite)
• Reads SCSS modules, JS modules, HTML entry points
• Outputs compiled assets (CSS, JS), optimized HTML
c. Asset Bundles
• dist/ folder (production bundle)
d. Deployment Targets
• Static file server (Nginx inside Docker)
• CDN (jsdelivr) for compiled assets
e. End User Browser
• Requests HTML → pulls CSS/JS → renders dashboard
Important Architectural Patterns
• Modular SCSS: components/, pages/, themes/—compile into a single app.css and app-dark.css.
• Vanilla JS modules: assets/js/app.js handles global behaviors; assets/static/js/pages/*.js for per-page scripts.
• Template-based HTML: Reusable layouts/ and partials/ for consistent header/sidebar/footer.
• CI/CD: GitHub workflows for demo site, releases, stale PR management.
Detailed Capture of Essential Elements
• Don’t just lump “Assets” together; separate CSS pipeline, JS pipeline, and HTML templating.
• That the SCSS tree under assets/scss and JS under assets/static/js/pages feed into distinct bundles.
• Two CSS outputs: app.css and app-dark.css (theme switching via initTheme.js).