muspe-cli
v2.1.3
Published
MusPE Advanced Framework v2.1.3 - Mobile User-friendly Simple Progressive Engine with Enhanced CLI Tools, Specialized E-Commerce Templates, Material Design 3, Progressive Enhancement, Mobile Optimizations, Performance Analysis, and Enterprise-Grade Develo
Maintainers
Keywords
Readme
MusPE Framework v2.1.3 🚀
Mobile User-friendly Simple Progressive Engine - A comprehensive CLI framework for modern mobile-first web development with specialized templates, Material Design 3, progressive enhancement, and enterprise-grade developer tools.
✨ What's New in v2.1.3
🎯 Major Enhancements (v2.1.3)
- 🛒 Specialized E-Commerce Template - Complete product catalog with shopping cart, search, and progressive enhancement
- 📊 Dashboard Template - Analytics and data visualization with Chart.js integration
- 👥 Social Media Template - Feed layout with user interactions and infinite scroll
- 💼 Portfolio Template - Professional showcase with gallery and project displays
- 📝 Blog Template - Content management with Markdown support and syntax highlighting
- 🌐 Web Template - Modern landing page with hero section, features grid, and call-to-action
- ⚡ SPA Template - Single Page Application with client-side routing and dynamic content loading
- 📱 PWA Template - Progressive Web App with install prompts, offline support, and service workers
- 📱 Enhanced Mobile Commands -
muspe mobile:preview,muspe mobile:test,muspe mobile:deploy - ⚡ Performance Analysis -
muspe analyze --mobile,muspe lighthouse, bundle analysis - 🧩 Advanced Component Generation - Mobile-optimized components with progressive enhancement
- 🎨 Progressive Enhancement System - Material Design 3 with automatic fallbacks
- 🚀 Enhanced Mobile Optimizations - Touch optimizations, viewport handling, fast-click support
🔧 Latest Improvements (v2.1.2)
- 🎨 Enhanced Material Design 3 Integration - Material Design 3 is now the primary and default CSS framework choice in CLI
- 🐛 Fixed Critical Init Bug -
muspe initcommand now properly generates complete project files instead of empty directories - 📁 Complete File Generation - All project templates now include working HTML, CSS, JavaScript, and configuration files
- 📚 Improved Framework Documentation - Updated all documentation to accurately reflect Material Design 3 support
- 🏗️ Enhanced Project Structure - Every generated project includes functional layouts, components, and services
- ⚡ Template System Optimization - Improved file generation and layout system implementation
🎯 Core Features (v2.1)
🎯 Enhanced CLI Framework - Comprehensive project management and validation
🌟 Material Design 3 - Latest Material.io components with dynamic theming
📱 Advanced Layout System - 4 pre-built responsive layout types
🎨 Dynamic Template Engine - Powerful templating with reusable UI patterns
🧪 Comprehensive Testing - Unit, E2E, performance, and accessibility testing
⚡ Project Validation - Real-time project health monitoring and auto-fixes
🛠️ Enhanced DevTools - Advanced debugging and development tools
🔧 Modern Workflows - Complete development lifecycle support
🚀 Key Features
🎯 CLI Framework
- Project Validation: Comprehensive health checks with auto-fix capabilities
- Testing Framework: Jest, Cypress, Lighthouse, and axe-core integration
- Interactive Setup: Guided project initialization with feature selection
- Code Generation: Automated component, page, and service generation
- Build Optimization: Advanced bundling with tree-shaking and compression
- Multi-Platform Deployment: Server, Android, iOS, Docker, and PWA support
🎨 Material Design Integration
- Material Design 3: Latest MD3 components and design tokens
- Dynamic Theming: Adaptive color schemes and typography
- Component Library: Complete set of web components (
<md-*>tags) - Responsive Layouts: Mobile-first responsive design patterns
- Advanced Animations: Smooth transitions and micro-interactions
- Accessibility: WCAG compliant with screen reader support
📱 Mobile-First Development
- Touch Gestures: Built-in swipe, pinch, and tap gesture support
- Device APIs: Geolocation, orientation, network status, and more
- Cordova Integration: Native mobile app development
- PWA Support: Service workers, offline functionality, and app manifests
- Performance Optimized: Memory management and performance monitoring
- Responsive Design: Automatic device detection and viewport optimization
🛠️ Developer Experience
- Hot Reload: Instant development feedback with state preservation
- Advanced DevTools: Component inspector, performance profiler, and debugging
- TypeScript Ready: Full TypeScript support with intelligent completion
- Modern Tooling: Vite, PostCSS, and modern build tools
- Code Quality: ESLint, Prettier, and automated quality checks
📦 Installation
Global CLI Installation
npm install -g [email protected]✨ Automatic Setup: The installation automatically configures your shell PATH!
Verification
muspe --version # Should show v2.1.2
muspe --help # View all available commands🚀 Quick Start
Create a New Project with Specialized Templates
# Interactive project creation with enhanced templates
muspe create my-awesome-app
# E-Commerce Store (NEW in v2.1.3)
muspe create my-store --template ecommerce --framework material
# Dashboard Application (NEW in v2.1.3)
muspe create my-dashboard --template dashboard --framework material
# Social Media Platform (NEW in v2.1.3)
muspe create my-social --template social --framework material
# Portfolio Website (NEW in v2.1.3)
muspe create my-portfolio --template portfolio --framework material
# Blog Platform (NEW in v2.1.3)
muspe create my-blog --template blog --framework material
# Traditional templates
muspe create my-app --template mobile --framework material
muspe create my-app --template web --framework tailwind
muspe create my-spa --template spa --framework material
muspe create my-app --template pwa --framework bootstrapInitialize Existing Directory
# Enhanced interactive setup
muspe initChoose from multiple templates, frameworks, and features:
- Templates: E-Commerce, Dashboard, Social Media, Portfolio, Blog, Mobile, Web, PWA, Hybrid
- Frameworks: Material Design 3, Tailwind CSS, Bootstrap, Custom CSS
- Features: Testing, Authentication, i18n, Themes, Analytics, Progressive Enhancement
🛒 Specialized Templates (NEW v2.1.3)
E-Commerce Template
Complete e-commerce solution with:
- Product Catalog - Responsive product grid with search and filtering
- Shopping Cart - LocalStorage persistence with real-time updates
- Progressive Enhancement - Material Design 3 with automatic fallbacks
- Mobile Optimized - Touch-friendly interface with gesture support
- Search & Filter - Real-time product search with category filtering
muspe create my-store --template ecommerce
# Generates: ProductService, CartService, ProductCard, SearchBar, CartModalDashboard Template
Analytics and data visualization with:
- Chart Integration - Chart.js with responsive charts
- Widget System - Modular dashboard widgets
- Data Visualization - D3.js integration for advanced charts
- Real-time Updates - Live data refresh capabilities
muspe create my-dashboard --template dashboard
# Generates: ChartService, WidgetManager, Analytics componentsSocial Media Template
Social platform features with:
- Feed Layout - Infinite scroll with optimized rendering
- User Interactions - Like, share, comment functionality
- Media Handling - Image and video upload with optimization
- Real-time Updates - Live notifications and updates
muspe create my-social --template social
# Generates: FeedService, UserService, MediaUpload, NotificationSystemPortfolio Template
Professional showcase with:
- Project Gallery - Lightbox gallery with category filtering
- Contact Forms - Built-in contact form with validation
- SEO Optimized - Meta tags and structured data
- Animation Effects - Smooth scroll and reveal animations
muspe create my-portfolio --template portfolio
# Generates: ProjectGallery, ContactForm, SEO utilities, Animation systemBlog Template
Content management with:
- Markdown Support - Full Markdown rendering with syntax highlighting
- Article Management - CRUD operations for blog posts
- Comment System - User comments with moderation
- SEO Features - Automatic meta tags and sitemap generation
muspe create my-blog --template blog
# Generates: ArticleService, MarkdownRenderer, CommentSystem, SEO utilities📋 CLI Commands
Core Commands
# Project Management
muspe create <name> # Create new project with specialized templates
muspe init # Initialize current directory
muspe validate [--fix] # Validate project health
muspe serve [--port 3000] # Start development server
muspe build [--production] # Build for production
# Enhanced Serve Options (NEW v2.1.3)
muspe serve --mobile-preview # Open mobile device simulator
muspe serve --network # Expose on network for device testing
muspe build --analyze # Bundle analysis for optimization
muspe build --mobile # Mobile-specific optimizationsEnhanced Code Generation (NEW v2.1.3)
# Component Generation with Templates
muspe generate component ProductCard --mobile-optimized
muspe generate component UserProfile --type=user
muspe generate page Products --template=grid
muspe generate service ProductAPI --with-cache
# Specialized Component Types
muspe component ProductCard --template=product --mobile
muspe page Dashboard --template=analytics --route=/dashboard
muspe service CartService --with-cache --api-url=/api/cart
# Template-Specific Generation
muspe generate component ShoppingCart --type=product
muspe generate component ChartWidget --type=chart
muspe generate page UserFeed --template=socialMobile Development Commands (NEW v2.1.3)
# Mobile Tools
muspe mobile preview # Open mobile simulator
muspe mobile test # Run mobile-specific tests
muspe mobile deploy # Deploy to mobile platforms
# Mobile Preview Options
muspe mobile preview --device=iphone
muspe mobile preview --device=android
muspe mobile preview --device=tabletPerformance Analysis (NEW v2.1.3)
# Performance Analysis
muspe analyze # General performance analysis
muspe analyze --mobile # Mobile-specific metrics
muspe analyze --bundle # Bundle size analysis
muspe lighthouse # Run Lighthouse audit
muspe lighthouse --mobile # Mobile Lighthouse audit
# Bundle Analysis
muspe build --analyze # Analyze bundle with webpack-bundle-analyzerTesting & Quality
muspe test [suite] # Run test suites
muspe test unit # Run unit tests
muspe test e2e # Run E2E tests
muspe test performance # Run Lighthouse audits
muspe test accessibility # Run accessibility tests
# Deployment
muspe deploy server --release
muspe deploy android --bundle
muspe deploy ios --archive
muspe deploy docker --run
muspe deploy pwa --releaseEnhanced Validation
# Comprehensive project validation
muspe validate
# Auto-fix common issues
muspe validate --fix
# Quiet mode (errors/warnings only)
muspe validate --quietValidation Checks:
- ✅ Configuration files (muspe.config.js, package.json)
- ✅ Dependencies and versions
- ✅ Project structure and required files
- ✅ Code quality and best practices
- ✅ HTML validation and accessibility
- ✅ Auto-fix capabilities for common issues
🎨 Material Design 3 Integration
Components
<!-- Material.io Web Components -->
<md-filled-button>Primary Action</md-filled-button>
<md-outlined-button>Secondary Action</md-outlined-button>
<md-card>
<div style="padding: 1rem;">
<h3>Card Title</h3>
<p>Card content with Material Design styling.</p>
</div>
</md-card>
<md-text-field label="Email" type="email"></md-text-field>
<md-filled-text-field label="Password" type="password"></md-filled-text-field>
<md-fab aria-label="Add">
<span slot="icon" class="material-symbols-outlined">add</span>
</md-fab>Dynamic Theming
// Automatic theme adaptation
const theme = {
primary: '#3b82f6',
secondary: '#6b7280',
surface: '#ffffff',
background: '#f8fafc'
};
// Apply theme to Material components
MusPE.theme.apply(theme);🏗️ Advanced Layout System
Layout Types
// Base Layout - Foundation for all layouts
const baseLayout = LayoutFactory.create('base', {
title: 'My App',
showHeader: true,
showFooter: true
});
// Material Layout - Material Design layout
const materialLayout = LayoutFactory.create('material', {
title: 'Material App',
hasSidebar: true,
fabAction: {
icon: 'add',
label: 'Add Item',
handler: () => console.log('FAB clicked!')
}
});
// Mobile Layout - Mobile-optimized
const mobileLayout = LayoutFactory.create('mobile', {
title: 'Mobile App',
hasBottomNav: true,
bottomNavItems: [
{ icon: 'home', label: 'Home', route: '/' },
{ icon: 'search', label: 'Search', route: '/search' },
{ icon: 'person', label: 'Profile', route: '/profile' }
]
});
// Dashboard Layout - Dashboard with widgets
const dashboardLayout = LayoutFactory.create('dashboard', {
title: 'Dashboard',
widgets: [
{ title: 'Stats', content: '<p>Widget content</p>' },
{ title: 'Chart', content: '<canvas></canvas>' }
],
gridColumns: 'material-grid-3'
});Apply Layout
// Apply layout to container
layout.applyTo('#app', '<div>Main content here</div>');📄 Dynamic Template Engine
Template Usage
// Render user profile
const profileHtml = Templates.userProfile({
name: 'Sarah Wilson',
email: '[email protected]',
role: 'Designer',
avatar: '/images/avatar.jpg',
id: '123'
});
// Render statistics widget
const statsHtml = Templates.statsWidget({
title: 'Active Users',
value: '2,451',
icon: 'people',
color: 'success',
change: '+12%',
changeType: 'positive',
subtitle: 'This month'
});
// Render alert message
const alertHtml = Templates.alert({
type: 'success',
title: 'Success!',
message: 'Your changes have been saved.',
dismissible: true
});Template Engine Features
// Variable interpolation
Templates.render('Hello {{name}}!', { name: 'World' });
// Conditional rendering
Templates.render('{{if user.active "Active" "Inactive"}}', { user: { active: true } });
// Helper functions
Templates.render('{{icon "home" "icon-lg"}}', {});
Templates.render('{{button "Click me" "filled" "add" "handleClick()"}}', {});🧪 Comprehensive Testing
Test Suites
# Run all test suites
muspe test
# Individual test suites
muspe test unit # Jest unit tests
muspe test component # Component testing
muspe test e2e # Cypress E2E tests
muspe test performance # Lighthouse performance
muspe test accessibility # axe-core accessibility
# Test options
muspe test --verbose # Detailed output
muspe test --watch # Watch modeTest Structure
tests/
├── unit/ # Unit tests (Jest)
│ └── muspe.test.js
├── components/ # Component tests
│ └── AppHeader.test.js
├── e2e/ # E2E tests (Cypress)
│ ├── app.cy.js
│ └── support/
└── setup.js # Test configurationExample Tests
// Unit test example
describe('MusPE Core', () => {
test('should create DOM elements', () => {
const element = MusPE.dom.create('div', {
class: 'test-element',
textContent: 'Hello World'
});
expect(element.tagName).toBe('DIV');
expect(element.className).toBe('test-element');
expect(element.textContent).toBe('Hello World');
});
});
// E2E test example
describe('MusPE App E2E', () => {
it('should load the homepage', () => {
cy.visit('/');
cy.contains('Welcome to');
cy.get('.app-header').should('be.visible');
cy.get('md-filled-button').should('exist');
});
});🏗️ Project Structure
my-app/
├── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Application pages
│ ├── layouts/ # Layout components
│ │ ├── BaseLayout.js
│ │ ├── MaterialLayout.js
│ │ ├── MobileLayout.js
│ │ └── DashboardLayout.js
│ ├── templates/ # Template engine
│ │ ├── TemplateEngine.js
│ │ ├── CommonTemplates.js
│ │ └── index.js
│ ├── services/ # API services and data layer
│ ├── styles/ # CSS/Styling files
│ ├── scripts/ # JavaScript files
│ ├── utils/ # Utility functions & libraries
│ ├── core/ # MusPE core framework
│ └── assets/ # Images, icons, fonts
├── public/ # Static files
│ ├── index.html # Main HTML file
│ ├── manifest.json # PWA manifest
│ └── sw.js # Service worker
├── tests/ # Test files
│ ├── unit/
│ ├── components/
│ ├── e2e/
│ └── setup.js
├── docs/ # Documentation
├── muspe.config.js # MusPE configuration
├── jest.config.js # Jest configuration
├── cypress.config.js # Cypress configuration
└── package.json⚙️ Configuration
muspe.config.js
module.exports = {
// Project configuration
name: 'my-app',
template: 'mobile',
framework: 'material', // Options: 'material', 'tailwind', 'bootstrap', 'custom'
// Development server
server: {
port: 3000,
host: 'localhost',
open: true,
hot: true
},
// Build configuration
build: {
outDir: 'dist',
minify: true,
sourcemap: true,
target: 'modern',
cssCodeSplit: true
},
// PWA configuration
pwa: {
enabled: true,
manifest: './public/manifest.json',
serviceWorker: './src/sw.js',
workboxOptions: {
runtimeCaching: [
{
urlPattern: /^https:\/\/api\./,
handler: 'NetworkFirst',
options: {
cacheName: 'api-cache',
expiration: {
maxEntries: 50,
maxAgeSeconds: 300
}
}
}
]
}
},
// Mobile configuration
mobile: {
viewport: 'width=device-width, initial-scale=1.0, user-scalable=no',
statusBar: 'default',
orientation: 'portrait',
cordova: true
},
// Feature flags
features: {
testing: true,
analytics: false,
auth: false,
stateManagement: false,
i18n: false,
themes: true
},
// Plugin configuration
plugins: [
'@muspe/plugin-material',
'@muspe/plugin-tailwind',
'@muspe/plugin-analytics'
]
};🎨 Component Development
Modern Component Structure
// src/components/UserCard.js
class UserCard {
constructor(options = {}) {
this.options = {
className: 'user-card',
...options
};
this.element = null;
this.isMounted = false;
}
render() {
// Use MusPE DOM utilities
this.element = MusPE.dom.create('div', {
class: this.options.className,
html: `
<md-card class="user-card">
<div style="padding: 1rem;">
<div class="user-avatar">
<img src="${this.options.avatar}" alt="${this.options.name}">
</div>
<h3>${this.options.name}</h3>
<p style="color: #6b7280;">${this.options.email}</p>
<md-filled-button onclick="this.viewProfile()">
<span slot="icon" class="material-symbols-outlined">person</span>
View Profile
</md-filled-button>
</div>
</md-card>
`
});
this.setupEventListeners();
return this.element;
}
setupEventListeners() {
// Event delegation with MusPE DOM utilities
MusPE.dom.on(this.element, 'click', 'md-filled-button', (e) => {
this.viewProfile();
});
}
viewProfile() {
// Navigate to profile page
router.push(`/profile/${this.options.id}`);
}
mount(container) {
const rendered = this.render();
MusPE.dom.append(container, rendered);
MusPE.dom.fadeIn(rendered, 300);
this.isMounted = true;
}
destroy() {
if (this.element && this.element.parentNode) {
MusPE.dom.fadeOut(this.element, 300).then(() => {
MusPE.dom.remove(this.element);
this.isMounted = false;
});
}
}
}
// Export for use
export default UserCard;Using Templates
// Generate component with templates
const userCardHtml = Templates.userProfile({
name: 'Sarah Wilson',
email: '[email protected]',
role: 'Designer',
avatar: '/images/sarah.jpg',
id: '123'
});
// Render to DOM
document.querySelector('#user-container').innerHTML = userCardHtml;🧰 Built-in Utilities
DOM Utilities
// Element selection
const el = MusPE.$('.my-element');
const els = MusPE.$$('.my-elements');
// Element creation with Material components
const button = MusPE.dom.create('md-filled-button', {
textContent: 'Click me',
events: {
click: () => console.log('Clicked!')
}
});
// Element manipulation
MusPE.dom.addClass(el, 'active');
MusPE.dom.css(el, { color: 'blue', fontSize: '16px' });
MusPE.dom.show(el);
MusPE.dom.hide(el);
// Smooth animations
MusPE.dom.fadeIn(el, 300);
MusPE.dom.slideDown(el, 400);
// Event handling with delegation
MusPE.dom.on(document, 'click', 'md-filled-button', (e) => {
console.log('Material button clicked:', e.target);
});HTTP Utilities
// Enhanced fetch with modern features
const data = await MusPE.http.get('/api/users');
const result = await MusPE.http.post('/api/users', { name: 'John' });
// Advanced features
const response = await MusPE.http.get('/api/data', {
timeout: 5000,
cache: true,
retry: true,
headers: {
'Authorization': 'Bearer token'
}
});
// File operations
await MusPE.http.upload('/api/upload', file, {
fields: { description: 'My file' }
});
await MusPE.http.downloadAsFile('/api/report.pdf', 'report.pdf');📱 Mobile Development
Cordova Integration
# Setup Cordova
muspe add cordova
# Add platforms
muspe cordova platform add android
muspe cordova platform add ios
# Build and run
muspe cordova build android
muspe cordova run androidDevice APIs
// Device information
if (MusPE.cordova.isCordova()) {
const deviceInfo = MusPE.cordova.getDeviceInfo();
console.log('Platform:', deviceInfo.platform);
}
// Camera access
const imageUri = await MusPE.cordova.camera.getPicture({
quality: 75,
destinationType: Camera.DestinationType.FILE_URI
});
// Geolocation
const position = await MusPE.cordova.geolocation.getCurrentPosition();
// Network status
const networkInfo = MusPE.cordova.getNetworkInfo();🚀 Deployment
Multi-Platform Deployment
# Deploy to all platforms
muspe deploy all --release
# Platform-specific deployment
muspe deploy server --release --ssr
muspe deploy android --release --bundle
muspe deploy ios --release --archive
muspe deploy docker --release --run
muspe deploy pwa --releaseDeployment Features
- Server Deployment: Static hosting, Node.js, and SSR support
- Mobile Apps: Android APK/AAB and iOS IPA generation
- Docker: Multi-stage builds with optimization
- PWA: Service workers and offline functionality
- CI/CD: GitHub Actions workflows included
🌟 Benefits & Comparison
✅ MusPE Advantages
| Feature | MusPE v2.0 | Framework7 | React Native | Ionic | |---------|------------|------------|--------------|-------| | Learning Curve | ✅ Easy | ⚠️ Moderate | ❌ Steep | ⚠️ Moderate | | CLI Tools | ✅ Comprehensive | ❌ Limited | ⚠️ Basic | ✅ Good | | Material Design 3 | ✅ Built-in | ❌ No | ❌ No | ⚠️ Limited | | Testing Framework | ✅ Complete | ❌ Manual | ⚠️ Basic | ⚠️ Basic | | Project Validation | ✅ Advanced | ❌ No | ❌ No | ❌ No | | Template Engine | ✅ Dynamic | ❌ No | ❌ No | ❌ No | | Layout System | ✅ Advanced | ❌ Manual | ❌ Manual | ⚠️ Basic | | Web + Mobile | ✅ Unified | ✅ Yes | ❌ Mobile only | ✅ Yes |
🎯 When to Use MusPE
✅ Perfect For:
- Mobile-first web applications
- Progressive Web Apps (PWAs)
- Hybrid mobile development
- Rapid prototyping and MVP development
- Teams wanting modern tooling with minimal setup
- Projects requiring Material Design consistency
❌ Consider Alternatives For:
- Simple static websites
- Large existing React/Vue codebases
- Projects requiring IE11 support
- Native-only mobile apps
📚 Documentation
Quick Links
- API Reference - Complete API documentation
- Developer Guide - Best practices and patterns
- Testing Guide - Testing strategies and examples
- Deployment Guide - Production deployment
- Migration Guide - Upgrading and migration
Complete Documentation
- Installation Guide
- Quick Start Tutorial
- Project Structure
- Component System
- Material Design Integration
- Layout System
- Template Engine
- Mobile Development
- Performance Optimization
- Troubleshooting
📄 License
MIT License - see LICENSE file for details.
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed contribution guidelines.
💬 Community & Support
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Community Q&A
- Documentation - Comprehensive guides
- Examples - Sample projects
🏆 Success Stories
"MusPE's validation and testing tools caught 15 critical issues before deployment. The CLI saved our team weeks of setup time."
- Sarah Chen, Lead Developer at TechCorp
"The Material Design 3 integration is seamless. Our designers love the consistency across all platforms."
- Michael Rodriguez, Senior Engineer at StartupXYZ
"Migrating from Create React App to MusPE gave us mobile deployment and better developer tools instantly."
- Alex Thompson, CTO at MobileFirst Inc.
MusPE v2.0 - The most comprehensive mobile-first development framework! 🚀📱
Built for developers who want to create amazing mobile experiences without the complexity.
