https://github.com/falese/fuzzy-train
test dependency cache project
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Repository
test dependency cache project
Basic Info
- Host: GitHub
- Owner: falese
- Language: Shell
- Default Branch: main
- Size: 82 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Module Federation with MUI Version Testing
This project demonstrates microfrontend architecture using Module Federation, with a focus on testing different versions of Material UI (MUI) across multiple microfrontends with dependency monitoring.
Features
- Module Federation with host-first shared dependencies
- Multiple MUI versions running simultaneously
- Dependency source monitoring
- Performance tracking
- Nginx caching configuration
Prerequisites
- Node.js (v14 or higher)
- Docker
- Docker Compose
- Git
Directory Structure
test-harness/
├── container/ # Container application
├── mfe1/ # Microfrontend 1 (MUI v5.13.7)
├── mfe2/ # Microfrontend 2 (MUI v5.14.7)
├── mfe3/ # Microfrontend 3 (MUI v5.15.1)
├── nginx/ # Nginx configuration
├── shared-lib/ # Shared dependencies
└── docker-compose.yml
Initial Setup
- Create project directory and clone repository:
bash
mkdir my-project
cd my-project
- Set up the infrastructure:
```bash
Create and run setup script
chmod +x setup.sh ./setup.sh ```
- Add MUI versions and monitoring:
bash
chmod +x update-mfes.sh
./update-mfes.sh
- Build and start the application:
bash
cd test-harness
./build.sh
- Access the application:
- Main application: http://localhost:8080
- Check browser console for dependency monitoring
Cleaning Up
To stop and clean up the environment:
bash
cd test-harness
docker-compose down -v
rm -rf */node_modules
rm -rf dist
Making Changes
Updating MFE Configurations
- Stop the current environment:
bash
cd test-harness
docker-compose down -v
rm -rf */node_modules
rm -rf dist
cd ..
- Run the update script:
bash
./update-mfes.sh
- Rebuild and start:
bash
cd test-harness
./build.sh
Adding New MFEs
- Create new MFE directory in test-harness/
- Update container's webpack.config.js to include new remote
- Update docker-compose.yml if needed
- Follow the cleanup and rebuild steps above
Monitoring
Dependency Information
- Check each MFE's card in the UI for:
- MUI version in use
- Dependency source (container/local)
- Load time metrics
Console Monitoring
- Open browser DevTools
- Check console for dependency loading information
- Performance marks available in Performance tab
Performance Testing
- Network tab shows module loading
- Performance metrics in console
- Loading times displayed in UI
Configuration Details
Container (Host) Configuration
- Provides MUI v5.13.7 as shared dependency
- Uses host-first configuration
- Manages shared dependency loading
MFE Configurations
- MFE1: MUI v5.13.7
- MFE2: MUI v5.14.7
- MFE3: MUI v5.15.1
- Each can fall back to local dependencies if needed
Troubleshooting
Common Issues
- Build Failures
```bash
Clean everything and rebuild
cd test-harness ./cleanup.sh cd .. ./setup.sh ./update-mfes.sh cd test-harness ./build.sh ```
- Dependency Issues
```bash
Remove node_modules and rebuild
cd test-harness rm -rf */node_modules npm install ./build.sh ```
- Container not loading
- Check Docker containers:
docker-compose ps - Check logs:
docker-compose logs - Verify port 8080 is available
Verification Steps
- Check dependency loading:
- Open browser DevTools
- Look for console messages showing dependency sources
- Verify load times in UI
- Verify MUI versions:
- Each MFE should show its version
- Container should show v5.13.7
- Check dependency source (container/local)
- Monitor performance:
- Check Network tab for module loading
- Review console for timing information
- Verify load times in UI
Scripts Reference
setup.sh
- Sets up basic infrastructure
- Creates directory structure
- Configures Nginx
update-mfes.sh
- Updates MFE configurations
- Adds MUI versions
- Configures monitoring
build.sh
- Builds all applications
- Starts Docker containers
- Serves application
cleanup.sh
- Stops containers
- Removes build artifacts
- Cleans node_modules
Contributing
- Create feature branch
- Make changes
- Test thoroughly
- Submit pull request
License
MIT License - See LICENSE file for details
Owner
- Name: Sean Falese
- Login: falese
- Kind: user
- Repositories: 4
- Profile: https://github.com/falese
GitHub Events
Total
- Push event: 3
- Create event: 2
Last Year
- Push event: 3
- Create event: 2