@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,85 @@
|
|
|
1
|
+
# {{pascalCase name}}
|
|
2
|
+
|
|
3
|
+
{{#if description}}
|
|
4
|
+
{{description}}
|
|
5
|
+
{{else}}
|
|
6
|
+
A TypeScript service generated by Arbiter CLI.
|
|
7
|
+
{{/if}}
|
|
8
|
+
|
|
9
|
+
## Getting Started
|
|
10
|
+
|
|
11
|
+
### Prerequisites
|
|
12
|
+
|
|
13
|
+
- [Bun](https://bun.sh/) runtime
|
|
14
|
+
{{#if includeDb}}
|
|
15
|
+
- PostgreSQL database
|
|
16
|
+
{{/if}}
|
|
17
|
+
|
|
18
|
+
### Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bun install
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Development
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bun run dev
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The service will start at `http://localhost:3000`.
|
|
31
|
+
|
|
32
|
+
### Building
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bun run build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Running in Production
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
bun run start
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## API Endpoints
|
|
45
|
+
|
|
46
|
+
### Health Check
|
|
47
|
+
|
|
48
|
+
- `GET /health` - Service health status
|
|
49
|
+
- `GET /health/ready` - Readiness check
|
|
50
|
+
- `GET /health/live` - Liveness check
|
|
51
|
+
|
|
52
|
+
{{#if includeDb}}
|
|
53
|
+
## Database
|
|
54
|
+
|
|
55
|
+
This service uses Drizzle ORM with PostgreSQL.
|
|
56
|
+
|
|
57
|
+
### Migrations
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bun run drizzle-kit generate:pg
|
|
61
|
+
bun run drizzle-kit push:pg
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Environment Variables
|
|
65
|
+
|
|
66
|
+
- `DATABASE_URL` - PostgreSQL connection string
|
|
67
|
+
{{/if}}
|
|
68
|
+
|
|
69
|
+
## Docker
|
|
70
|
+
|
|
71
|
+
Build the image:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
docker build -t {{kebabCase name}} .
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Run the container:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
docker run -p 3000:3000 {{kebabCase name}}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
MIT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Configuration
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const config = {
|
|
6
|
+
port: parseInt(process.env.PORT ?? "3000", 10),
|
|
7
|
+
env: process.env.NODE_ENV ?? "development",
|
|
8
|
+
{{#if includeDb}}
|
|
9
|
+
database: {
|
|
10
|
+
url: process.env.DATABASE_URL ?? "postgres://localhost:5432/{{snakeCase name}}",
|
|
11
|
+
},
|
|
12
|
+
{{/if}}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type Config = typeof config;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database connection and initialization
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { drizzle } from "drizzle-orm/postgres-js";
|
|
6
|
+
import postgres from "postgres";
|
|
7
|
+
import { config } from "../config.js";
|
|
8
|
+
import * as schema from "./schema.js";
|
|
9
|
+
|
|
10
|
+
const client = postgres(config.database.url);
|
|
11
|
+
export const db = drizzle(client, { schema });
|
|
12
|
+
|
|
13
|
+
export async function initDb(): Promise<void> {
|
|
14
|
+
console.log("📦 Connecting to database...");
|
|
15
|
+
// Run any initialization logic here
|
|
16
|
+
console.log("✅ Database connected");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { schema };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database schema definitions
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { pgTable, serial, text, timestamp, varchar } from "drizzle-orm/pg-core";
|
|
6
|
+
|
|
7
|
+
export const examples = pgTable("examples", {
|
|
8
|
+
id: serial("id").primaryKey(),
|
|
9
|
+
name: varchar("name", { length: 255 }).notNull(),
|
|
10
|
+
description: text("description"),
|
|
11
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
12
|
+
updatedAt: timestamp("updated_at").defaultNow().notNull(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Example = typeof examples.$inferSelect;
|
|
16
|
+
export type NewExample = typeof examples.$inferInsert;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {{pascalCase name}} Service
|
|
3
|
+
*
|
|
4
|
+
* Generated by Arbiter CLI
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
{{#if (eq framework "hono")}}
|
|
8
|
+
import { Hono } from "hono";
|
|
9
|
+
import { serve } from "@hono/node-server";
|
|
10
|
+
import { logger } from "hono/logger";
|
|
11
|
+
import { cors } from "hono/cors";
|
|
12
|
+
{{else if (eq framework "express")}}
|
|
13
|
+
import express from "express";
|
|
14
|
+
import cors from "cors";
|
|
15
|
+
{{else}}
|
|
16
|
+
import Fastify from "fastify";
|
|
17
|
+
{{/if}}
|
|
18
|
+
|
|
19
|
+
import { config } from "./config.js";
|
|
20
|
+
import { routes } from "./routes/index.js";
|
|
21
|
+
{{#if includeDb}}
|
|
22
|
+
import { initDb } from "./db/index.js";
|
|
23
|
+
{{/if}}
|
|
24
|
+
|
|
25
|
+
{{#if (eq framework "hono")}}
|
|
26
|
+
const app = new Hono();
|
|
27
|
+
|
|
28
|
+
// Middleware
|
|
29
|
+
app.use("*", logger());
|
|
30
|
+
app.use("*", cors());
|
|
31
|
+
|
|
32
|
+
// Routes
|
|
33
|
+
app.route("/", routes);
|
|
34
|
+
|
|
35
|
+
// Start server
|
|
36
|
+
{{#if includeDb}}
|
|
37
|
+
initDb().then(() => {
|
|
38
|
+
{{/if}}
|
|
39
|
+
serve({
|
|
40
|
+
fetch: app.fetch,
|
|
41
|
+
port: config.port,
|
|
42
|
+
}, (info) => {
|
|
43
|
+
console.log(`🚀 {{pascalCase name}} listening on http://localhost:${info.port}`);
|
|
44
|
+
});
|
|
45
|
+
{{#if includeDb}}
|
|
46
|
+
});
|
|
47
|
+
{{/if}}
|
|
48
|
+
{{else if (eq framework "express")}}
|
|
49
|
+
const app = express();
|
|
50
|
+
|
|
51
|
+
// Middleware
|
|
52
|
+
app.use(cors());
|
|
53
|
+
app.use(express.json());
|
|
54
|
+
|
|
55
|
+
// Routes
|
|
56
|
+
app.use("/", routes);
|
|
57
|
+
|
|
58
|
+
// Start server
|
|
59
|
+
{{#if includeDb}}
|
|
60
|
+
initDb().then(() => {
|
|
61
|
+
{{/if}}
|
|
62
|
+
app.listen(config.port, () => {
|
|
63
|
+
console.log(`🚀 {{pascalCase name}} listening on http://localhost:${config.port}`);
|
|
64
|
+
});
|
|
65
|
+
{{#if includeDb}}
|
|
66
|
+
});
|
|
67
|
+
{{/if}}
|
|
68
|
+
{{else}}
|
|
69
|
+
const app = Fastify({ logger: true });
|
|
70
|
+
|
|
71
|
+
// Routes
|
|
72
|
+
app.register(routes);
|
|
73
|
+
|
|
74
|
+
// Start server
|
|
75
|
+
const start = async () => {
|
|
76
|
+
{{#if includeDb}}
|
|
77
|
+
await initDb();
|
|
78
|
+
{{/if}}
|
|
79
|
+
try {
|
|
80
|
+
await app.listen({ port: config.port });
|
|
81
|
+
console.log(`🚀 {{pascalCase name}} listening on http://localhost:${config.port}`);
|
|
82
|
+
} catch (err) {
|
|
83
|
+
app.log.error(err);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
start();
|
|
89
|
+
{{/if}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{kebabCase name}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "bun run --watch src/index.ts",
|
|
7
|
+
"build": "bun build src/index.ts --outdir dist --target node",
|
|
8
|
+
"start": "bun run dist/index.js",
|
|
9
|
+
"test": "bun test",
|
|
10
|
+
"lint": "biome check .",
|
|
11
|
+
"format": "biome format --write ."
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
{{#if (eq framework "hono")}}
|
|
15
|
+
"hono": "^4.0.0",
|
|
16
|
+
"@hono/node-server": "^1.8.0"
|
|
17
|
+
{{else if (eq framework "express")}}
|
|
18
|
+
"express": "^4.18.0",
|
|
19
|
+
"@types/express": "^4.17.0"
|
|
20
|
+
{{else}}
|
|
21
|
+
"fastify": "^4.25.0"
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{#if includeDb}}
|
|
24
|
+
,"drizzle-orm": "^0.29.0",
|
|
25
|
+
"postgres": "^3.4.0"
|
|
26
|
+
{{/if}}
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/bun": "latest",
|
|
30
|
+
"typescript": "^5.3.0",
|
|
31
|
+
"@biomejs/biome": "^1.5.0"
|
|
32
|
+
{{#if includeDb}}
|
|
33
|
+
,"drizzle-kit": "^0.20.0"
|
|
34
|
+
{{/if}}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Health check routes
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
{{#if (eq framework "hono")}}
|
|
6
|
+
import { Hono } from "hono";
|
|
7
|
+
|
|
8
|
+
export const healthRoutes = new Hono();
|
|
9
|
+
|
|
10
|
+
healthRoutes.get("/", (c) => {
|
|
11
|
+
return c.json({
|
|
12
|
+
status: "ok",
|
|
13
|
+
service: "{{kebabCase name}}",
|
|
14
|
+
timestamp: new Date().toISOString(),
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
healthRoutes.get("/ready", (c) => {
|
|
19
|
+
// Add readiness checks here (db connection, etc.)
|
|
20
|
+
return c.json({ ready: true });
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
healthRoutes.get("/live", (c) => {
|
|
24
|
+
return c.json({ live: true });
|
|
25
|
+
});
|
|
26
|
+
{{else if (eq framework "express")}}
|
|
27
|
+
import { Router } from "express";
|
|
28
|
+
|
|
29
|
+
export const healthRoutes = Router();
|
|
30
|
+
|
|
31
|
+
healthRoutes.get("/", (req, res) => {
|
|
32
|
+
res.json({
|
|
33
|
+
status: "ok",
|
|
34
|
+
service: "{{kebabCase name}}",
|
|
35
|
+
timestamp: new Date().toISOString(),
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
healthRoutes.get("/ready", (req, res) => {
|
|
40
|
+
// Add readiness checks here (db connection, etc.)
|
|
41
|
+
res.json({ ready: true });
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
healthRoutes.get("/live", (req, res) => {
|
|
45
|
+
res.json({ live: true });
|
|
46
|
+
});
|
|
47
|
+
{{else}}
|
|
48
|
+
import type { FastifyInstance } from "fastify";
|
|
49
|
+
|
|
50
|
+
export async function healthRoutes(app: FastifyInstance) {
|
|
51
|
+
app.get("/", async () => ({
|
|
52
|
+
status: "ok",
|
|
53
|
+
service: "{{kebabCase name}}",
|
|
54
|
+
timestamp: new Date().toISOString(),
|
|
55
|
+
}));
|
|
56
|
+
|
|
57
|
+
app.get("/ready", async () => ({ ready: true }));
|
|
58
|
+
|
|
59
|
+
app.get("/live", async () => ({ live: true }));
|
|
60
|
+
}
|
|
61
|
+
{{/if}}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route definitions for {{pascalCase name}}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
{{#if (eq framework "hono")}}
|
|
6
|
+
import { Hono } from "hono";
|
|
7
|
+
import { healthRoutes } from "./health.js";
|
|
8
|
+
|
|
9
|
+
export const routes = new Hono();
|
|
10
|
+
|
|
11
|
+
routes.route("/health", healthRoutes);
|
|
12
|
+
|
|
13
|
+
// Add more routes here
|
|
14
|
+
// routes.route("/api/v1", apiRoutes);
|
|
15
|
+
{{else if (eq framework "express")}}
|
|
16
|
+
import { Router } from "express";
|
|
17
|
+
import { healthRoutes } from "./health.js";
|
|
18
|
+
|
|
19
|
+
export const routes = Router();
|
|
20
|
+
|
|
21
|
+
routes.use("/health", healthRoutes);
|
|
22
|
+
|
|
23
|
+
// Add more routes here
|
|
24
|
+
// routes.use("/api/v1", apiRoutes);
|
|
25
|
+
{{else}}
|
|
26
|
+
import type { FastifyInstance } from "fastify";
|
|
27
|
+
import { healthRoutes } from "./health.js";
|
|
28
|
+
|
|
29
|
+
export async function routes(app: FastifyInstance) {
|
|
30
|
+
app.register(healthRoutes, { prefix: "/health" });
|
|
31
|
+
|
|
32
|
+
// Add more routes here
|
|
33
|
+
// app.register(apiRoutes, { prefix: "/api/v1" });
|
|
34
|
+
}
|
|
35
|
+
{{/if}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"rootDir": "./src",
|
|
12
|
+
"declaration": true,
|
|
13
|
+
"declarationMap": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"isolatedModules": true,
|
|
17
|
+
"noUnusedLocals": true,
|
|
18
|
+
"noUnusedParameters": true,
|
|
19
|
+
"noFallthroughCasesInSwitch": true,
|
|
20
|
+
"types": ["bun-types"]
|
|
21
|
+
},
|
|
22
|
+
"include": ["src/**/*"],
|
|
23
|
+
"exclude": ["node_modules", "dist"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for {{pascalCase name}}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface ApiResponse<T = unknown> {
|
|
6
|
+
success: boolean;
|
|
7
|
+
data?: T;
|
|
8
|
+
error?: {
|
|
9
|
+
code: string;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface PaginatedResponse<T> extends ApiResponse<T[]> {
|
|
15
|
+
pagination: {
|
|
16
|
+
page: number;
|
|
17
|
+
pageSize: number;
|
|
18
|
+
total: number;
|
|
19
|
+
totalPages: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface HealthStatus {
|
|
24
|
+
status: "ok" | "degraded" | "unhealthy";
|
|
25
|
+
service: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
checks?: Record<string, boolean>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { {{componentName}} } from './{{componentName}}';
|
|
3
|
+
|
|
4
|
+
describe('{{componentName}}', () => {
|
|
5
|
+
it('renders successfully', () => {
|
|
6
|
+
render(<{{componentName}} {{testProps}}/>);
|
|
7
|
+
expect(screen.getByText('{{componentName}}')).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{{propsImport}}
|
|
2
|
+
{{cssImport}}
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* {{componentName}} Component
|
|
6
|
+
* {{componentDescription}}
|
|
7
|
+
*/
|
|
8
|
+
export function {{componentName}}({{propsParam}}) {
|
|
9
|
+
return (
|
|
10
|
+
<div{{containerClass}}>
|
|
11
|
+
<h1>{{componentName}}</h1>
|
|
12
|
+
{/* Component content */}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
{{componentName}}.displayName = '{{componentName}}';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './globals.css';
|
|
2
|
+
import type { Metadata } from 'next';
|
|
3
|
+
|
|
4
|
+
export const metadata: Metadata = {
|
|
5
|
+
title: '{{projectName}}',
|
|
6
|
+
description: '{{projectDescription}}',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
10
|
+
return (
|
|
11
|
+
<html lang="en">
|
|
12
|
+
<body>{children}</body>
|
|
13
|
+
</html>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const nextJest = require('next/jest');
|
|
2
|
+
|
|
3
|
+
const createJestConfig = nextJest({ dir: './' });
|
|
4
|
+
|
|
5
|
+
const customJestConfig = {
|
|
6
|
+
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
|
7
|
+
testEnvironment: 'jsdom',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
module.exports = createJestConfig(customJestConfig);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{packageJson}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{tsconfig}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
2
|
+
import { Suspense } from 'react';
|
|
3
|
+
import { routes } from './routes';
|
|
4
|
+
import { AppRoutes } from './routes/AppRoutes';
|
|
5
|
+
import './App.css';
|
|
6
|
+
|
|
7
|
+
export function App() {
|
|
8
|
+
return (
|
|
9
|
+
<BrowserRouter>
|
|
10
|
+
<Suspense fallback={<div>Loading...</div>}>
|
|
11
|
+
<AppRoutes routes={routes} />
|
|
12
|
+
</Suspense>
|
|
13
|
+
</BrowserRouter>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default App;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>{{projectName}}</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{packageJson}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{tsconfigBuild}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{tsconfig}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{tsconfigNode}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [react()],
|
|
6
|
+
server: {
|
|
7
|
+
port: {{devServerPort}},
|
|
8
|
+
},
|
|
9
|
+
build: {
|
|
10
|
+
target: 'es2022',
|
|
11
|
+
sourcemap: true{{additionalBuildConfig}}
|
|
12
|
+
},
|
|
13
|
+
test: {
|
|
14
|
+
globals: true,
|
|
15
|
+
environment: 'jsdom',
|
|
16
|
+
setupFiles: ['./src/test-setup.ts'],
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import type { Request, Response, NextFunction } from 'express';
|
|
3
|
+
|
|
4
|
+
const router = express.Router();
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* {{serviceName}} API Routes
|
|
8
|
+
* Handles all {{serviceName}} related endpoints
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
router.get('/', async (_req: Request, res: Response, next: NextFunction) => {
|
|
12
|
+
try {
|
|
13
|
+
res.json({ message: '{{serviceName}} API working' });
|
|
14
|
+
} catch (error) {
|
|
15
|
+
next(error);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
router.post('/', async (_req: Request, res: Response, next: NextFunction) => {
|
|
20
|
+
try {
|
|
21
|
+
res.status(201).json({ message: '{{serviceName}} created' });
|
|
22
|
+
} catch (error) {
|
|
23
|
+
next(error);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { router as {{routerName}} };
|