Garfish is a lightweight micro-frontend framework designed to address complexity and maintainability issues in large-scale frontend projects. It uses sandbox technology to isolate the runtime environments of different sub-applications, ensuring independence and security between micro-applications.
Core features include:
- Sandbox Isolation: Uses JavaScript sandboxing to isolate global variables and side effects of different sub-applications, preventing interference between applications
- Multiple Loading Methods: Supports asynchronous loading and preloading to optimize overall performance and user experience
- Framework Agnostic: Compatible with mainstream frontend frameworks like React, Vue, and Angular, allowing applications with different tech stacks to coexist
- Lifecycle Management: Provides comprehensive lifecycle hooks including bootstrap, mount, unmount, etc.
- Route Management: Built-in routing system supporting sub-application route registration and switching
- Style Isolation: Ensures sub-application styles don't conflict through CSS scoping or other mechanisms
Advantages of Garfish:
- Lightweight design with minimal performance overhead
- Flexible architecture, easy to integrate into existing projects
- Comprehensive development tools and debugging support
- Active community and continuous updates and maintenance
Use cases include enterprise-level backend management systems, e-commerce platforms, large-scale projects with multi-team collaboration, etc.