@percepta/create 3.6.2 → 4.0.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.
Files changed (117) hide show
  1. package/README.md +37 -6
  2. package/dist/{git-ops-C2CIjuce.js → git-ops-BD7JNnal.js} +1 -1
  3. package/dist/{git-ops-C2CIjuce.js.map → git-ops-BD7JNnal.js.map} +1 -1
  4. package/dist/github-RCIMUq70.js +131 -0
  5. package/dist/github-RCIMUq70.js.map +1 -0
  6. package/dist/index.js +68 -125
  7. package/dist/index.js.map +1 -1
  8. package/dist/{init-sI9aIrkU.js → init-COp0nGdk.js} +4 -2
  9. package/dist/{init-sI9aIrkU.js.map → init-COp0nGdk.js.map} +1 -1
  10. package/dist/manifest-CqIDnbgs.js +58 -0
  11. package/dist/manifest-CqIDnbgs.js.map +1 -0
  12. package/dist/register-app-C7ZBpAaZ.js +103 -0
  13. package/dist/register-app-C7ZBpAaZ.js.map +1 -0
  14. package/dist/register-os-blueprint-DGjBUZYa.js +90 -0
  15. package/dist/register-os-blueprint-DGjBUZYa.js.map +1 -0
  16. package/dist/{status-CKe4aKso.js → status-BXYaQ4a2.js} +3 -3
  17. package/dist/{status-CKe4aKso.js.map → status-BXYaQ4a2.js.map} +1 -1
  18. package/dist/{sync-D1vkoofl.js → sync-BayU4w1j.js} +3 -3
  19. package/dist/{sync-D1vkoofl.js.map → sync-BayU4w1j.js.map} +1 -1
  20. package/dist/template-versions-CEIP9vhl.js +35 -0
  21. package/dist/template-versions-CEIP9vhl.js.map +1 -0
  22. package/dist/{upstream-gUHLWSR1.js → upstream-CZEzLrS4.js} +3 -3
  23. package/dist/{upstream-gUHLWSR1.js.map → upstream-CZEzLrS4.js.map} +1 -1
  24. package/dist/validate-dssldJAj.js +14 -0
  25. package/dist/validate-dssldJAj.js.map +1 -0
  26. package/package.json +1 -1
  27. package/template-versions.json +2 -2
  28. package/templates/infra/os.blueprint.yaml.template +138 -0
  29. package/templates/library/README.md +5 -2
  30. package/templates/library/gitignore.template +1 -0
  31. package/templates/library/package.json.template +17 -13
  32. package/templates/library/src/index.test.ts +8 -0
  33. package/templates/library/tsconfig.json +1 -17
  34. package/templates/library/tsdown.config.ts +3 -0
  35. package/templates/library/vitest.config.ts +3 -0
  36. package/templates/monorepo/.dockerignore +1 -0
  37. package/templates/monorepo/.github/CODEOWNERS +67 -0
  38. package/templates/monorepo/.github/actions/ci/action.yml +56 -0
  39. package/templates/monorepo/.github/workflows/build-and-publish.yml +22 -0
  40. package/templates/monorepo/.github/workflows/pr-build.yml +21 -0
  41. package/templates/monorepo/.node-version +1 -0
  42. package/templates/monorepo/README.md +41 -3
  43. package/templates/monorepo/auth/README.md +6 -3
  44. package/templates/monorepo/auth/package.json +5 -7
  45. package/templates/monorepo/auth/src/auth.ts +0 -1
  46. package/templates/monorepo/auth/src/config/database.ts +1 -1
  47. package/templates/monorepo/auth/tsconfig.json +1 -10
  48. package/templates/{webapp → monorepo}/docker-compose.yml +2 -2
  49. package/templates/monorepo/gitignore.template +1 -0
  50. package/templates/monorepo/oxfmt.config.ts.template +3 -0
  51. package/templates/monorepo/oxlint.config.ts.template +3 -0
  52. package/templates/monorepo/package.json.template +22 -11
  53. package/templates/monorepo/scripts/setup-local-databases.mjs +183 -0
  54. package/templates/monorepo/turbo.json +20 -0
  55. package/templates/webapp/.node-version +0 -1
  56. package/templates/webapp/AGENTS.md +33 -35
  57. package/templates/webapp/README.md +34 -38
  58. package/templates/webapp/agent-skills/database.md +21 -21
  59. package/templates/webapp/agent-skills/langfuse.md +7 -7
  60. package/templates/webapp/agent-skills/llm.md +4 -2
  61. package/templates/webapp/agent-skills/oneshot.md +7 -6
  62. package/templates/webapp/agent-skills/ryvn.md +12 -16
  63. package/templates/webapp/deploy/README.md +10 -51
  64. package/templates/webapp/drizzle.config.ts +2 -23
  65. package/templates/webapp/env.example.template +8 -14
  66. package/templates/webapp/globals.d.ts +1 -0
  67. package/templates/webapp/oxfmt.config.ts.template +5 -0
  68. package/templates/webapp/package.json.template +18 -33
  69. package/templates/webapp/scripts/seed.ts +1 -1
  70. package/templates/webapp/scripts/start.sh +12 -16
  71. package/templates/webapp/src/app/global-error.tsx +1 -1
  72. package/templates/webapp/src/config/getEnvConfig.ts +4 -10
  73. package/templates/webapp/src/config/isDev.ts +0 -2
  74. package/templates/webapp/src/drizzle/db.ts +6 -21
  75. package/templates/webapp/src/lib/auth-client.ts +6 -3
  76. package/templates/webapp/src/startup-checks.ts +28 -7
  77. package/templates/webapp/tsconfig.json +1 -12
  78. package/templates/webapp/vitest.config.ts +3 -7
  79. package/templates/library/eslint.config.js +0 -10
  80. package/templates/monorepo/auth/scripts/setup-database.ts +0 -11
  81. package/templates/monorepo/eslint.config.js +0 -10
  82. package/templates/monorepo/tsconfig.json +0 -16
  83. package/templates/webapp/.github/workflows/__APP_NAME__-terraform-ryvn-release.yaml +0 -92
  84. package/templates/webapp/.github/workflows/ci.yml +0 -149
  85. package/templates/webapp/.prettierrc.mjs +0 -5
  86. package/templates/webapp/agent-skills/deploy.md +0 -92
  87. package/templates/webapp/deploy/ryvn/__APP_NAME__-terraform.service.yaml +0 -10
  88. package/templates/webapp/deploy/ryvn/environments/percepta-test/installations/__APP_NAME__-terraform.env.percepta-test.serviceinstallation.yaml +0 -11
  89. package/templates/webapp/deploy/ryvn/environments/percepta-test/installations/__APP_NAME__.env.percepta-test.serviceinstallation.yaml +0 -154
  90. package/templates/webapp/eslint.config.mjs +0 -100
  91. package/templates/webapp/npmrc.template +0 -4
  92. package/templates/webapp/terraform/README.md +0 -147
  93. package/templates/webapp/terraform/deploy.sh +0 -97
  94. package/templates/webapp/terraform/main.tf +0 -101
  95. package/templates/webapp/terraform/modules/cloudtrail/main.tf +0 -27
  96. package/templates/webapp/terraform/modules/cloudtrail/outputs.tf +0 -10
  97. package/templates/webapp/terraform/modules/cloudtrail/variables.tf +0 -15
  98. package/templates/webapp/terraform/modules/networking/main.tf +0 -118
  99. package/templates/webapp/terraform/modules/networking/outputs.tf +0 -38
  100. package/templates/webapp/terraform/modules/networking/variables.tf +0 -24
  101. package/templates/webapp/terraform/modules/rds/main.tf +0 -227
  102. package/templates/webapp/terraform/modules/rds/outputs.tf +0 -73
  103. package/templates/webapp/terraform/modules/rds/variables.tf +0 -61
  104. package/templates/webapp/terraform/modules/s3-logging/main.tf +0 -148
  105. package/templates/webapp/terraform/modules/s3-logging/outputs.tf +0 -10
  106. package/templates/webapp/terraform/modules/s3-logging/variables.tf +0 -16
  107. package/templates/webapp/terraform/modules/secrets/main.tf +0 -39
  108. package/templates/webapp/terraform/modules/secrets/outputs.tf +0 -9
  109. package/templates/webapp/terraform/modules/secrets/variables.tf +0 -51
  110. package/templates/webapp/terraform/outputs.tf +0 -102
  111. package/templates/webapp/terraform/providers.tf +0 -32
  112. package/templates/webapp/terraform/schema/main.tf +0 -4
  113. package/templates/webapp/terraform/schema/outputs.tf +0 -9
  114. package/templates/webapp/terraform/schema/variables.tf +0 -19
  115. package/templates/webapp/terraform/schema/versions.tf +0 -38
  116. package/templates/webapp/terraform/terraform.tfvars.example +0 -65
  117. package/templates/webapp/terraform/variables.tf +0 -129
