@sibyllinesoft/arbiter 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +222 -0
- package/dist/cli.js +28718 -0
- package/dist/templates/plopfiles/__tests__/build-systems.test.ts +730 -0
- package/dist/templates/plopfiles/__tests__/e2e.test.ts +451 -0
- package/dist/templates/plopfiles/__tests__/generation.test.ts +384 -0
- package/dist/templates/plopfiles/__tests__/linting.test.ts +854 -0
- package/dist/templates/plopfiles/__tests__/modules.test.ts +278 -0
- package/dist/templates/plopfiles/__tests__/smoke.test.ts +619 -0
- package/dist/templates/plopfiles/__tests__/templates.test.ts +341 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/module.js +43 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/.air.toml.hbs +30 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/cmd/server/main.go.hbs +50 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/go.mod.hbs +9 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/internal/handlers/health.go.hbs +51 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/module.js +38 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/build.gradle.kts.hbs +37 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/settings.gradle.kts.hbs +1 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/kotlin/Application.kt.hbs +44 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/kotlin/routes/Health.kt.hbs +41 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/resources/logback.xml.hbs +11 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/module.js +54 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/templates/src/index.ts.hbs +37 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/templates/src/routes/health.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/templates/tsconfig.json.hbs +18 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/module.js +56 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/index.ts.hbs +30 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/routes/health.ts.hbs +64 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/routes/index.ts.hbs +38 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/tsconfig.json.hbs +20 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/typedoc.json.hbs +25 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/module.js +65 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/__init__.py.hbs +1 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/config.py.hbs +28 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/main.py.hbs +40 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/routers/__init__.py.hbs +1 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/routers/health.py.hbs +24 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/pyproject.toml.hbs +40 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/requirements.txt.hbs +6 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/module.js +44 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/Cargo.toml.hbs +23 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/src/health.rs.hbs +41 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/src/main.rs.hbs +57 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/module.js +33 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-alb.tf.hbs +92 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-ecs.tf.hbs +84 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-iam.tf.hbs +60 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-vpc.tf.hbs +106 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws.tf.hbs +56 -0
- package/dist/templates/plopfiles/_modules/cloud/azure/module.js +31 -0
- package/dist/templates/plopfiles/_modules/cloud/azure/templates/azure-container-apps.tf.hbs +99 -0
- package/dist/templates/plopfiles/_modules/cloud/azure/templates/azure.tf.hbs +54 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/module.js +43 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/src/types.d.ts.hbs +6 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/src/worker.ts.hbs +51 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/wrangler.toml.hbs +36 -0
- package/dist/templates/plopfiles/_modules/cloud/gcp/module.js +31 -0
- package/dist/templates/plopfiles/_modules/cloud/gcp/templates/gcp-cloudrun.tf.hbs +89 -0
- package/dist/templates/plopfiles/_modules/cloud/gcp/templates/gcp.tf.hbs +62 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/module.js +51 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/src/lib/supabase.ts.hbs +25 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/src/types/supabase.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/config.toml.hbs +71 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/functions/hello/index.ts.hbs +34 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/migrations/00000000000000_init.sql.hbs +60 -0
- package/dist/templates/plopfiles/_modules/composer.js +180 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/drizzle.config.ts.hbs +10 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/module.js +53 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/templates/index.ts.hbs +15 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/templates/schema.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/module.js +51 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/forge.config.ts.hbs +38 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/package.json.hbs +22 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/src/main.ts.hbs +48 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/src/preload.ts.hbs +18 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/tsconfig.json.hbs +14 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/module.js +38 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/Cargo.toml.hbs +20 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/build.rs.hbs +3 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/src/main.rs.hbs +30 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/tauri.conf.json.hbs +44 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/module.js +61 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/architecture/components.md.hbs +37 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/architecture/overview.md.hbs +43 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/contributing/development.md.hbs +164 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/contributing/guidelines.md.hbs +50 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/configuration.md.hbs +37 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/installation.md.hbs +53 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/quickstart.md.hbs +39 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/index.md.hbs +44 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/javascripts/extra.js.hbs +23 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/stylesheets/extra.css.hbs +51 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/mkdocs.yml.hbs +141 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/requirements-docs.txt.hbs +15 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/scripts/aggregate-docs.mjs.hbs +188 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/scripts/gen_ref_pages.py.hbs +54 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/module.js +60 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/index.html.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/nginx.conf.hbs +31 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/postcss.config.js.hbs +6 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/App.tsx.hbs +12 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/index.css.hbs +25 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/main.tsx.hbs +18 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/pages/Home.tsx.hbs +31 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tailwind.config.js.hbs +8 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tsconfig.json.hbs +25 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tsconfig.node.json.hbs +10 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/vite.config.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/module.js +51 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/index.html.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/postcss.config.js.hbs +6 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/App.tsx.hbs +12 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/index.css.hbs +3 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/index.tsx.hbs +21 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/pages/Home.tsx.hbs +34 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/tailwind.config.js.hbs +8 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/tsconfig.json.hbs +24 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/vite.config.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/module.js +54 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/index.html.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/postcss.config.js.hbs +6 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/App.vue.hbs +9 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/index.css.hbs +3 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/main.ts.hbs +14 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/pages/Home.vue.hbs +27 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/router.ts.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/tailwind.config.js.hbs +8 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/tsconfig.json.hbs +25 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/vite.config.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/module.js +52 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/Dockerfile.backend.hbs +32 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/Dockerfile.frontend.hbs +31 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/docker-compose.yml.hbs +97 -0
- package/dist/templates/plopfiles/_modules/infra/github-actions/module.js +24 -0
- package/dist/templates/plopfiles/_modules/infra/github-actions/templates/.github/workflows/ci.yml.hbs +78 -0
- package/dist/templates/plopfiles/_modules/infra/github-actions/templates/.github/workflows/deploy.yml.hbs +60 -0
- package/dist/templates/plopfiles/_modules/infra/just/module.js +26 -0
- package/dist/templates/plopfiles/_modules/infra/just/templates/justfile.hbs +205 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/module.js +30 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/deployment.yaml.hbs +48 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/ingress.yaml.hbs +23 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/kustomization.yaml.hbs +11 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/service.yaml.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/dev/deployment-patch.yaml.hbs +17 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/dev/kustomization.yaml.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/prod/deployment-patch.yaml.hbs +17 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/prod/kustomization.yaml.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/module.js +30 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/.gitignore.hbs +5 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/Pulumi.dev.yaml.hbs +3 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/Pulumi.yaml.hbs +7 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/index.ts.hbs +26 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/package.json.hbs +12 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/tsconfig.json.hbs +16 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/module.js +31 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/.gitignore.hbs +12 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/main.tf.hbs +34 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/outputs.tf.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/terraform.tfvars.example.hbs +6 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/variables.tf.hbs +30 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/module.js +38 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/build.gradle.kts.hbs +102 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/proguard-rules.pro.hbs +20 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/AndroidManifest.xml.hbs +25 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ApiClient.kt.hbs +38 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/App.kt.hbs +116 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/MainActivity.kt.hbs +28 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Color.kt.hbs +11 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Theme.kt.hbs +55 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Type.kt.hbs +31 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/res/values/strings.xml.hbs +3 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/res/values/themes.xml.hbs +4 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/build.gradle.kts.hbs +6 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/gradle.properties.hbs +4 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/settings.gradle.kts.hbs +18 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/module.js +36 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/.env.hbs +1 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/main.dart.hbs +29 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/screens/home_screen.dart.hbs +88 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/services/api_service.dart.hbs +61 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/pubspec.yaml.hbs +25 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/module.js +39 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/App.swift.hbs +10 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/AccentColor.colorset/Contents.json.hbs +11 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/AppIcon.appiconset/Contents.json.hbs +13 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/Contents.json.hbs +6 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/ContentView.swift.hbs +13 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Services/APIClient.swift.hbs +58 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Views/DetailsView.swift.hbs +22 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Views/HomeView.swift.hbs +62 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App.xcodeproj/project.pbxproj.hbs +363 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/module.js +36 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app/_layout.tsx.hbs +16 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app/index.tsx.hbs +66 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app.json.hbs +37 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/package.json.hbs +29 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/tsconfig.json.hbs +11 -0
- package/dist/templates/plopfiles/_modules/quality/biome/module.js +44 -0
- package/dist/templates/plopfiles/_modules/quality/biome/templates/biome.json.hbs +126 -0
- package/dist/templates/plopfiles/_modules/quality/clippy/module.js +40 -0
- package/dist/templates/plopfiles/_modules/quality/clippy/templates/clippy.toml.hbs +29 -0
- package/dist/templates/plopfiles/_modules/quality/clippy/templates/rustfmt.toml.hbs +44 -0
- package/dist/templates/plopfiles/_modules/quality/golangci-lint/module.js +40 -0
- package/dist/templates/plopfiles/_modules/quality/golangci-lint/templates/.golangci.yml.hbs +199 -0
- package/dist/templates/plopfiles/_modules/quality/ruff/module.js +43 -0
- package/dist/templates/plopfiles/_modules/quality/ruff/templates/mypy.ini.hbs +48 -0
- package/dist/templates/plopfiles/_modules/quality/ruff/templates/ruff.toml.hbs +111 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/module.js +54 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/.storybook/main.ts.hbs +44 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/.storybook/preview.ts.hbs +68 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/src/stories/Button.stories.tsx.hbs +158 -0
- package/dist/templates/plopfiles/_modules/types.ts +98 -0
- package/dist/templates/plopfiles/full-stack/plopfile.js +132 -0
- package/dist/templates/plopfiles/full-stack/templates/gitignore.hbs +44 -0
- package/dist/templates/plopfiles/full-stack/templates/package.json.hbs +21 -0
- package/dist/templates/plopfiles/presets/cli-go/module.js +43 -0
- package/dist/templates/plopfiles/presets/cli-go/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-go/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/cli-node/module.js +45 -0
- package/dist/templates/plopfiles/presets/cli-node/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-node/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/cli-python/module.js +43 -0
- package/dist/templates/plopfiles/presets/cli-python/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-python/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/cli-rust/module.js +43 -0
- package/dist/templates/plopfiles/presets/cli-rust/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-rust/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/loader.js +125 -0
- package/dist/templates/plopfiles/typescript-service/plopfile.js +186 -0
- package/dist/templates/plopfiles/typescript-service/templates/Dockerfile.hbs +29 -0
- package/dist/templates/plopfiles/typescript-service/templates/README.md.hbs +85 -0
- package/dist/templates/plopfiles/typescript-service/templates/config.ts.hbs +15 -0
- package/dist/templates/plopfiles/typescript-service/templates/db/index.ts.hbs +19 -0
- package/dist/templates/plopfiles/typescript-service/templates/db/schema.ts.hbs +16 -0
- package/dist/templates/plopfiles/typescript-service/templates/index.ts.hbs +89 -0
- package/dist/templates/plopfiles/typescript-service/templates/package.json.hbs +36 -0
- package/dist/templates/plopfiles/typescript-service/templates/routes/health.ts.hbs +61 -0
- package/dist/templates/plopfiles/typescript-service/templates/routes/index.ts.hbs +35 -0
- package/dist/templates/plopfiles/typescript-service/templates/tsconfig.json.hbs +24 -0
- package/dist/templates/plopfiles/typescript-service/templates/types.ts.hbs +28 -0
- package/dist/templates/typescript/component.module.css.tpl +6 -0
- package/dist/templates/typescript/component.test.tsx.tpl +9 -0
- package/dist/templates/typescript/component.tsx.tpl +17 -0
- package/dist/templates/typescript/component.types.ts.tpl +3 -0
- package/dist/templates/typescript/project/nextjs/app/globals.css.tpl +10 -0
- package/dist/templates/typescript/project/nextjs/app/layout.tsx.tpl +15 -0
- package/dist/templates/typescript/project/nextjs/app/page.tsx.tpl +8 -0
- package/dist/templates/typescript/project/nextjs/babel.config.js.tpl +8 -0
- package/dist/templates/typescript/project/nextjs/jest.config.js.tpl +10 -0
- package/dist/templates/typescript/project/nextjs/jest.setup.ts.tpl +6 -0
- package/dist/templates/typescript/project/nextjs/next-env.d.ts.tpl +5 -0
- package/dist/templates/typescript/project/nextjs/next.config.js.tpl +9 -0
- package/dist/templates/typescript/project/nextjs/package.json.tpl +1 -0
- package/dist/templates/typescript/project/nextjs/tsconfig.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/App.css.tpl +8 -0
- package/dist/templates/typescript/project/vite/App.tsx.tpl +17 -0
- package/dist/templates/typescript/project/vite/index.css.tpl +8 -0
- package/dist/templates/typescript/project/vite/index.html.tpl +13 -0
- package/dist/templates/typescript/project/vite/main.tsx.tpl +10 -0
- package/dist/templates/typescript/project/vite/package.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/test-setup.ts.tpl +1 -0
- package/dist/templates/typescript/project/vite/tsconfig.build.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/tsconfig.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/tsconfig.node.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/vite.config.ts.tpl +18 -0
- package/dist/templates/typescript/service.api.ts.tpl +27 -0
- package/dist/templates/typescript/service.class.ts.tpl +28 -0
- package/dist/templates/typescript/service.handler.ts.tpl +42 -0
- package/dist/templates/typescript/service.schema.ts.tpl +16 -0
- package/package.json +95 -0
- package/templates/typescript/component.module.css.tpl +6 -0
- package/templates/typescript/component.test.tsx.tpl +9 -0
- package/templates/typescript/component.tsx.tpl +17 -0
- package/templates/typescript/component.types.ts.tpl +3 -0
- package/templates/typescript/project/nextjs/app/globals.css.tpl +10 -0
- package/templates/typescript/project/nextjs/app/layout.tsx.tpl +15 -0
- package/templates/typescript/project/nextjs/app/page.tsx.tpl +8 -0
- package/templates/typescript/project/nextjs/babel.config.js.tpl +8 -0
- package/templates/typescript/project/nextjs/jest.config.js.tpl +10 -0
- package/templates/typescript/project/nextjs/jest.setup.ts.tpl +6 -0
- package/templates/typescript/project/nextjs/next-env.d.ts.tpl +5 -0
- package/templates/typescript/project/nextjs/next.config.js.tpl +9 -0
- package/templates/typescript/project/nextjs/package.json.tpl +1 -0
- package/templates/typescript/project/nextjs/tsconfig.json.tpl +1 -0
- package/templates/typescript/project/vite/App.css.tpl +8 -0
- package/templates/typescript/project/vite/App.tsx.tpl +17 -0
- package/templates/typescript/project/vite/index.css.tpl +8 -0
- package/templates/typescript/project/vite/index.html.tpl +13 -0
- package/templates/typescript/project/vite/main.tsx.tpl +10 -0
- package/templates/typescript/project/vite/package.json.tpl +1 -0
- package/templates/typescript/project/vite/test-setup.ts.tpl +1 -0
- package/templates/typescript/project/vite/tsconfig.build.json.tpl +1 -0
- package/templates/typescript/project/vite/tsconfig.json.tpl +1 -0
- package/templates/typescript/project/vite/tsconfig.node.json.tpl +1 -0
- package/templates/typescript/project/vite/vite.config.ts.tpl +18 -0
- package/templates/typescript/service.api.ts.tpl +27 -0
- package/templates/typescript/service.class.ts.tpl +28 -0
- package/templates/typescript/service.handler.ts.tpl +42 -0
- package/templates/typescript/service.schema.ts.tpl +16 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storybook for React Module
|
|
3
|
+
*
|
|
4
|
+
* Sets up Storybook for React component development and documentation.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { dirname, resolve } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const templatesDir = resolve(__dirname, "templates");
|
|
12
|
+
|
|
13
|
+
export default function (data) {
|
|
14
|
+
const frontendDir = data.frontendDir || "frontend";
|
|
15
|
+
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
type: "addMany",
|
|
19
|
+
destination: `{{projectDir}}/${frontendDir}`,
|
|
20
|
+
base: templatesDir,
|
|
21
|
+
templateFiles: `${templatesDir}/**/*.hbs`,
|
|
22
|
+
stripExtensions: ["hbs"],
|
|
23
|
+
data,
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const description = "Storybook - Component development and documentation for React";
|
|
29
|
+
|
|
30
|
+
export const dependencies = {};
|
|
31
|
+
|
|
32
|
+
export const devDependencies = {
|
|
33
|
+
"@storybook/addon-essentials": "^8.4.0",
|
|
34
|
+
"@storybook/addon-interactions": "^8.4.0",
|
|
35
|
+
"@storybook/addon-links": "^8.4.0",
|
|
36
|
+
"@storybook/addon-onboarding": "^8.4.0",
|
|
37
|
+
"@storybook/addon-docs": "^8.4.0",
|
|
38
|
+
"@storybook/addon-a11y": "^8.4.0",
|
|
39
|
+
"@storybook/blocks": "^8.4.0",
|
|
40
|
+
"@storybook/react": "^8.4.0",
|
|
41
|
+
"@storybook/react-vite": "^8.4.0",
|
|
42
|
+
"@storybook/test": "^8.4.0",
|
|
43
|
+
"@storybook/manager-api": "^8.4.0",
|
|
44
|
+
"@storybook/theming": "^8.4.0",
|
|
45
|
+
storybook: "^8.4.0",
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const scripts = {
|
|
49
|
+
storybook: "storybook dev -p 6006",
|
|
50
|
+
"build-storybook": "storybook build",
|
|
51
|
+
"test-storybook": "test-storybook",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const envVars = {};
|
package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/.storybook/main.ts.hbs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StorybookConfig } from "@storybook/react-vite";
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: [
|
|
5
|
+
"../src/**/*.mdx",
|
|
6
|
+
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)",
|
|
7
|
+
],
|
|
8
|
+
addons: [
|
|
9
|
+
"@storybook/addon-onboarding",
|
|
10
|
+
"@storybook/addon-links",
|
|
11
|
+
"@storybook/addon-essentials",
|
|
12
|
+
"@storybook/addon-interactions",
|
|
13
|
+
"@storybook/addon-a11y",
|
|
14
|
+
"@storybook/addon-docs",
|
|
15
|
+
],
|
|
16
|
+
framework: {
|
|
17
|
+
name: "@storybook/react-vite",
|
|
18
|
+
options: {},
|
|
19
|
+
},
|
|
20
|
+
docs: {
|
|
21
|
+
autodocs: "tag",
|
|
22
|
+
defaultName: "Documentation",
|
|
23
|
+
},
|
|
24
|
+
staticDirs: ["../public"],
|
|
25
|
+
typescript: {
|
|
26
|
+
reactDocgen: "react-docgen-typescript",
|
|
27
|
+
reactDocgenTypescriptOptions: {
|
|
28
|
+
shouldExtractLiteralValuesFromEnum: true,
|
|
29
|
+
shouldRemoveUndefinedFromOptional: true,
|
|
30
|
+
propFilter: (prop) =>
|
|
31
|
+
prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
viteFinal: async (config) => {
|
|
35
|
+
return {
|
|
36
|
+
...config,
|
|
37
|
+
define: {
|
|
38
|
+
"process.env": {},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default config;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Preview } from "@storybook/react";
|
|
2
|
+
import "../src/index.css";
|
|
3
|
+
|
|
4
|
+
const preview: Preview = {
|
|
5
|
+
parameters: {
|
|
6
|
+
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
7
|
+
controls: {
|
|
8
|
+
matchers: {
|
|
9
|
+
color: /(background|color)$/i,
|
|
10
|
+
date: /Date$/i,
|
|
11
|
+
},
|
|
12
|
+
expanded: true,
|
|
13
|
+
sort: "requiredFirst",
|
|
14
|
+
},
|
|
15
|
+
docs: {
|
|
16
|
+
toc: true,
|
|
17
|
+
},
|
|
18
|
+
layout: "centered",
|
|
19
|
+
backgrounds: {
|
|
20
|
+
default: "light",
|
|
21
|
+
values: [
|
|
22
|
+
{ name: "light", value: "#ffffff" },
|
|
23
|
+
{ name: "dark", value: "#1a1a1a" },
|
|
24
|
+
{ name: "gray", value: "#f5f5f5" },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
viewport: {
|
|
28
|
+
viewports: {
|
|
29
|
+
mobile: {
|
|
30
|
+
name: "Mobile",
|
|
31
|
+
styles: { width: "375px", height: "667px" },
|
|
32
|
+
},
|
|
33
|
+
tablet: {
|
|
34
|
+
name: "Tablet",
|
|
35
|
+
styles: { width: "768px", height: "1024px" },
|
|
36
|
+
},
|
|
37
|
+
desktop: {
|
|
38
|
+
name: "Desktop",
|
|
39
|
+
styles: { width: "1440px", height: "900px" },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
globalTypes: {
|
|
45
|
+
theme: {
|
|
46
|
+
name: "Theme",
|
|
47
|
+
description: "Global theme for components",
|
|
48
|
+
defaultValue: "light",
|
|
49
|
+
toolbar: {
|
|
50
|
+
icon: "circlehollow",
|
|
51
|
+
items: [
|
|
52
|
+
{ value: "light", icon: "sun", title: "Light" },
|
|
53
|
+
{ value: "dark", icon: "moon", title: "Dark" },
|
|
54
|
+
],
|
|
55
|
+
showName: true,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
decorators: [
|
|
60
|
+
(Story, context) => {
|
|
61
|
+
const theme = context.globals.theme;
|
|
62
|
+
document.documentElement.classList.toggle("dark", theme === "dark");
|
|
63
|
+
return <Story />;
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default preview;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { fn } from "@storybook/test";
|
|
3
|
+
import { Button } from "../components/Button";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Primary UI component for user interaction.
|
|
7
|
+
*
|
|
8
|
+
* ## Usage
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { Button } from "./components/Button";
|
|
12
|
+
*
|
|
13
|
+
* <Button variant="primary" onClick={() => {}}>
|
|
14
|
+
* Click me
|
|
15
|
+
* </Button>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const meta = {
|
|
19
|
+
title: "Components/Button",
|
|
20
|
+
component: Button,
|
|
21
|
+
parameters: {
|
|
22
|
+
layout: "centered",
|
|
23
|
+
docs: {
|
|
24
|
+
description: {
|
|
25
|
+
component: "A versatile button component with multiple variants and sizes.",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
tags: ["autodocs"],
|
|
30
|
+
argTypes: {
|
|
31
|
+
variant: {
|
|
32
|
+
control: "select",
|
|
33
|
+
options: ["primary", "secondary", "outline", "ghost", "destructive"],
|
|
34
|
+
description: "The visual style of the button",
|
|
35
|
+
table: {
|
|
36
|
+
type: { summary: "string" },
|
|
37
|
+
defaultValue: { summary: "primary" },
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
control: "select",
|
|
42
|
+
options: ["sm", "md", "lg"],
|
|
43
|
+
description: "The size of the button",
|
|
44
|
+
table: {
|
|
45
|
+
type: { summary: "string" },
|
|
46
|
+
defaultValue: { summary: "md" },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
disabled: {
|
|
50
|
+
control: "boolean",
|
|
51
|
+
description: "Whether the button is disabled",
|
|
52
|
+
},
|
|
53
|
+
loading: {
|
|
54
|
+
control: "boolean",
|
|
55
|
+
description: "Whether to show a loading spinner",
|
|
56
|
+
},
|
|
57
|
+
onClick: {
|
|
58
|
+
action: "clicked",
|
|
59
|
+
description: "Click handler",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
args: {
|
|
63
|
+
onClick: fn(),
|
|
64
|
+
},
|
|
65
|
+
} satisfies Meta<typeof Button>;
|
|
66
|
+
|
|
67
|
+
export default meta;
|
|
68
|
+
type Story = StoryObj<typeof meta>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The default button style.
|
|
72
|
+
*/
|
|
73
|
+
export const Primary: Story = {
|
|
74
|
+
args: {
|
|
75
|
+
variant: "primary",
|
|
76
|
+
children: "Primary Button",
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Secondary buttons are used for less prominent actions.
|
|
82
|
+
*/
|
|
83
|
+
export const Secondary: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
variant: "secondary",
|
|
86
|
+
children: "Secondary Button",
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Outline buttons have a transparent background.
|
|
92
|
+
*/
|
|
93
|
+
export const Outline: Story = {
|
|
94
|
+
args: {
|
|
95
|
+
variant: "outline",
|
|
96
|
+
children: "Outline Button",
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Ghost buttons are minimal and blend with the background.
|
|
102
|
+
*/
|
|
103
|
+
export const Ghost: Story = {
|
|
104
|
+
args: {
|
|
105
|
+
variant: "ghost",
|
|
106
|
+
children: "Ghost Button",
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Destructive buttons indicate dangerous actions.
|
|
112
|
+
*/
|
|
113
|
+
export const Destructive: Story = {
|
|
114
|
+
args: {
|
|
115
|
+
variant: "destructive",
|
|
116
|
+
children: "Delete",
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Small buttons for compact UIs.
|
|
122
|
+
*/
|
|
123
|
+
export const Small: Story = {
|
|
124
|
+
args: {
|
|
125
|
+
size: "sm",
|
|
126
|
+
children: "Small",
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Large buttons for prominent CTAs.
|
|
132
|
+
*/
|
|
133
|
+
export const Large: Story = {
|
|
134
|
+
args: {
|
|
135
|
+
size: "lg",
|
|
136
|
+
children: "Large Button",
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Disabled state prevents interaction.
|
|
142
|
+
*/
|
|
143
|
+
export const Disabled: Story = {
|
|
144
|
+
args: {
|
|
145
|
+
disabled: true,
|
|
146
|
+
children: "Disabled",
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Loading state shows a spinner.
|
|
152
|
+
*/
|
|
153
|
+
export const Loading: Story = {
|
|
154
|
+
args: {
|
|
155
|
+
loading: true,
|
|
156
|
+
children: "Loading...",
|
|
157
|
+
},
|
|
158
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module Types for Composable Templates
|
|
3
|
+
*
|
|
4
|
+
* Each module exports a function that returns plop actions,
|
|
5
|
+
* plus metadata about dependencies and scripts.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ActionType } from "node-plop";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Context passed from Arbiter CUE spec to template modules
|
|
12
|
+
*/
|
|
13
|
+
export interface ModuleContext {
|
|
14
|
+
// From CUE spec
|
|
15
|
+
name: string;
|
|
16
|
+
language?: string;
|
|
17
|
+
framework?: string;
|
|
18
|
+
sourceDirectory?: string;
|
|
19
|
+
|
|
20
|
+
// Service-specific
|
|
21
|
+
serviceType?: string;
|
|
22
|
+
platform?: string;
|
|
23
|
+
ports?: Array<{ name: string; port: number; targetPort?: number }>;
|
|
24
|
+
|
|
25
|
+
// Database-specific
|
|
26
|
+
infrastructureType?: string;
|
|
27
|
+
image?: string;
|
|
28
|
+
attachTo?: string;
|
|
29
|
+
|
|
30
|
+
// Computed paths
|
|
31
|
+
projectDir: string;
|
|
32
|
+
backendDir?: string;
|
|
33
|
+
frontendDir?: string;
|
|
34
|
+
|
|
35
|
+
// User selections for composition
|
|
36
|
+
backend?: string;
|
|
37
|
+
frontend?: string;
|
|
38
|
+
database?: string;
|
|
39
|
+
infra?: string[];
|
|
40
|
+
|
|
41
|
+
// Additional impl options
|
|
42
|
+
impl?: Record<string, unknown>;
|
|
43
|
+
|
|
44
|
+
// Allow arbitrary additional fields from spec
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Package.json dependency entries
|
|
50
|
+
*/
|
|
51
|
+
export interface Dependencies {
|
|
52
|
+
[packageName: string]: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Package.json script entries
|
|
57
|
+
*/
|
|
58
|
+
export interface Scripts {
|
|
59
|
+
[scriptName: string]: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Module definition - what each module.js exports
|
|
64
|
+
*/
|
|
65
|
+
export interface TemplateModule {
|
|
66
|
+
/** Returns plop actions for this module */
|
|
67
|
+
default: (data: ModuleContext) => ActionType[];
|
|
68
|
+
|
|
69
|
+
/** Runtime dependencies to merge into package.json */
|
|
70
|
+
dependencies?: Dependencies;
|
|
71
|
+
|
|
72
|
+
/** Dev dependencies to merge into package.json */
|
|
73
|
+
devDependencies?: Dependencies;
|
|
74
|
+
|
|
75
|
+
/** Scripts to merge into package.json */
|
|
76
|
+
scripts?: Scripts;
|
|
77
|
+
|
|
78
|
+
/** Environment variables this module needs */
|
|
79
|
+
envVars?: Record<string, string>;
|
|
80
|
+
|
|
81
|
+
/** Other modules this depends on (for ordering) */
|
|
82
|
+
requires?: string[];
|
|
83
|
+
|
|
84
|
+
/** Human-readable description */
|
|
85
|
+
description?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Manifest for a composed project
|
|
90
|
+
*/
|
|
91
|
+
export interface ComposedManifest {
|
|
92
|
+
name: string;
|
|
93
|
+
modules: string[];
|
|
94
|
+
dependencies: Dependencies;
|
|
95
|
+
devDependencies: Dependencies;
|
|
96
|
+
scripts: Scripts;
|
|
97
|
+
envVars: Record<string, string>;
|
|
98
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full-Stack Project Composer
|
|
3
|
+
*
|
|
4
|
+
* Interactive plopfile that composes multiple modules (backend, frontend, database, infra)
|
|
5
|
+
* into a complete project scaffold.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { dirname, resolve } from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
import { composeModules, getModuleChoices } from "../_modules/composer.js";
|
|
11
|
+
|
|
12
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
const templatesDir = resolve(__dirname, "templates");
|
|
14
|
+
|
|
15
|
+
export default function (plop) {
|
|
16
|
+
plop.setGenerator("full-stack", {
|
|
17
|
+
description: "Create a full-stack project with customizable tech stack",
|
|
18
|
+
prompts: async (inquirer) => {
|
|
19
|
+
const choices = await getModuleChoices();
|
|
20
|
+
|
|
21
|
+
return inquirer.prompt([
|
|
22
|
+
{
|
|
23
|
+
type: "input",
|
|
24
|
+
name: "name",
|
|
25
|
+
message: "Project name:",
|
|
26
|
+
validate: (input) => (input ? true : "Project name is required"),
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "list",
|
|
30
|
+
name: "backend",
|
|
31
|
+
message: "Backend framework:",
|
|
32
|
+
choices: choices.backends.length > 0 ? choices.backends : ["none"],
|
|
33
|
+
default: choices.backends[0] || "none",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "list",
|
|
37
|
+
name: "frontend",
|
|
38
|
+
message: "Frontend framework:",
|
|
39
|
+
choices: choices.frontends,
|
|
40
|
+
default: "none",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "list",
|
|
44
|
+
name: "database",
|
|
45
|
+
message: "Database:",
|
|
46
|
+
choices: choices.databases,
|
|
47
|
+
default: "none",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "checkbox",
|
|
51
|
+
name: "infra",
|
|
52
|
+
message: "Infrastructure (select multiple):",
|
|
53
|
+
choices: choices.infra.length > 0 ? choices.infra : [],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: "input",
|
|
57
|
+
name: "backendDir",
|
|
58
|
+
message: "Backend directory name:",
|
|
59
|
+
default: "backend",
|
|
60
|
+
when: (answers) => answers.backend !== "none",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "input",
|
|
64
|
+
name: "frontendDir",
|
|
65
|
+
message: "Frontend directory name:",
|
|
66
|
+
default: "frontend",
|
|
67
|
+
when: (answers) => answers.frontend !== "none",
|
|
68
|
+
},
|
|
69
|
+
]);
|
|
70
|
+
},
|
|
71
|
+
actions: async (data) => {
|
|
72
|
+
const context = {
|
|
73
|
+
...data,
|
|
74
|
+
projectDir: process.cwd(),
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const { actions, manifest } = await composeModules(
|
|
78
|
+
{
|
|
79
|
+
backend: data.backend,
|
|
80
|
+
frontend: data.frontend,
|
|
81
|
+
database: data.database,
|
|
82
|
+
infra: data.infra || [],
|
|
83
|
+
},
|
|
84
|
+
context,
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
// Add root package.json
|
|
88
|
+
actions.push({
|
|
89
|
+
type: "add",
|
|
90
|
+
path: "{{projectDir}}/package.json",
|
|
91
|
+
templateFile: `${templatesDir}/package.json.hbs`,
|
|
92
|
+
data: { ...context, manifest },
|
|
93
|
+
skipIfExists: true,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Add root .env.example
|
|
97
|
+
if (Object.keys(manifest.envVars).length > 0) {
|
|
98
|
+
actions.push({
|
|
99
|
+
type: "add",
|
|
100
|
+
path: "{{projectDir}}/.env.example",
|
|
101
|
+
template:
|
|
102
|
+
Object.entries(manifest.envVars)
|
|
103
|
+
.map(([k, v]) => `${k}=${v}`)
|
|
104
|
+
.join("\n") + "\n",
|
|
105
|
+
skipIfExists: true,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Add .gitignore
|
|
110
|
+
actions.push({
|
|
111
|
+
type: "add",
|
|
112
|
+
path: "{{projectDir}}/.gitignore",
|
|
113
|
+
templateFile: `${templatesDir}/gitignore.hbs`,
|
|
114
|
+
skipIfExists: true,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Log the composed modules
|
|
118
|
+
actions.push({
|
|
119
|
+
type: "log",
|
|
120
|
+
message: `\n✓ Created project "${data.name}" with modules:\n ${manifest.modules.join("\n ")}\n`,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
return actions;
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// Custom log action type
|
|
128
|
+
plop.setActionType("log", (answers, config) => {
|
|
129
|
+
console.log(config.message);
|
|
130
|
+
return config.message;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
.pnp
|
|
4
|
+
.pnp.js
|
|
5
|
+
|
|
6
|
+
# Build outputs
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.next/
|
|
10
|
+
out/
|
|
11
|
+
|
|
12
|
+
# Environment
|
|
13
|
+
.env
|
|
14
|
+
.env.local
|
|
15
|
+
.env.*.local
|
|
16
|
+
|
|
17
|
+
# Editor
|
|
18
|
+
.vscode/
|
|
19
|
+
.idea/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
|
|
23
|
+
# OS
|
|
24
|
+
.DS_Store
|
|
25
|
+
Thumbs.db
|
|
26
|
+
|
|
27
|
+
# Logs
|
|
28
|
+
logs/
|
|
29
|
+
*.log
|
|
30
|
+
npm-debug.log*
|
|
31
|
+
yarn-debug.log*
|
|
32
|
+
yarn-error.log*
|
|
33
|
+
|
|
34
|
+
# Testing
|
|
35
|
+
coverage/
|
|
36
|
+
.nyc_output/
|
|
37
|
+
|
|
38
|
+
# Database
|
|
39
|
+
*.sqlite
|
|
40
|
+
*.db
|
|
41
|
+
|
|
42
|
+
# Misc
|
|
43
|
+
.cache/
|
|
44
|
+
tmp/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{kebabCase name}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
{{#each manifest.scripts}}
|
|
8
|
+
"{{@key}}": "{{this}}"{{#unless @last}},{{/unless}}
|
|
9
|
+
{{/each}}
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
{{#each manifest.dependencies}}
|
|
13
|
+
"{{@key}}": "{{this}}"{{#unless @last}},{{/unless}}
|
|
14
|
+
{{/each}}
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
{{#each manifest.devDependencies}}
|
|
18
|
+
"{{@key}}": "{{this}}"{{#unless @last}},{{/unless}}
|
|
19
|
+
{{/each}}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Tool Preset - Go
|
|
3
|
+
*
|
|
4
|
+
* Initializes .arbiter/ directory for a Go CLI tool or library.
|
|
5
|
+
* Creates minimal structure - use `arbiter sync` to detect packages.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { dirname, resolve } from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
|
|
11
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const templatesDir = resolve(__dirname, "templates");
|
|
13
|
+
|
|
14
|
+
export default function (data) {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
type: "add",
|
|
18
|
+
path: "{{projectDir}}/.arbiter/README.md",
|
|
19
|
+
templateFile: `${templatesDir}/README.md.hbs`,
|
|
20
|
+
data: {
|
|
21
|
+
...data,
|
|
22
|
+
presetId: "cli-go",
|
|
23
|
+
language: "go",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: "add",
|
|
28
|
+
path: "{{projectDir}}/.arbiter/config.json",
|
|
29
|
+
templateFile: `${templatesDir}/config.json.hbs`,
|
|
30
|
+
data: {
|
|
31
|
+
...data,
|
|
32
|
+
presetId: "cli-go",
|
|
33
|
+
language: "go",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const id = "cli-go";
|
|
40
|
+
export const name = "CLI Tool (Go)";
|
|
41
|
+
export const description = "Command-line tool or library using Go";
|
|
42
|
+
export const language = "go";
|
|
43
|
+
export const category = "cli";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: project
|
|
3
|
+
entityId: {{uuid}}
|
|
4
|
+
createdAt: {{timestamp}}
|
|
5
|
+
updatedAt: {{timestamp}}
|
|
6
|
+
preset: {{presetId}}
|
|
7
|
+
language: {{language}}
|
|
8
|
+
tags:
|
|
9
|
+
- cli
|
|
10
|
+
- {{language}}
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# {{name}}
|
|
14
|
+
|
|
15
|
+
Command-line tool built with {{language}}.
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
|
|
19
|
+
Run `arbiter sync` to detect packages and create service entities.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
arbiter sync
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Viewing Your Spec
|
|
26
|
+
|
|
27
|
+
- **CLI**: `arbiter list service`, `arbiter list package`
|
|
28
|
+
- **Browser**: `arbiter view` to start documentation server
|
|
29
|
+
- **Obsidian**: Open `.arbiter/` folder as a vault
|
|
30
|
+
|
|
31
|
+
## Adding Entities
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Add a service
|
|
35
|
+
arbiter add service my-service --language {{language}}
|
|
36
|
+
|
|
37
|
+
# Add a task
|
|
38
|
+
arbiter add task "Implement feature X"
|
|
39
|
+
|
|
40
|
+
# Add a group (milestone)
|
|
41
|
+
arbiter add group "v1.0 Release"
|
|
42
|
+
```
|