https://github.com/ohcnetwork/create-care-mfe-plug
CLI tool to scaffold Care MFE plugins quickly and easily.
https://github.com/ohcnetwork/create-care-mfe-plug
care mfe npm shadcn tailwindcss vite
Last synced: 6 months ago
JSON representation
CLI tool to scaffold Care MFE plugins quickly and easily.
- Host: GitHub
- URL: https://github.com/ohcnetwork/create-care-mfe-plug
- Owner: ohcnetwork
- Created: 2025-11-21T06:03:48.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-21T07:58:23.000Z (8 months ago)
- Last Synced: 2025-11-21T08:35:45.500Z (8 months ago)
- Topics: care, mfe, npm, shadcn, tailwindcss, vite
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/create-care-mfe-plug
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# create-care-mfe-plug
CLI tool to scaffold Care FE plugins quickly and easily.
## Usage
### Using npx (Recommended)
```bash
npx create-care-mfe-plug my-plugin-name
```
### Using npm
```bash
npm install -g create-care-mfe-plug
create-care-mfe-plug my-plugin-name
```
### Interactive Mode
If you don't provide a project name, the CLI will prompt you for one:
```bash
npx create-care-mfe-plug
```
## What it does
The CLI will:
1. **Prompt for project name** - If not provided as an argument
2. **Prompt for port number** - Default is 10120
3. **Create a new directory** with your project name
4. **Copy the template** files
5. **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")
6. **Set the port number** in the Vite config
## Example
```bash
$ 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:10120
```
## Project Structure
The 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
## Requirements
- Node.js >= 18.0.0
- npm or yarn
## Development
After creating your plugin:
```bash
cd your-plugin-name
npm install
npm start
```
Your plugin will be available at the port you specified during setup.
## Building for Production
```bash
npm run build
```
## License
MIT