@@ -1,92 +0,0 @@
1
- name: Build & Release __APP_NAME__-terraform
2
-
3
- on:
4
- push:
5
- branches:
6
- - "main"
7
- paths:
8
- - "packages/__APP_NAME__/terraform/schema/**"
9
- - ".github/workflows/__APP_NAME__-terraform-ryvn-release.yaml"
10
- workflow_dispatch:
11
-
12
- env:
13
- SERVICE_NAME: __APP_NAME__-terraform
14
-
15
- jobs:
16
- build-and-release:
17
- name: Build and Release
18
- runs-on: ubuntu-latest
19
- permissions:
20
- contents: write
21
- id-token: write
22
-
23
- steps:
24
- - name: Checkout code
25
- uses: actions/checkout@v4
26
- with:
27
- fetch-depth: 0
28
-
29
- - name: Install Ryvn CLI
30
- uses: ryvn-technologies/install-ryvn-cli@v1.0.0
31
-
32
- - name: Generate Release Tag
33
- id: generate-tag
34
- env:
35
- RYVN_CLIENT_ID: ${{ secrets.RYVN_CLIENT_ID }}
36
- RYVN_CLIENT_SECRET: ${{ secrets.RYVN_CLIENT_SECRET }}
37
- run: |
38
- tag_info=$(ryvn generate-release-tag "$SERVICE_NAME" --prefix="${SERVICE_NAME}@" -o json --default-bump-minor)
39
-
40
- version=$(echo "$tag_info" | jq -r '.version')
41
- new_tag=$(echo "$tag_info" | jq -r '.tag')
42
- channel=$(echo "$tag_info" | jq -r '.channel')
43
- isPreview=$(echo "$tag_info" | jq -r '.isPreview')
44
-
45
- echo "version=$version" >> $GITHUB_OUTPUT
46
- echo "new_tag=$new_tag" >> $GITHUB_OUTPUT
47
- echo "channel=$channel" >> $GITHUB_OUTPUT
48
- echo "isPreview=$isPreview" >> $GITHUB_OUTPUT
49
-
50
- - name: Create Ryvn Release
51
- if: |
52
- !contains(github.event.head_commit.message, '[skip-release]') &&
53
- !contains(github.event.pull_request.title, '[skip-release]') &&
54
- (steps.generate-tag.outputs.isPreview == 'true' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
55
- env:
56
- RYVN_CLIENT_ID: ${{ secrets.RYVN_CLIENT_ID }}
57
- RYVN_CLIENT_SECRET: ${{ secrets.RYVN_CLIENT_SECRET }}
58
- run: |
59
- version="${{ steps.generate-tag.outputs.new_tag }}"
60
- version="${version#"${SERVICE_NAME}@"}"
61
- version="${version#@}"
62
- channel="${{ steps.generate-tag.outputs.channel }}"
63
-
64
- if [ -n "$channel" ] && [ "$channel" != "null" ]; then
65
- ryvn create release "$SERVICE_NAME" "$version" --channel "$channel"
66
- else
67
- ryvn create release "$SERVICE_NAME" "$version"
68
- fi
69
-
70
- - name: Create GitHub Tag
71
- if: |
72
- github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
73
- !contains(github.event.head_commit.message, '[skip-release]') &&
74
- !contains(github.event.pull_request.title, '[skip-release]')
75
- run: |
76
- git config --global user.email "github-actions[bot]@users.noreply.github.com"
77
- git config --global user.name "github-actions[bot]"
78
- git tag "${{ steps.generate-tag.outputs.new_tag }}"
79
- git push origin "${{ steps.generate-tag.outputs.new_tag }}"
80
-
81
- - name: Create GitHub Release
82
- if: |
83
- github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
84
- !contains(github.event.head_commit.message, '[skip-release]') &&
85
- !contains(github.event.pull_request.title, '[skip-release]')
86
- uses: softprops/action-gh-release@v1
87
- with:
88
- tag_name: ${{ steps.generate-tag.outputs.new_tag }}
89
- name: ${{ steps.generate-tag.outputs.new_tag }}
90
- generate_release_notes: true
91
- draft: false
92
- prerelease: false
@@ -1,149 +0,0 @@
1
- name: Build
2
-
3
- on:
4
- push: {}
5
-
6
- env:
7
- PNPM_VERSION: 10.x
8
-
9
- jobs:
10
- setup:
11
- name: Setup
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - name: Checkout repository
16
- uses: actions/checkout@v4
17
-
18
- - name: Setup PNPM
19
- uses: pnpm/action-setup@v4
20
- with:
21
- version: ${{ env.PNPM_VERSION }}
22
-
23
- - name: Setup Node.js
24
- uses: actions/setup-node@v4
25
- with:
26
- node-version-file: ".node-version"
27
- cache: pnpm
28
-
29
- - name: Install dependencies
30
- run: pnpm install --frozen-lockfile
31
-
32
- - name: Check packages are deduplicated
33
- run: pnpm dedupe --check
34
-
35
- build:
36
- name: Build
37
- needs: setup
38
- runs-on: ubuntu-latest
39
-
40
- steps:
41
- - name: Checkout repository
42
- uses: actions/checkout@v4
43
-
44
- - name: Setup PNPM
45
- uses: pnpm/action-setup@v4
46
- with:
47
- version: ${{ env.PNPM_VERSION }}
48
-
49
- - name: Setup Node.js
50
- uses: actions/setup-node@v4
51
- with:
52
- node-version-file: ".node-version"
53
- cache: pnpm
54
-
55
- - name: Install dependencies
56
- run: pnpm install --frozen-lockfile
57
-
58
- - name: Build project
59
- run: pnpm build
60
-
61
- lint:
62
- name: Lint
63
- needs: setup
64
- runs-on: ubuntu-latest
65
-
66
- steps:
67
- - name: Checkout repository
68
- uses: actions/checkout@v4
69
-
70
- - name: Setup PNPM
71
- uses: pnpm/action-setup@v4
72
- with:
73
- version: ${{ env.PNPM_VERSION }}
74
-
75
- - name: Setup Node.js
76
- uses: actions/setup-node@v4
77
- with:
78
- node-version-file: ".node-version"
79
- cache: pnpm
80
-
81
- - name: Install dependencies
82
- run: pnpm install --frozen-lockfile
83
-
84
- - name: Run lint checks
85
- run: pnpm lint
86
-
87
- check-migrations:
88
- name: Check for Migrations
89
- needs: setup
90
- runs-on: ubuntu-latest
91
-
92
- steps:
93
- - name: Checkout repository
94
- uses: actions/checkout@v4
95
-
96
- - name: Setup PNPM
97
- uses: pnpm/action-setup@v4
98
- with:
99
- version: ${{ env.PNPM_VERSION }}
100
-
101
- - name: Setup Node.js
102
- uses: actions/setup-node@v4
103
- with:
104
- node-version-file: ".node-version"
105
- cache: pnpm
106
-
107
- - name: Install dependencies
108
- run: pnpm install --frozen-lockfile
109
-
110
- - name: Generate migration check
111
- run: pnpm db:generate
112
-
113
- - name: Check for journal changes
114
- run: git diff --exit-code src/drizzle/migrations/meta/_journal.json
115
-
116
- # ──────────────────────────────────────────────────────────────────────────────
117
- # Docker Build Validation
118
- # ──────────────────────────────────────────────────────────────────────────────
119
-
120
- changes:
121
- name: Detect Changes
122
- runs-on: ubuntu-latest
123
- outputs:
124
- root: ${{ steps.filter.outputs.root }}
125
- steps:
126
- - uses: actions/checkout@v4
127
- - uses: dorny/paths-filter@v3
128
- id: filter
129
- with:
130
- filters: |
131
- root:
132
- - 'src/**'
133
- - 'scripts/**'
134
- - 'Dockerfile'
135
- - 'package.json'
136
- - 'pnpm-lock.yaml'
137
- - 'tsconfig.json'
138
-
139
- docker-build-root:
140
- name: Docker Build (root)
141
- needs: changes
142
- if: needs.changes.outputs.root == 'true'
143
- runs-on: ubuntu-latest
144
- steps:
145
- - uses: actions/checkout@v4
146
- - name: Build Docker image
147
- run: docker build --build-arg NPM_TOKEN=${{ secrets.NPM_TOKEN }} -t __APP_NAME__:ci .
148
- - name: Verify server.js is valid
149
- run: docker run --rm __APP_NAME__:ci node --check server.js
@@ -1,5 +0,0 @@
1
- import { createPrettierConfigReact } from "@percepta/build/prettier";
2
-
3
- export default createPrettierConfigReact({
4
- tailwindStylesheet: "./src/styles/globals.css",
5
- });
@@ -1,92 +0,0 @@
1
- # Deploying to Percepta Test
2
-
3
- This guide deploys __APP_TITLE__ to `https://__APP_NAME__.percepta-test.aitco.dev` using Ryvn. Tell Claude "deploy this app to percepta-test" and it should run the direct deploy helper below.
4
-
5
- This is the existing-environment deploy motion: `percepta-test` already owns the shared platform services, and this app is wired into them. Fresh-environment platform bootstrap is separate and should use a Ryvn blueprint or environment-specific platform rollout before app deploys run. The `pnpm deploy:percepta-test` script delegates to the versioned `@percepta/deploy` CLI; this app owns only its Ryvn YAML and generated secrets env file.
6
-
7
- ## What's Already Scaffolded
8
-
9
- - `deploy/ryvn/__APP_NAME__.service.yaml` — Ryvn server service for the web app.
10
- - `deploy/ryvn/__APP_NAME__-terraform.service.yaml` — Ryvn Terraform service that creates the app's Postgres schema.
11
- - `deploy/ryvn/environments/percepta-test/installations/__APP_NAME__.env.percepta-test.serviceinstallation.yaml` — web installation.
12
- - `deploy/ryvn/environments/percepta-test/installations/__APP_NAME__-terraform.env.percepta-test.serviceinstallation.yaml` — schema installation.
13
- - `.github/workflows/__APP_NAME__-ryvn-release.yaml` — builds the Docker image and creates the web Ryvn release.
14
- - `.github/workflows/__APP_NAME__-terraform-ryvn-release.yaml` — creates the schema Terraform Ryvn release.
15
- - `deploy/ryvn/percepta-test.secrets.env` — generated locally and ignored by git; injected into the app installation as Ryvn secrets by the deploy helper.
16
-
17
- See [`deploy/README.md`](../deploy/README.md) for the file-by-file breakdown.
18
-
19
- ## Prerequisites
20
-
21
- - `git`, `gh`, and `ryvn` are installed and authenticated.
22
- - The worktree is clean and committed. The helper pushes the current branch to `main` because GitHub Actions builds from GitHub.
23
- - The Percepta-Core org has `RYVN_CLIENT_ID`, `RYVN_CLIENT_SECRET`, and `NPM_TOKEN` available as org-level GitHub secrets.
24
- - These shared platform installations are already deployed and healthy in `percepta-test`: `percepta-internal-terraform`, `inngest-test`, `otel-collector`, `lgtm-stack-helm`, and `langfuse`.
25
- - The `demos-commons` Ryvn variable group exists in `percepta-test` and provides `LANGFUSE_PUBLIC_KEY` plus sensitive `ANTHROPIC_API_KEY` and `LANGFUSE_SECRET_KEY` for shared demo LLM calls and Langfuse tracing.
26
-
27
- ## Deploy
28
-
29
- From this package directory:
30
-
31
- ```bash
32
- pnpm deploy:percepta-test -- --yes
33
- ```
34
-
35
- The helper:
36
-
37
- 1. Checks the existing platform installations and shared demo variable group in `percepta-test`.
38
- 2. Creates `Percepta-Core/__REPO_NAME__` if needed.
39
- 3. Pushes the current branch to `main`.
40
- 4. Creates or replaces the Ryvn web and schema services.
41
- 5. Runs the schema Terraform release workflow.
42
- 6. Creates or replaces the schema installation and approves the Terraform plan.
43
- 7. Runs the web release workflow.
44
- 8. Creates or replaces the web installation.
45
- 9. Creates or updates app-scoped Ryvn installation secrets for `BETTER_AUTH_SECRET` and `ENCRYPTION_SECRET_KEY` from `deploy/ryvn/percepta-test.secrets.env`. On first install, the helper injects them into the create manifest so the first pod starts with auth configured.
46
- 10. Waits for Ryvn health and checks `/api/healthz`, `/api/readyz`, and the protected app route.
47
-
48
- The app will be available at **https://__APP_NAME__.percepta-test.aitco.dev**.
49
-
50
- ## Useful Variants
51
-
52
- ```bash
53
- pnpm deploy:percepta-test -- --skip-workflows --yes
54
- pnpm deploy:percepta-test -- --skip-push --yes
55
- pnpm deploy:percepta-test -- --timeout-minutes 30 --yes
56
- ```
57
-
58
- Use `--skip-workflows` when the required Ryvn releases already exist. Use `--skip-push` only when the target ref is already pushed.
59
-
60
- The legacy infra-PR path is still available:
61
-
62
- ```bash
63
- pnpm deploy:percepta-test:pr -- --phase service --yes
64
- pnpm deploy:percepta-test:pr -- --phase installation --yes
65
- ```
66
-
67
- ## Verify
68
-
69
- ```bash
70
- ryvn get installation __APP_NAME__ -e percepta-test
71
- ryvn logs __APP_NAME__ -e percepta-test
72
- curl -s https://__APP_NAME__.percepta-test.aitco.dev/api/healthz
73
- curl -s https://__APP_NAME__.percepta-test.aitco.dev/api/readyz
74
- curl -I https://__APP_NAME__.percepta-test.aitco.dev/
75
- ```
76
-
77
- For apps with tRPC routes, also verify at least one endpoint that initializes Better Auth or app services. `healthz` can be green even when app-specific secrets or workflow wiring are wrong.
78
-
79
- ## Troubleshooting
80
-
81
- - **Image build fails fetching @percepta packages** → check the Percepta-Core org-level `NPM_TOKEN` secret. Do not add a repo-level token unless the org secret is unavailable.
82
- - **Ryvn release already exists** → commit a new change or re-run with `--skip-workflows` if the current releases are already present.
83
- - **Terraform plan needs approval** → the helper approves it when run with `--yes`; without `--yes`, approve the prompt.
84
- - **Auth/sign-in or tRPC routes fail after install** → verify the `__APP_NAME__` installation has `BETTER_AUTH_SECRET` and `ENCRYPTION_SECRET_KEY` secrets from `deploy/ryvn/percepta-test.secrets.env`, then redeploy `__APP_NAME__` so the pod reloads them.
85
- - **Pod crash-looping** → check `ryvn logs`; migration or database connectivity failures are the most common fresh-deploy causes.
86
- - **Database schema missing** → check `ryvn get installation __APP_NAME__-terraform -e percepta-test`.
87
- - **Inngest can't reach the app** → `INNGEST_APP_URL` must use the k8s service name `__APP_NAME__-web-server`.
88
- - **Platform preflight fails** → deploy or repair the missing shared installation first. This helper only wires apps into an existing environment.
89
- - **No Langfuse traces** → verify the target environment has Langfuse deployed and that the `demos-commons` variable group has `LANGFUSE_PUBLIC_KEY` and sensitive `LANGFUSE_SECRET_KEY`.
90
- - **LLM calls fail after deploy** → verify `demos-commons` has sensitive `ANTHROPIC_API_KEY` and the installation has `LLM_PROVIDER=anthropic`.
91
-
92
- For Ryvn CLI operations, use the `/use-ryvn` skill.
@@ -1,10 +0,0 @@
1
- kind: Service
2
- metadata:
3
- name: __APP_NAME__-terraform
4
- spec:
5
- type: terraform
6
- repo: Percepta-Core/__REPO_NAME__
7
- autoApprove: false
8
- build:
9
- path: packages/__APP_NAME__/terraform/schema
10
- tagPrefix: __APP_NAME__-terraform@
@@ -1,11 +0,0 @@
1
- kind: ServiceInstallation
2
- metadata:
3
- name: __APP_NAME__-terraform
4
- spec:
5
- service: __APP_NAME__-terraform
6
- environment: percepta-test
7
- config: |
8
- aws_region: {{ .ryvn.env.state.cluster_region }}
9
- database_secret_name: {{ .ryvn.installations.percepta_internal_terraform.outputs.percepta_internal_secrets_manager_secret_name }}
10
- database_name: demos
11
- schema_name: __APP_NAME_SNAKE__
@@ -1,154 +0,0 @@
1
- kind: ServiceInstallation
2
- metadata:
3
- name: __APP_NAME__
4
- spec:
5
- service: __APP_NAME__
6
- environment: percepta-test
7
- config: |
8
- replicaCount: 1
9
-
10
- service:
11
- port: 3000
12
-
13
- startupEnabled: true
14
- startupProbe:
15
- httpGet:
16
- path: /api/healthz
17
- port: 3000
18
- failureThreshold: 30
19
- periodSeconds: 10
20
- livenessEnabled: true
21
- livenessProbe:
22
- httpGet:
23
- path: /api/healthz
24
- port: 3000
25
- readinessEnabled: true
26
- readinessProbe:
27
- httpGet:
28
- path: /api/readyz
29
- port: 3000
30
-
31
- resources:
32
- requests:
33
- cpu: "100m"
34
- memory: "256Mi"
35
- limits:
36
- cpu: "500m"
37
- memory: "512Mi"
38
-
39
- ingress:
40
- enabled: true
41
- className: external-nginx
42
- annotations:
43
- cert-manager.io/cluster-issuer: external-issuer
44
- nginx.ingress.kubernetes.io/ssl-redirect: "true"
45
- hosts:
46
- - host: __APP_NAME__.percepta-test.aitco.dev
47
- paths:
48
- - path: /
49
- pathType: Prefix
50
- tls:
51
- - secretName: __APP_NAME__-tls
52
- hosts:
53
- - __APP_NAME__.percepta-test.aitco.dev
54
-
55
- env:
56
- # Database — shared `demos` DB on the percepta-internal Postgres instance.
57
- # Tables live under a per-app schema created by the __APP_NAME__-terraform
58
- # Ryvn service. DATABASE_SCHEMA pins the connection search_path so Drizzle
59
- # migrations + queries land there.
60
- - name: DATABASE_HOST
61
- valueFrom:
62
- secretKeyRef:
63
- name: "{{ .ryvn.installations.percepta_internal_terraform.outputs.percepta_internal_postgresql_secret_name }}"
64
- key: host
65
- - name: DATABASE_PORT
66
- valueFrom:
67
- secretKeyRef:
68
- name: "{{ .ryvn.installations.percepta_internal_terraform.outputs.percepta_internal_postgresql_secret_name }}"
69
- key: port
70
- - name: DATABASE_USERNAME
71
- valueFrom:
72
- secretKeyRef:
73
- name: "{{ .ryvn.installations.percepta_internal_terraform.outputs.percepta_internal_postgresql_secret_name }}"
74
- key: username
75
- - name: DATABASE_PASSWORD
76
- valueFrom:
77
- secretKeyRef:
78
- name: "{{ .ryvn.installations.percepta_internal_terraform.outputs.percepta_internal_postgresql_secret_name }}"
79
- key: password
80
- - name: DATABASE_NAME
81
- value: "demos"
82
- - name: DATABASE_SCHEMA
83
- value: "__APP_NAME_SNAKE__"
84
- - name: DATABASE_USE_SSL
85
- value: "true"
86
-
87
- - name: NODE_ENV
88
- value: "production"
89
- - name: PORT
90
- value: "3000"
91
- env:
92
- # App identity
93
- - key: APP_BASE_URL
94
- value: https://__APP_NAME__.percepta-test.aitco.dev
95
- - key: BETTER_AUTH_URL
96
- value: https://__APP_NAME__.percepta-test.aitco.dev
97
- # deploy:percepta-test injects BETTER_AUTH_SECRET and ENCRYPTION_SECRET_KEY
98
- # from deploy/ryvn/percepta-test.secrets.env into the create request.
99
- # Secret values are intentionally not declared here.
100
-
101
- # Inngest (shared percepta-test platform service)
102
- - key: INNGEST_BASE_URL
103
- value: http://inngest.percepta-test.svc.cluster.local:8288
104
- - key: INNGEST_EVENT_KEY
105
- value: c0766e61c95af6afd18911698080b4fea4d311f60b02033d673234ded333ff39
106
- - key: INNGEST_SIGNING_KEY
107
- value: signkey-dev-7782b39265d2ca61d083fe1b230b468b10f01434d49486051fd108363da736f2
108
- - key: INNGEST_APP_URL
109
- value: http://__APP_NAME__-web-server.percepta-test.svc.cluster.local:3000/api/inngest
110
- - key: INNGEST_SERVE_HOST
111
- value: http://__APP_NAME__-web-server.percepta-test.svc.cluster.local:3000/api/inngest
112
-
113
- # Observability (shared percepta-test OTEL collector + LGTM stack)
114
- # Application logs are emitted to stdout and collected by the shared OTEL
115
- # collector. Traces and metrics are exported over OTLP HTTP.
116
- - key: OTEL_SERVICE_NAME
117
- value: __APP_NAME__
118
- - key: OTEL_RESOURCE_ATTRIBUTES
119
- value: service.namespace=__REPO_NAME__,deployment.environment=percepta-test
120
- - key: OTEL_TRACES_EXPORTER
121
- value: otlp
122
- - key: OTEL_METRICS_EXPORTER
123
- value: otlp
124
- - key: OTEL_LOGS_EXPORTER
125
- value: none
126
- - key: OTEL_EXPORTER_OTLP_PROTOCOL
127
- value: http/protobuf
128
- - key: OTEL_EXPORTER_OTLP_ENDPOINT
129
- value: http://otel-collector-opentelemetry-collector.percepta-test.svc.cluster.local:4318
130
- - key: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
131
- value: http://otel-collector-opentelemetry-collector.percepta-test.svc.cluster.local:4318/v1/traces
132
- - key: OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
133
- value: http://otel-collector-opentelemetry-collector.percepta-test.svc.cluster.local:4318/v1/metrics
134
- - key: OTEL_METRIC_EXPORT_INTERVAL
135
- value: "60000"
136
- - key: NEXT_PUBLIC_FARO_APP_NAME
137
- value: __APP_NAME__
138
- - key: NEXT_PUBLIC_FARO_APP_VERSION
139
- value: "0.1.0"
140
- - key: NEXT_PUBLIC_FARO_APP_ENVIRONMENT
141
- value: percepta-test
142
- - key: LOG_LEVEL
143
- value: debug
144
-
145
- # Langfuse (shared percepta-test platform service). Project keys come from
146
- # the demos-commons Ryvn variable group below.
147
- - key: LANGFUSE_BASE_URL
148
- value: https://langfuse.percepta-test.aitco.dev
149
-
150
- # LLM provider (shared demo Anthropic key comes from demos-commons).
151
- - key: LLM_PROVIDER
152
- value: anthropic
153
- variableGroups:
154
- - name: demos-commons
@@ -1,100 +0,0 @@
1
- // @ts-check
2
- import eslint from "@eslint/js";
3
- import nextPlugin from "@next/eslint-plugin-next";
4
- import nodePlugin from "eslint-plugin-n";
5
- import reactPlugin from "eslint-plugin-react";
6
- import reactHooksPlugin from "eslint-plugin-react-hooks";
7
- import globals from "globals";
8
- import tseslint from "typescript-eslint";
9
-
10
- export default tseslint.config(
11
- {
12
- ignores: [
13
- "pnpm-lock.yaml",
14
- "package.json",
15
- ".next/**",
16
- "next-env.d.ts",
17
- "public/**",
18
- "terraform/**",
19
- ],
20
- },
21
- eslint.configs.recommended,
22
- ...tseslint.configs.recommended,
23
- {
24
- files: ["**/*.{js,mjs,cjs,ts,tsx}"],
25
- languageOptions: {
26
- ecmaVersion: "latest",
27
- globals: {
28
- ...globals.browser,
29
- ...globals.node,
30
- },
31
- parserOptions: {
32
- ecmaFeatures: {
33
- jsx: true,
34
- },
35
- },
36
- sourceType: "module",
37
- },
38
- },
39
- {
40
- plugins: {
41
- "@next/next": nextPlugin,
42
- react: reactPlugin,
43
- "react-hooks": reactHooksPlugin,
44
- },
45
- rules: {
46
- ...nextPlugin.configs.recommended.rules,
47
- ...nextPlugin.configs["core-web-vitals"].rules,
48
- ...reactPlugin.configs.recommended.rules,
49
- ...reactHooksPlugin.configs.recommended.rules,
50
- "react/jsx-uses-react": "off",
51
- "react/react-in-jsx-scope": "off",
52
- },
53
- settings: {
54
- react: {
55
- version: "detect",
56
- },
57
- },
58
- },
59
- {
60
- files: ["src/**/*"],
61
- rules: {
62
- "no-console": "error",
63
- "no-restricted-syntax": [
64
- "error",
65
- {
66
- selector:
67
- "CallExpression[callee.property.name=/^(debug|info|warn|error)$/][callee.object.type='CallExpression'][callee.object.callee.name='getLogger'] > :nth-child(2):not(Literal)",
68
- message:
69
- "Logger message must be a plain string literal, not a variable or template. Use the first parameter (args) for dynamic data.",
70
- },
71
- ],
72
- },
73
- },
74
- {
75
- plugins: {
76
- n: nodePlugin,
77
- },
78
- rules: {
79
- "n/no-process-env": "error",
80
- },
81
- },
82
- {
83
- files: ["src/config/clientEnvConfig.ts"],
84
- rules: {
85
- "n/no-process-env": "off",
86
- },
87
- },
88
- {
89
- files: ["scripts/with-local-env.ts"],
90
- rules: {
91
- "n/no-process-env": "off",
92
- },
93
- },
94
- {
95
- files: ["playwright.config.ts"],
96
- rules: {
97
- "n/no-process-env": "off",
98
- },
99
- },
100
- );
@@ -1,4 +0,0 @@
1
- @percepta:registry=https://registry.npmjs.org/
2
- //registry.npmjs.org/:_authToken=${NPM_TOKEN}
3
-
4
- engine-strict=true