CLI tool to scaffold Care FE plugins quickly and easily.
npx create-care-mfe-plug my-plugin-namenpm install -g create-care-mfe-plug
create-care-mfe-plug my-plugin-nameIf you don't provide a project name, the CLI will prompt you for one:
npx create-care-mfe-plugThe CLI will:
- Prompt for project name - If not provided as an argument
- Prompt for port number - Default is 10120
- Create a new directory with your project name
- Copy the template files
- Configure the project with proper name transformations:
- Package name: Uses your input as-is (e.g., "MyPlugin")
- Vite federation name: Converts to snake_case (e.g., "my_plugin")
- Plugin manifest: Converts to kebab-case (e.g., "my-plugin")
- Set the port number in the Vite config
$ npx create-care-mfe-plug care-patient-vitals
🏥 Create Care FE Plugin
✔ What port should the dev server run on? … 10120
🚀 Creating new Care FE plugin...
📁 Copying template files...
🔧 Configuring project...
✅ Project created successfully!
Next steps:
cd care-patient-vitals
npm install
npm start
Your plugin will be available at http://localhost:10120The generated project includes:
- React 19 with TypeScript
- Vite for build tooling
- Module Federation for plugin architecture
- TailwindCSS for styling
- Radix UI components
- React Query for data fetching
- i18next for internationalization
- ESLint & Prettier for code quality
- Husky for git hooks
- Node.js >= 18.0.0
- npm or yarn
After creating your plugin:
cd your-plugin-name
npm install
npm startYour plugin will be available at the port you specified during setup.
npm run buildMIT