#!/bin/bash APPS=( "payment-dashboard:3002" "customer-directory:3003" "customer-detail:3004" "inventory-manager:3005" "product-catalog:3006" "employee-schedule:3007" "shift-manager:3008" "discount-manager:3009" "tax-configuration:3010" "sales-analytics:3011" "refund-manager:3012" "device-manager:3013" "merchant-settings:3014" ) for app_info in "${APPS[@]}"; do IFS=':' read -r app port <<< "$app_info" APP_DIR="src/ui/react-app/src/apps/$app" mkdir -p "$APP_DIR" # Convert app name to title TITLE=$(echo "$app" | sed 's/-/ /g' | sed 's/\b\(.\)/\u\1/g') # Create App.tsx cat > "$APP_DIR/App.tsx" << ENDAPP import React from 'react'; export default function ${app^}() { return (

$TITLE

Manage your ${app//-/ }

Coming Soon

This app is under development.

); } ENDAPP # Create index.html cat > "$APP_DIR/index.html" << ENDHTML Clover $TITLE
ENDHTML # Create main.tsx cat > "$APP_DIR/main.tsx" << ENDMAIN import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; ReactDOM.createRoot(document.getElementById('root')!).render( ); ENDMAIN # Create vite.config.ts cat > "$APP_DIR/vite.config.ts" << ENDVITE import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], server: { port: $port, }, }); ENDVITE echo "Created $app" done echo "All apps created!"