A centralized service for managing and orchestrating microfrontends across multiple environments. π This project provides a JSON-based configuration system that describes microfrontends, including their versions, and enables independent deployment and management without requiring a complete frontend rebuild.
The service supports multiple environments (DEV, UAT, PROD, etc.) and maintains separate configurations for each environment, allowing for different versions of microfrontends to be deployed in different stages of development. π¦
This project uses a monorepo architecture with the following structure:
- π¦ Monorepo: Managed with pnpm workspaces for centralized dependency management
- β‘ Turbo: Build system for optimized task orchestration and caching
- π¨ Biome: Unified linting and formatting across all packages
- πͺ Lefthook: Git hooks for automated code quality checks
- π Commitlint: Enforced conventional commit messages
- Layered Architecture: Models β Services β Controllers β Plugins
- Auto-loading: Controllers and plugins auto-loaded from their directories
- Authorization: Project-scoped access control via
BaseAuthorizedService - Multi-auth: Supports local JWT, Auth0, Google OAuth, Azure EntraID
- Database: MongoDB with Mongoose, Redis for caching
- UI: shadcn/ui components with Tailwind CSS
- State: React Query for server state, Zustand for client state
- Routing: React Router with lazy-loaded pages
- Forms: react-hook-form with TypeScript validation
- i18n: Complete internationalization with react-i18next
- Microfrontend Orchestrator Hub ποΈ
- π JSON-based configuration of microfrontends with version management
- π Multi-environment support (DEV, UAT, PROD, etc.)
- π Independent deployment of microfrontends
- π Environment-specific configurations
- π Integration with various microfrontend technologies (coming soon)
- Cursor Rules - Development guidelines and coding standards
- Commit Conventions - Conventional Commits specification
- Changelog - Project version history
- Security - Security policy and procedures
Simply run the docker-compose.yaml
docker compose up -dYou have a terraform template in the terraform folder. You can run it with:
cd terraform
terraform init
terraform apply| Variable | Default Value | Description |
|---|---|---|
FRONTEND_URL |
http://localhost:3000 |
URL of the frontend application. |
REGISTRATION_ALLOWED |
false |
If true, allows new user registration. |
ALLOW_EMBEDDED_LOGIN |
true |
If true, enables the login system within the application. |
MICROFRONTEND_HOST_FOLDER |
/var/microfrontends |
Folder containing the host microfrontends. |
NOSQL_DATABASE_URL |
mongodb://localhost:27017/microfrontend-orchestrator |
MongoDB database connection URL. |
NOSQL_DATABASE_NAME |
microfrontend-orchestrator |
MongoDB database name. |
NOSQL_DATABASE_USERNAME |
root |
MongoDB username. |
NOSQL_DATABASE_PASSWORD |
example |
MongoDB password. |
REDIS_URL |
redis://localhost:6379 |
Redis server connection URL. |
REDIS_PASSWORD |
(empty) | Password for Redis access (if set). |
NODE_ENV |
development |
Node.js environment mode (development/production/test). |
EMAIL_SMTP_HOST |
smtp.example.com |
SMTP server host for sending emails. |
EMAIL_SMTP_PORT |
587 |
SMTP server port (e.g., 587 for TLS). |
EMAIL_SMTP_SECURE |
false |
If true, uses secure connection (SSL/TLS). |
EMAIL_SMTP_USER |
(empty) | Username for SMTP authentication. |
EMAIL_SMTP_PASSWORD |
(empty) | Password for SMTP authentication. |
EMAIL_SMTP_FROM |
no-reply@example.com |
Sender email address. |
JWT_SECRET |
your-secret-key-here |
Secret key for JWT generation and validation. |
AUTH0_DOMAIN |
(empty) | Auth0 tenant domain. |
AUTH0_CLIENT_ID |
(empty) | Client ID of the Auth0 application. |
AUTH0_AUDIENCE |
(empty) | API Audience configured in Auth0. |
AUTH0_SCOPE |
openid profile email |
OAuth scopes (space-separated) |
AZURE_ENTRAID_TENANT_ID |
(empty) | Azure Entra ID tenant ID. |
AZURE_ENTRAID_CLIENT_ID |
(empty) | Client ID of the registered Azure application. |
AZURE_ENTRAID_CLIENT_SECRET |
(empty) | Client secret of the registered Azure application. |
AZURE_ENTRAID_REDIRECT_URI |
(empty) | Redirect URI for Azure authentication. |
AZURE_ENTRAID_AUTHORITY |
https://login.microsoftonline.com |
Authentication authority URL. |
AZURE_ENTRAID_SCOPES |
openid profile email |
Required scopes during login. |
AZURE_ENTRAID_API_AUDIENCE |
(empty) | Protected API identifier in Azure. |
GOOGLE_CLIENT_ID |
(empty) | Client ID for Google OAuth authentication. |
GOOGLE_REDIRECT_URI |
(empty) | Redirect URI for Google OAuth. |
GOOGLE_AUTH_SCOPE |
https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile |
Required scopes to get Google email and profile. |
ALLOWED_ORIGINS |
(empty) | List of allowed URLs for cross-origin requests comma separated. |
LOG_LEVEL |
info (debug/info/warn/error) |
Logging level. |
CODE_REPOSITORY_GITHUB_CLIENT_ID |
(empty) | Client ID for GitHub OAuth authentication. |
CODE_REPOSITORY_GITHUB_CLIENT_SECRET |
(empty) | Client secret for GitHub OAuth authentication. |
- Node.js 18+ and pnpm installed
- Docker and Docker Compose
- Clone the repository π
git clone <repository-url>
cd mfe-orchestrator- Install dependencies (monorepo setup) π¦
pnpm install- Start Docker services οΏ½
cd docker-local
docker compose -f docker-compose-development.yaml up -d- Create environment file π§
Create
.envfile in./backenddirectory:
NOSQL_DATABASE_URL=mongodb://root:example@localhost:27018/admin
NOSQL_DATABASE_USERNAME=root
NOSQL_DATABASE_PASSWORD=example
REDIS_URL=redis://localhost:6379
REGISTRATION_ALLOWED=true
ALLOW_EMBEDDED_LOGIN=true
NODE_ENV=development
MICROFRONTEND_HOST_FOLDER=/path/to/your/microfrontends
# Optional: GitHub OAuth for code repository integration
CODE_REPOSITORY_GITHUB_CLIENT_ID=your_github_client_id
CODE_REPOSITORY_GITHUB_CLIENT_SECRET=your_github_client_secret- Start development servers π
# Start both backend and frontend in development mode
pnpm dev
# Or start them individually:
# Backend only: pnpm dev:backend
# Frontend only: pnpm dev:frontendThe monorepo provides these workspace-level commands:
# Development
pnpm dev # Start both backend and frontend
pnpm dev:backend # Start backend only
pnpm dev:frontend # Start frontend only
# Building
pnpm build # Build all packages
pnpm build:backend # Build backend only
pnpm build:frontend # Build frontend only
# Code Quality
pnpm lint # Lint all packages with Biome
pnpm format # Format all packages with Biome
pnpm typecheck # TypeScript check for all packages
# Testing
pnpm test # Run tests in all packages- Backend:
http://localhost:8080 - Frontend:
http://localhost:3000 - API Documentation:
http://localhost:8080/api-docs
- Fork the repository π΄
- Create your feature branch π±
git checkout -b feature/AmazingFeature-
Follow development guidelines π
- Use conventional commit messages (enforced by commitlint)
- Code is automatically linted and formatted with Biome
- Git hooks ensure code quality before commits
-
Commit your changes βοΈ
git commit -m 'feat: add some amazing feature'- Push to the branch β¬οΈ
git push origin feature/AmazingFeature- Open a Pull Request π
This project uses automated tools to maintain code quality:
- π¨ Biome: Unified linting and formatting
- πͺ Lefthook: Git hooks for pre-commit checks
- π Commitlint: Conventional commit validation
- β‘ Turbo: Optimized build pipeline
- Use conventional commits (feat, fix, chore, docs, etc.)
- Write tests for new features
- Ensure TypeScript strict mode compliance
- Update documentation for user-facing changes
ISC
- Module Federation
- micro-lc