Review the Host package for server setup, Module Federation runtime, authentication, and bos.config.json configuration. Use when user says /host or asks to review the host.
Review the host/ package for quality, consistency, and Module Federation best practices.
host/
├── server.ts # Entry point
├── bootstrap.ts # Remote host loader
├── src/
│ ├── program.ts # Main server program
│ ├── ui.tsx # UI rendering
│ ├── types.ts # Type definitions
│ ├── db/
│ │ └── schema/
│ │ └── auth.ts # Auth schema
│ ├── layers/
│ │ └── index.ts # Effect layers composition
│ ├── lib/
│ │ └── schemas.ts # Shared schemas
│ ├── services/
│ │ ├── auth.ts # Better-Auth setup
│ │ ├── config.ts # Runtime config loader (bos.config.json)
│ │ ├── context.ts # Request context
│ │ ├── database.ts # Database connection
│ │ ├── errors.ts # Error types
│ │ ├── federation.server.ts # UI module loading
│ │ ├── plugins.ts # API plugin loading
│ │ └── router.ts # Router creation
│ └── utils/
│ └── logger.ts # Logging utility
├── migrations/ # Drizzle migrations
├── drizzle.config.ts # Drizzle config
├── rsbuild.config.ts # Build configuration
└── package.json
bos.config.json # Central runtime configuration (root level)
src/program.tsCORS_ORIGIN or config URLs/healthsrc/services/config.ts parses bos.config.json correctlysrc/services/plugins.ts uses every-plugin runtimesrc/services/auth.ts uses Better-Auth/api/auth/*src/services/federation.server.ts loads UI remoteloadRouterModulesrc/layers/index.tsserver.ts - Entry pointsrc/program.ts - Main server logicsrc/services/config.ts - Configuration loadersrc/services/auth.ts - Authentication setupsrc/services/plugins.ts - Plugin loadingsrc/services/federation.server.ts - UI module loadingsrc/services/router.ts - Route creationsrc/layers/index.ts - Layer composition../bos.config.json - Central configProvide a structured review:
## Host Package Review
### Summary
[Overall assessment]
### Issues Found
1. [File:line] - [Issue description]
### Recommendations
- [Improvement suggestions]
### Status: [PASS/NEEDS_WORK]