@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,102 +0,0 @@
1
- ################################################################################
2
- # Database Outputs
3
- ################################################################################
4
-
5
- output "rds_cluster_endpoint" {
6
- description = "RDS cluster endpoint"
7
- value = module.rds.host
8
- }
9
-
10
- output "rds_cluster_port" {
11
- description = "RDS cluster port"
12
- value = module.rds.port
13
- }
14
-
15
- output "rds_database_name" {
16
- description = "RDS database name"
17
- value = module.rds.database_name
18
- }
19
-
20
- output "app_service_account_role_arn" {
21
- description = "The ARN of the IAM role for the application service account."
22
- value = aws_iam_role.app_service_account_role.arn
23
- }
24
-
25
- ################################################################################
26
- # Networking Outputs
27
- ################################################################################
28
-
29
- output "vpc_endpoint_security_group_id" {
30
- description = "Security group ID for VPC endpoints"
31
- value = module.networking.vpc_endpoint_security_group_id
32
- }
33
-
34
-
35
-
36
- output "s3_vpc_endpoint_id" {
37
- description = "S3 VPC endpoint ID"
38
- value = module.networking.s3_vpc_endpoint_id
39
- }
40
-
41
- output "ingress_cidr_blocks" {
42
- description = "Map of dynamically created security groups for ingress"
43
- value = module.networking.ingress_cidr_blocks
44
- }
45
-
46
- output "rds_username" {
47
- description = "RDS username for __APP_NAME__-db-user"
48
- value = module.rds.username
49
- }
50
-
51
- ################################################################################
52
- # Secrets Outputs
53
- ################################################################################
54
-
55
- output "database_secret_name" {
56
- description = "Name of the Kubernetes secret containing database credentials"
57
- value = module.secrets.database_secret_name
58
- }
59
-
60
- output "postgresql_secret_name" {
61
- description = "Name of the Kubernetes secret containing PostgreSQL credentials (Langfuse-style)"
62
- value = module.secrets.postgresql_secret_name
63
- }
64
-
65
- ################################################################################
66
- # Networking Outputs
67
- ################################################################################
68
-
69
- output "vpc_id" {
70
- description = "VPC ID used for resources"
71
- value = module.networking.vpc_id
72
- }
73
-
74
- output "subnet_ids" {
75
- description = "Subnet IDs used for resources"
76
- value = module.networking.subnet_ids
77
- }
78
-
79
- ################################################################################
80
- # EDW Access Outputs
81
- ################################################################################
82
-
83
- output "edw_readonly_username" {
84
- description = "Readonly database username for EDW access"
85
- value = module.rds.readonly_username
86
- }
87
-
88
- output "edw_readonly_secret_arn" {
89
- description = "ARN of the Secrets Manager secret containing readonly user credentials for EDW"
90
- value = module.rds.readonly_user_secret_arn
91
- }
92
-
93
- output "edw_readonly_secret_name" {
94
- description = "Name of the Secrets Manager secret containing readonly user credentials for EDW"
95
- value = module.rds.readonly_user_secret_name
96
- }
97
-
98
- output "edw_secret_reader_role_arn" {
99
- description = "ARN of the IAM role that EDW can assume to read the readonly credentials secret"
100
- value = module.rds.readonly_user_secret_reader_role_arn
101
- }
102
-
@@ -1,32 +0,0 @@
1
- terraform {
2
- required_version = ">= 1.5.0"
3
- required_providers {
4
- aws = {
5
- source = "hashicorp/aws"
6
- version = "~> 5.0"
7
- }
8
- kubernetes = {
9
- source = "hashicorp/kubernetes"
10
- version = "~> 2.0"
11
- }
12
- random = {
13
- source = "hashicorp/random"
14
- version = "~> 3.1"
15
- }
16
- http = {
17
- source = "hashicorp/http"
18
- version = "~> 3.0"
19
- }
20
- }
21
- backend "kubernetes" {}
22
- }
23
-
24
- provider "aws" {
25
- region = var.region
26
- }
27
-
28
- provider "kubernetes" {
29
- # The Kubernetes provider will be configured by the backend
30
- # No explicit configuration needed here
31
- }
32
-
@@ -1,4 +0,0 @@
1
- resource "postgresql_schema" "demo" {
2
- database = var.database_name
3
- name = var.schema_name
4
- }
@@ -1,9 +0,0 @@
1
- output "database_name" {
2
- description = "Database containing the demo schema."
3
- value = var.database_name
4
- }
5
-
6
- output "schema_name" {
7
- description = "Created demo schema name."
8
- value = postgresql_schema.demo.name
9
- }
@@ -1,19 +0,0 @@
1
- variable "aws_region" {
2
- description = "AWS region containing the shared Percepta internal database secret."
3
- type = string
4
- }
5
-
6
- variable "database_secret_name" {
7
- description = "AWS Secrets Manager secret name containing shared Postgres credentials."
8
- type = string
9
- }
10
-
11
- variable "database_name" {
12
- description = "Database where the demo app schema should be created."
13
- type = string
14
- }
15
-
16
- variable "schema_name" {
17
- description = "Postgres schema name for this demo app."
18
- type = string
19
- }
@@ -1,38 +0,0 @@
1
- terraform {
2
- required_version = ">= 1.5.0"
3
-
4
- required_providers {
5
- aws = {
6
- source = "hashicorp/aws"
7
- version = "~> 5.0"
8
- }
9
- postgresql = {
10
- source = "cyrilgdn/postgresql"
11
- version = "~> 1.22"
12
- }
13
- }
14
-
15
- backend "kubernetes" {}
16
- }
17
-
18
- provider "aws" {
19
- region = var.aws_region
20
- }
21
-
22
- data "aws_secretsmanager_secret_version" "database" {
23
- secret_id = var.database_secret_name
24
- }
25
-
26
- locals {
27
- database_credentials = jsondecode(data.aws_secretsmanager_secret_version.database.secret_string)
28
- }
29
-
30
- provider "postgresql" {
31
- host = local.database_credentials.host
32
- port = tonumber(local.database_credentials.port)
33
- username = local.database_credentials.username
34
- password = local.database_credentials.password
35
- sslmode = "require"
36
- connect_timeout = 15
37
- superuser = false
38
- }
@@ -1,65 +0,0 @@
1
- # __APP_NAME_UPPER__ Terraform Configuration Example
2
- # Copy this file to terraform.tfvars and customize for your environment
3
-
4
- ################################################################################
5
- # Required Variables
6
- ################################################################################
7
-
8
- # Environment name (e.g. dev, staging, prod)
9
- environment = "dev"
10
-
11
- # Base name for resources - will be used as prefix for all resources
12
- name = "__APP_NAME__"
13
-
14
- # AWS region where resources will be deployed
15
- region = "us-west-2"
16
-
17
- # EKS cluster name where secrets will be created
18
- cluster_name = "my-eks-cluster"
19
-
20
- # VPC ID where resources will be deployed
21
- vpc_id = "vpc-12345678"
22
-
23
- ################################################################################
24
- # Optional Variables
25
- ################################################################################
26
-
27
- # Kubernetes namespace for secrets (default: "__APP_NAME__")
28
- # namespace = "__APP_NAME__"
29
-
30
- # Subnet IDs for RDS and other resources (auto-discovered if not provided)
31
- # subnet_ids = ["subnet-12345678", "subnet-87654321"]
32
-
33
- # Custom subnet tags for auto-discovery (default shown below)
34
- # subnet_tags = {
35
- # "kubernetes.io/role/internal-elb" = "1"
36
- # }
37
-
38
- ################################################################################
39
- # RDS Configuration
40
- ################################################################################
41
-
42
- # Use existing RDS cluster (optional)
43
- # existing_rds_cluster_name = "my-existing-cluster"
44
-
45
- # Whether to create new RDS if existing cluster not specified (default: true)
46
- # create_new_rds = true
47
-
48
- # PostgreSQL engine version (default: "16.6")
49
- # rds_engine_version = "16.6"
50
-
51
- # RDS port (default: 5432)
52
- # rds_port = 5432
53
-
54
- # RDS instance class (default: "db.serverless")
55
- # rds_instance_class = "db.serverless"
56
-
57
- ################################################################################
58
- # S3 Configuration
59
- ################################################################################
60
-
61
- # Number of days after which S3 objects expire (null to disable expiration)
62
- # s3_bucket_expiration_days = 90
63
- # s3_bucket_expiration_days = null # Disable S3 object expiration
64
-
65
-
@@ -1,129 +0,0 @@
1
- ################################################################################
2
- # Common Variables
3
- ################################################################################
4
-
5
- variable "environment" {
6
- description = "Environment name (e.g. dev, staging, prod)"
7
- type = string
8
- }
9
-
10
- variable "name" {
11
- description = "Base name for resources"
12
- type = string
13
- }
14
-
15
- variable "region" {
16
- description = "AWS region for resources"
17
- type = string
18
- }
19
-
20
- variable "namespace" {
21
- description = "Kubernetes namespace for resources"
22
- type = string
23
- default = "__APP_NAME__"
24
- }
25
-
26
- variable "kubernetes_service_account" {
27
- description = "The name of the Kubernetes service account to associate with the IAM role."
28
- type = string
29
- default = "__APP_NAME__-sa"
30
- }
31
-
32
- ################################################################################
33
- # EKS Variables
34
- ################################################################################
35
-
36
- variable "cluster_name" {
37
- description = "EKS cluster name"
38
- type = string
39
- }
40
-
41
- variable "vpc_id" {
42
- description = "VPC ID where resources will be deployed"
43
- type = string
44
- }
45
-
46
- variable "subnet_ids" {
47
- description = "List of subnet IDs for resources"
48
- type = list(string)
49
- default = null
50
- }
51
-
52
- variable "subnet_tags" {
53
- description = "Tags for subnet selection"
54
- type = map(string)
55
- default = {
56
- "kubernetes.io/role/internal-elb" = "1"
57
- }
58
- }
59
-
60
- ################################################################################
61
- # Networking Variables
62
- ################################################################################
63
-
64
- variable "ingress_cidr_blocks" {
65
- description = "A map of security group names to a list of CIDR blocks to allow access from."
66
- type = map(list(string))
67
- default = {}
68
- }
69
-
70
- ################################################################################
71
- # RDS Variables
72
- ################################################################################
73
-
74
- variable "existing_rds_cluster_name" {
75
- description = "Name of existing RDS cluster to use (optional)"
76
- type = string
77
- default = null
78
- }
79
-
80
- variable "create_new_rds" {
81
- description = "Whether to create a new RDS cluster if existing_rds_cluster_name is not provided"
82
- type = bool
83
- default = true
84
- }
85
-
86
- variable "rds_engine_version" {
87
- description = "PostgreSQL engine version"
88
- type = string
89
- default = "16.8"
90
- }
91
-
92
- variable "rds_port" {
93
- description = "Port for RDS"
94
- type = number
95
- default = 5432
96
- }
97
-
98
- variable "rds_instance_class" {
99
- description = "RDS instance class"
100
- type = string
101
- default = "db.serverless"
102
- }
103
-
104
- ################################################################################
105
- # S3 Variables
106
- ################################################################################
107
-
108
- variable "s3_bucket_expiration_days" {
109
- description = "Number of days after which S3 objects expire (null to disable expiration)"
110
- type = number
111
- default = null
112
- }
113
-
114
- ################################################################################
115
- # EDW Variables
116
- ################################################################################
117
-
118
- variable "edw_allowed_principals" {
119
- description = "List of IAM principal ARNs allowed to assume the EDW secret reader role (e.g., SSO permission sets, IAM roles). Example: ['arn:aws:iam::123456789012:role/aws-reserved/sso.amazonaws.com/us-west-2/AWSReservedSSO_DbaPermissionSet_abc123']"
120
- type = list(string)
121
- default = []
122
- }
123
-
124
- variable "edw_vpc_cidr_blocks" {
125
- description = "List of CIDR blocks from EDW VPC to allow database access via VPC peering"
126
- type = list(string)
127
- default = []
128
- }
129
-