Real-world examples of complex automation workflows using NikCLI
# Comprehensive e-commerce platform development
/auto "Create a complete e-commerce platform with the following requirements:
Frontend:
- Next.js 14 with TypeScript and App Router
- Tailwind CSS for styling with dark mode support
- Product catalog with search and filtering
- Shopping cart and checkout process
- User authentication and profile management
- Order history and tracking
- Responsive design for mobile and desktop
Backend:
- Node.js with Express and TypeScript
- PostgreSQL database with Prisma ORM
- JWT-based authentication with refresh tokens
- RESTful API with OpenAPI documentation
- Payment processing with Stripe integration
- Email notifications with SendGrid
- Image upload with AWS S3 integration
- Rate limiting and security middleware
Database:
- User management (auth, profiles, preferences)
- Product catalog (categories, inventory, pricing)
- Order management (cart, orders, payments)
- Review and rating system
- Admin panel data structures
DevOps:
- Docker containers for all services
- Docker Compose for local development
- GitHub Actions CI/CD pipeline
- Automated testing (unit, integration, e2e)
- Environment-specific configurations
- Health checks and monitoring
- Deployment to AWS ECS with RDS
Quality & Security:
- Comprehensive test coverage (80%+)
- Security best practices implementation
- Performance optimization
- Accessibility compliance (WCAG 2.1 AA)
- SEO optimization
- Error handling and logging
Please create this step-by-step with proper project structure, documentation, and deployment instructions."
Multi-Tenant Project Management SaaS
# Complete SaaS project management application
/auto "Build a comprehensive multi-tenant project management SaaS application:
Core Features:
- Multi-tenant architecture with data isolation
- Team and user management with role-based permissions
- Project creation and management with templates
- Task management with Kanban and list views
- Time tracking and reporting
- File sharing and document management
- Team collaboration tools (comments, mentions, notifications)
- Gantt charts and project timeline visualization
- Resource allocation and capacity planning
- Integration with popular tools (Slack, GitHub, Jira)
Technical Stack:
- Frontend: React 18 with TypeScript, Vite, and React Query
- Backend: Node.js with Fastify and TypeScript
- Database: PostgreSQL with row-level security for multi-tenancy
- Authentication: Auth0 integration with SSO support
- File Storage: AWS S3 with CDN
- Real-time: WebSocket for live collaboration
- Search: Elasticsearch for advanced search capabilities
- Email: Transactional emails with templates
Business Features:
- Subscription billing with Stripe
- Usage-based pricing tiers
- Free trial with feature limitations
- Admin dashboard for system management
- Analytics and reporting for customers
- White-label options for enterprise customers
Enterprise Requirements:
- GDPR and SOC 2 compliance
- Single Sign-On (SSO) with SAML/OIDC
- Advanced security features
- Audit logging and compliance reporting
- 99.9% uptime SLA with monitoring
- Scalable infrastructure design
Include comprehensive testing, documentation, and deployment automation."
AI-Powered Content Management SaaS
# AI-powered content management and optimization SaaS
/auto "Create an AI-powered content management SaaS with advanced automation:
Content Management:
- WYSIWYG editor with collaborative editing
- AI-powered content generation and suggestions
- Automated SEO optimization and scoring
- Content scheduling and publishing workflows
- Multi-channel publishing (blog, social media, newsletters)
- Content performance analytics and insights
- A/B testing for content optimization
- Automated content translation to multiple languages
AI Features:
- Content idea generation based on trends
- Automated content writing assistance
- Image generation and optimization
- Content sentiment analysis
- Automated tagging and categorization
- Plagiarism detection and originality scoring
- Content readability optimization
- Automated social media post creation
Technical Implementation:
- Frontend: Next.js 14 with TypeScript and Tailwind CSS
- Backend: Python FastAPI with async/await
- Database: PostgreSQL with vector extensions for AI features
- AI Integration: OpenAI GPT-4, DALL-E, and custom models
- Search: Vector search with embeddings
- File Processing: Background jobs with Celery
- Caching: Redis for performance optimization
- CDN: CloudFront for global content delivery
Business Logic:
- Usage-based pricing for AI features
- Team collaboration with granular permissions
- Brand management and consistency checking
- Content workflow automation
- Integration with popular CMS platforms
- API for custom integrations
Include advanced monitoring, security, and compliance features."
# Automated legacy monolith modernization
/auto "Modernize a legacy PHP monolith application to microservices architecture:
Current State Analysis:
- Large PHP application with mixed MVC patterns
- MySQL database with complex relationships
- jQuery-based frontend with server-side rendering
- Tightly coupled business logic
- No automated testing
- Manual deployment process
- Performance and scaling issues
Modernization Goals:
- Break down into logical microservices
- Implement event-driven architecture
- Modern frontend with React/TypeScript
- Automated CI/CD pipelines
- Comprehensive testing strategy
- Container-based deployment
- Observability and monitoring
Migration Strategy:
1. Code Analysis and Service Boundaries:
- Analyze existing codebase for service boundaries
- Identify data dependencies and relationships
- Create migration roadmap with phases
- Risk assessment and mitigation strategies
2. Database Migration:
- Design new database schema per service
- Create data migration scripts
- Implement gradual data migration strategy
- Ensure data consistency during transition
3. Service Implementation:
- User Management Service (Node.js + TypeScript)
- Product Catalog Service (Python + FastAPI)
- Order Management Service (Java + Spring Boot)
- Payment Processing Service (Node.js + TypeScript)
- Notification Service (Go)
4. Frontend Modernization:
- React application with TypeScript
- Micro-frontend architecture
- Component library and design system
- Modern state management
- Progressive migration strategy
5. Integration Layer:
- API Gateway with Kong or AWS API Gateway
- Event streaming with Apache Kafka
- Service mesh with Istio
- Circuit breakers and resilience patterns
6. DevOps Transformation:
- Kubernetes deployment
- GitOps with ArgoCD
- Comprehensive monitoring with Prometheus/Grafana
- Distributed tracing with Jaeger
- Automated testing and quality gates
Create detailed migration plan, implementation timeline, and rollback procedures."
Oracle to PostgreSQL Migration
# Automated Oracle to PostgreSQL migration with application updates
/auto "Migrate enterprise application from Oracle database to PostgreSQL:
Current Oracle Setup:
- Oracle 19c database with complex schemas
- Stored procedures and functions (PL/SQL)
- Custom data types and collections
- Materialized views and triggers
- Partitioned tables for large datasets
- Custom indexing strategies
- Database links and synonyms
Migration Objectives:
- Complete migration to PostgreSQL 16
- Maintain data integrity and performance
- Minimize application downtime
- Reduce licensing costs
- Improve development productivity
- Enable cloud deployment options
Migration Strategy:
1. Schema Analysis and Conversion:
- Analyze Oracle schema structures
- Convert Oracle-specific features to PostgreSQL equivalents
- Handle data type mappings and constraints
- Convert indexes and performance optimizations
2. PL/SQL to PL/pgSQL Conversion:
- Convert stored procedures and functions
- Handle Oracle-specific constructs
- Optimize for PostgreSQL performance characteristics
- Maintain business logic integrity
3. Data Migration:
- Create ETL pipelines for data transfer
- Handle large dataset migration with minimal downtime
- Implement data validation and integrity checks
- Create rollback procedures
4. Application Code Updates:
- Update connection strings and configurations
- Modify SQL queries for PostgreSQL compatibility
- Update ORM mappings (Hibernate/JPA)
- Handle database-specific features
5. Performance Optimization:
- Implement PostgreSQL-specific optimizations
- Create proper indexing strategies
- Configure connection pooling
- Optimize query performance
6. Testing and Validation:
- Comprehensive data validation tests
- Performance benchmark comparisons
- Application functionality testing
- Load testing under production conditions
Include detailed migration scripts, testing procedures, and documentation."
# Advanced CI/CD pipeline with multiple environments and complex workflows
/auto "Create a comprehensive CI/CD pipeline for a microservices application:
Application Architecture:
- 8 microservices (Node.js, Python, Go, Java)
- React frontend application
- PostgreSQL and Redis databases
- Message queues with RabbitMQ
- File storage with AWS S3
- CDN with CloudFront
Environment Strategy:
- Development: Automated deployment on feature branch push
- Staging: Deployment on main branch merge with approval
- Pre-production: Blue-green deployment for final testing
- Production: Canary deployment with automated rollback
CI/CD Requirements:
1. Continuous Integration:
- Multi-language build support
- Parallel testing across services
- Code quality gates (SonarQube, ESLint, Pylint)
- Security scanning (Snyk, OWASP dependency check)
- Container image building and scanning
- Automated semantic versioning
2. Deployment Automation:
- Infrastructure as Code with Terraform
- Kubernetes manifests with Helm charts
- Database migration automation
- Environment-specific configuration management
- Service mesh configuration (Istio)
- Monitoring and alerting setup
3. Quality Assurance:
- Unit test execution and coverage reporting
- Integration testing with test databases
- End-to-end testing with Cypress
- Performance testing with k6
- Security testing with automated tools
- Smoke tests in production
4. Observability:
- Distributed tracing with Jaeger
- Metrics collection with Prometheus
- Log aggregation with ELK stack
- Application performance monitoring
- Business metrics tracking
- Alert management with PagerDuty
5. Deployment Strategies:
- Blue-green deployment for critical services
- Canary deployment with traffic splitting
- Feature flags for controlled rollouts
- Automated rollback on failure detection
- Zero-downtime deployment procedures
Implementation Platform:
- GitHub Actions for CI/CD orchestration
- AWS EKS for Kubernetes hosting
- AWS RDS for managed databases
- AWS ElastiCache for Redis
- Terraform for infrastructure management
- HashiCorp Vault for secrets management
Include detailed pipeline configurations, monitoring setup, and incident response procedures."
Kubernetes Platform Setup
# Complete Kubernetes platform with advanced features
/auto "Set up production-ready Kubernetes platform with comprehensive tooling:
Cluster Architecture:
- Multi-master high availability setup
- Worker nodes with different instance types
- Separate node pools for different workloads
- Network policies for microsegmentation
- Resource quotas and limits
- Cluster autoscaling configuration
Core Platform Services:
1. Ingress and Load Balancing:
- NGINX Ingress Controller with SSL termination
- Cert-manager for automatic SSL certificate management
- External-DNS for automatic DNS record management
- Load balancer configuration for high availability
2. Service Mesh:
- Istio installation and configuration
- Traffic management and routing rules
- Security policies and mTLS
- Observability and telemetry
- Circuit breaker and retry policies
3. Storage:
- Persistent volume provisioning
- Storage classes for different performance tiers
- Backup and restore procedures
- Data encryption at rest
4. Security:
- Pod Security Standards implementation
- Network policies for traffic control
- RBAC configuration with least privilege
- Image scanning and admission controllers
- Secrets management with external providers
5. Monitoring and Observability:
- Prometheus for metrics collection
- Grafana for visualization and alerting
- Jaeger for distributed tracing
- ELK stack for log aggregation
- Application performance monitoring
6. CI/CD Integration:
- GitOps with ArgoCD
- Image building and scanning pipelines
- Automated deployment workflows
- Canary deployment capabilities
- Rollback procedures
7. Backup and Disaster Recovery:
- Velero for cluster backup
- Cross-region replication
- Automated restore procedures
- Data protection policies
Application Deployment:
- Helm charts for application packaging
- Environment-specific value files
- Progressive delivery strategies
- Health checks and readiness probes
- Resource management and optimization
Include operational procedures, troubleshooting guides, and security best practices."
# Automated comprehensive testing strategy
/auto "Implement comprehensive automated testing strategy for complex web application:
Application Under Test:
- Multi-tenant SaaS application
- React frontend with complex user interactions
- Node.js backend with multiple APIs
- PostgreSQL database with complex relationships
- Third-party integrations (Stripe, SendGrid, AWS)
- Real-time features with WebSocket
Testing Strategy:
1. Unit Testing:
- Frontend: React components with Testing Library
- Backend: API functions with Jest and Supertest
- Database: Repository layer with test containers
- Utilities: Pure functions with comprehensive coverage
- Target: 90% code coverage with meaningful tests
2. Integration Testing:
- API integration tests with test database
- Third-party service mocking and contract testing
- Database integration with real PostgreSQL instance
- WebSocket connection and message testing
- Cross-service communication testing
3. End-to-End Testing:
- Critical user journeys with Playwright
- Cross-browser testing (Chrome, Firefox, Safari)
- Mobile responsive testing
- Performance testing under load
- Visual regression testing with screenshots
4. Performance Testing:
- Load testing with k6 or Artillery
- Database performance under high load
- API response time benchmarking
- Memory leak detection
- Scalability testing with auto-scaling
5. Security Testing:
- OWASP ZAP automated security scanning
- SQL injection and XSS vulnerability testing
- Authentication and authorization testing
- Data privacy and GDPR compliance testing
- Dependency vulnerability scanning
6. Accessibility Testing:
- Automated accessibility testing with axe-core
- Screen reader compatibility testing
- Keyboard navigation testing
- Color contrast and WCAG compliance
- User experience testing for disabilities
Test Infrastructure:
- Containerized test environments
- Test data management and seeding
- Parallel test execution
- Test result reporting and visualization
- Automated test maintenance and updates
CI/CD Integration:
- Pre-commit hooks for quick feedback
- Pull request testing automation
- Staging environment testing
- Production smoke tests
- Automated rollback on test failures
Include test documentation, maintenance procedures, and performance benchmarks."
Full-Stack Performance Audit
# Comprehensive automated performance optimization
/auto "Perform comprehensive performance audit and optimization for full-stack application:
Application Architecture:
- React SPA with server-side rendering (Next.js)
- Node.js API server with Express
- PostgreSQL database with complex queries
- Redis for caching and sessions
- AWS infrastructure with global CDN
- Mobile-responsive design requirements
Performance Audit Scope:
1. Frontend Performance:
- Core Web Vitals optimization (LCP, FID, CLS)
- Bundle size analysis and optimization
- Code splitting and lazy loading implementation
- Image optimization and modern format adoption
- CSS optimization and critical path rendering
- JavaScript execution optimization
- Caching strategy implementation
2. Backend Performance:
- API response time optimization
- Database query performance analysis
- N+1 query detection and resolution
- Caching layer implementation
- Connection pooling optimization
- Memory usage and garbage collection tuning
- Asynchronous processing implementation
3. Database Performance:
- Query execution plan analysis
- Index optimization and creation
- Table partitioning for large datasets
- Connection pool configuration
- Read replica implementation
- Query caching strategies
4. Infrastructure Performance:
- CDN configuration optimization
- Load balancer configuration
- Auto-scaling policies tuning
- Resource allocation optimization
- Network latency reduction
- Geographic distribution optimization
Automated Optimization Process:
1. Performance Baseline:
- Automated performance testing setup
- Lighthouse CI integration
- Load testing with realistic traffic patterns
- Real user monitoring implementation
- Performance regression detection
2. Code Optimization:
- Bundle analyzer integration
- Automated code splitting recommendations
- Dead code elimination
- Tree shaking optimization
- Component memoization implementation
- Lazy loading strategy implementation
3. Database Optimization:
- Slow query log analysis
- Index recommendation system
- Query optimization suggestions
- Caching strategy implementation
- Connection pooling tuning
4. Caching Implementation:
- Multi-layer caching strategy
- CDN configuration optimization
- Browser caching headers
- API response caching
- Database query result caching
- Static asset optimization
Performance Monitoring:
- Real-time performance monitoring
- Automated performance alerts
- Performance regression detection
- User experience metrics tracking
- Business impact correlation
Include performance benchmarks, optimization documentation, and monitoring setup."
# Start simple
/auto "Create basic React component"
# Then increase complexity
/auto "Create React component with state management, testing, and documentation"
# Set project context
/context set "src/" --include-patterns "*.tsx,*.ts,*.json"
# Include relevant documentation
/read README.md
/read docs/architecture.md
# Use orchestration with quality gates
/orchestrate quality-gates "feature-development" --gates "
security-review: required
performance-test: required
accessibility-check: required
"
# Monitor workflow performance
/workflow analytics --performance --success-rate
# Provide agent feedback
/agent-learning feedback universal-agent --rating 5 --improvements "excellent automation"
# Start with MVP, then enhance
/auto "Create MVP version of the application with core features only"
# Wait for completion, review results
/auto "Enhance the MVP with advanced features, optimization, and polish"