@percepta/create 3.6.2 → 3.6.3

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 (82) 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 +63 -122
  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/monorepo/README.md +41 -3
  30. package/templates/monorepo/auth/README.md +6 -3
  31. package/templates/monorepo/auth/package.json +2 -4
  32. package/templates/monorepo/auth/src/config/database.ts +1 -1
  33. package/templates/{webapp → monorepo}/docker-compose.yml +2 -2
  34. package/templates/monorepo/package.json.template +5 -2
  35. package/templates/monorepo/scripts/setup-local-databases.mjs +183 -0
  36. package/templates/webapp/AGENTS.md +13 -20
  37. package/templates/webapp/README.md +32 -36
  38. package/templates/webapp/agent-skills/database.md +21 -21
  39. package/templates/webapp/agent-skills/langfuse.md +7 -7
  40. package/templates/webapp/agent-skills/llm.md +4 -2
  41. package/templates/webapp/agent-skills/oneshot.md +7 -6
  42. package/templates/webapp/agent-skills/ryvn.md +12 -16
  43. package/templates/webapp/deploy/README.md +10 -51
  44. package/templates/webapp/drizzle.config.ts +2 -23
  45. package/templates/webapp/env.example.template +8 -14
  46. package/templates/webapp/package.json.template +5 -12
  47. package/templates/webapp/scripts/start.sh +12 -16
  48. package/templates/webapp/src/config/getEnvConfig.ts +4 -10
  49. package/templates/webapp/src/drizzle/db.ts +6 -21
  50. package/templates/webapp/src/startup-checks.ts +28 -7
  51. package/templates/monorepo/auth/scripts/setup-database.ts +0 -11
  52. package/templates/webapp/.github/workflows/__APP_NAME__-terraform-ryvn-release.yaml +0 -92
  53. package/templates/webapp/agent-skills/deploy.md +0 -92
  54. package/templates/webapp/deploy/ryvn/__APP_NAME__-terraform.service.yaml +0 -10
  55. package/templates/webapp/deploy/ryvn/environments/percepta-test/installations/__APP_NAME__-terraform.env.percepta-test.serviceinstallation.yaml +0 -11
  56. package/templates/webapp/deploy/ryvn/environments/percepta-test/installations/__APP_NAME__.env.percepta-test.serviceinstallation.yaml +0 -154
  57. package/templates/webapp/terraform/README.md +0 -147
  58. package/templates/webapp/terraform/deploy.sh +0 -97
  59. package/templates/webapp/terraform/main.tf +0 -101
  60. package/templates/webapp/terraform/modules/cloudtrail/main.tf +0 -27
  61. package/templates/webapp/terraform/modules/cloudtrail/outputs.tf +0 -10
  62. package/templates/webapp/terraform/modules/cloudtrail/variables.tf +0 -15
  63. package/templates/webapp/terraform/modules/networking/main.tf +0 -118
  64. package/templates/webapp/terraform/modules/networking/outputs.tf +0 -38
  65. package/templates/webapp/terraform/modules/networking/variables.tf +0 -24
  66. package/templates/webapp/terraform/modules/rds/main.tf +0 -227
  67. package/templates/webapp/terraform/modules/rds/outputs.tf +0 -73
  68. package/templates/webapp/terraform/modules/rds/variables.tf +0 -61
  69. package/templates/webapp/terraform/modules/s3-logging/main.tf +0 -148
  70. package/templates/webapp/terraform/modules/s3-logging/outputs.tf +0 -10
  71. package/templates/webapp/terraform/modules/s3-logging/variables.tf +0 -16
  72. package/templates/webapp/terraform/modules/secrets/main.tf +0 -39
  73. package/templates/webapp/terraform/modules/secrets/outputs.tf +0 -9
  74. package/templates/webapp/terraform/modules/secrets/variables.tf +0 -51
  75. package/templates/webapp/terraform/outputs.tf +0 -102
  76. package/templates/webapp/terraform/providers.tf +0 -32
  77. package/templates/webapp/terraform/schema/main.tf +0 -4
  78. package/templates/webapp/terraform/schema/outputs.tf +0 -9
  79. package/templates/webapp/terraform/schema/variables.tf +0 -19
  80. package/templates/webapp/terraform/schema/versions.tf +0 -38
  81. package/templates/webapp/terraform/terraform.tfvars.example +0 -65
  82. package/templates/webapp/terraform/variables.tf +0 -129
@@ -1,61 +0,0 @@
1
- variable "name" {
2
- description = "Base name for resources"
3
- type = string
4
- }
5
-
6
- variable "environment" {
7
- description = "Environment name (e.g. dev, staging, prod)"
8
- type = string
9
- }
10
-
11
- variable "existing_cluster_name" {
12
- description = "Name of existing RDS cluster to use (optional)"
13
- type = string
14
- default = null
15
- }
16
-
17
- variable "create_new_cluster" {
18
- description = "Whether to create a new RDS cluster if existing_cluster_name is not provided"
19
- type = bool
20
- default = true
21
- }
22
-
23
- variable "vpc_id" {
24
- description = "VPC ID where resources will be deployed"
25
- type = string
26
- }
27
-
28
- variable "subnet_ids" {
29
- description = "List of subnet IDs for RDS"
30
- type = list(string)
31
- }
32
-
33
- variable "engine_version" {
34
- description = "PostgreSQL engine version"
35
- type = string
36
- default = "16.8"
37
- }
38
-
39
- variable "port" {
40
- description = "Port for RDS"
41
- type = number
42
- default = 5432
43
- }
44
-
45
- variable "instance_class" {
46
- description = "RDS instance class"
47
- type = string
48
- default = "db.serverless"
49
- }
50
-
51
- variable "edw_allowed_principals" {
52
- description = "List of IAM principal ARNs allowed to assume the EDW secret reader role"
53
- type = list(string)
54
- default = []
55
- }
56
-
57
- variable "edw_vpc_cidr_blocks" {
58
- description = "List of CIDR blocks from EDW VPC to allow database access via VPC peering"
59
- type = list(string)
60
- default = []
61
- }
@@ -1,148 +0,0 @@
1
- data "aws_caller_identity" "current" {}
2
-
3
- resource "random_string" "suffix" {
4
- length = 8
5
- special = false
6
- upper = false
7
- }
8
-
9
- ################################################################################
10
- # S3 Bucket for Access Logs
11
- ################################################################################
12
-
13
- resource "aws_s3_bucket" "logs" {
14
- bucket = "${var.name}-logs-${random_string.suffix.result}"
15
- }
16
-
17
- resource "aws_s3_bucket_public_access_block" "logs" {
18
- bucket = aws_s3_bucket.logs.id
19
- block_public_acls = true
20
- block_public_policy = true
21
- ignore_public_acls = true
22
- restrict_public_buckets = true
23
- }
24
-
25
- resource "aws_s3_bucket_ownership_controls" "logs" {
26
- bucket = aws_s3_bucket.logs.id
27
- rule {
28
- object_ownership = "BucketOwnerPreferred"
29
- }
30
- }
31
-
32
- resource "aws_s3_bucket_versioning" "logs" {
33
- bucket = aws_s3_bucket.logs.id
34
- versioning_configuration {
35
- status = "Enabled"
36
- }
37
- }
38
-
39
- resource "aws_s3_bucket_acl" "logs" {
40
- depends_on = [aws_s3_bucket_ownership_controls.logs]
41
- bucket = aws_s3_bucket.logs.id
42
- acl = "private"
43
- }
44
-
45
- resource "aws_s3_bucket_server_side_encryption_configuration" "logs" {
46
- bucket = aws_s3_bucket.logs.id
47
-
48
- rule {
49
- apply_server_side_encryption_by_default {
50
- sse_algorithm = "AES256"
51
- }
52
- bucket_key_enabled = true
53
- }
54
- }
55
-
56
- resource "aws_s3_bucket_lifecycle_configuration" "logs" {
57
- count = var.s3_expiration_days != null ? 1 : 0
58
- bucket = aws_s3_bucket.logs.bucket
59
-
60
- rule {
61
- id = "expire-objects"
62
- status = "Enabled"
63
- filter {
64
- prefix = ""
65
- }
66
- expiration {
67
- days = var.s3_expiration_days
68
- }
69
- }
70
- }
71
-
72
- # Bucket policy to allow S3 and CloudTrail services to write logs
73
- resource "aws_s3_bucket_policy" "logs" {
74
- bucket = aws_s3_bucket.logs.bucket
75
- policy = jsonencode({
76
- Version = "2012-10-17"
77
- Statement = [
78
- {
79
- Sid = "AWSCloudTrailAclCheck"
80
- Effect = "Allow"
81
- Principal = {
82
- Service = "cloudtrail.amazonaws.com"
83
- }
84
- Action = "s3:GetBucketAcl"
85
- Resource = aws_s3_bucket.logs.arn
86
- Condition = {
87
- StringEquals = {
88
- "aws:SourceAccount" = data.aws_caller_identity.current.account_id
89
- }
90
- }
91
- },
92
- {
93
- Sid = "AWSCloudTrailWrite"
94
- Effect = "Allow"
95
- Principal = {
96
- Service = "cloudtrail.amazonaws.com"
97
- }
98
- Action = "s3:PutObject"
99
- Resource = "${aws_s3_bucket.logs.arn}/cloudtrail/*"
100
- Condition = {
101
- StringEquals = {
102
- "s3:x-amz-acl" = "bucket-owner-full-control"
103
- "aws:SourceAccount" = data.aws_caller_identity.current.account_id
104
- }
105
- }
106
- },
107
- {
108
- Sid = "AllowS3LogDeliveryAcl"
109
- Effect = "Allow"
110
- Principal = {
111
- Service = "s3.amazonaws.com"
112
- }
113
- Action = [
114
- "s3:GetBucketAcl",
115
- "s3:GetBucketLocation"
116
- ]
117
- Resource = aws_s3_bucket.logs.arn
118
- },
119
- {
120
- Sid = "AllowS3LogDeliveryPut"
121
- Effect = "Allow"
122
- Principal = {
123
- Service = "s3.amazonaws.com"
124
- }
125
- Action = "s3:PutObject"
126
- Resource = "${aws_s3_bucket.logs.arn}/*"
127
- Condition = {
128
- StringEquals = {
129
- "s3:x-amz-acl" = "bucket-owner-full-control"
130
- }
131
- }
132
- },
133
- {
134
- Sid = "DenyUnEncryptedObjectUploads"
135
- Effect = "Deny"
136
- Principal = "*"
137
- Action = "s3:*"
138
- Resource = "${aws_s3_bucket.logs.arn}/*"
139
- Condition = {
140
- Bool = {
141
- "aws:SecureTransport" = "false"
142
- }
143
- }
144
- }
145
- ]
146
- })
147
- }
148
-
@@ -1,10 +0,0 @@
1
- output "s3_bucket_name" {
2
- description = "Name of the S3 logging bucket"
3
- value = aws_s3_bucket.logs.bucket
4
- }
5
-
6
- output "s3_bucket_arn" {
7
- description = "ARN of the S3 logging bucket"
8
- value = aws_s3_bucket.logs.arn
9
- }
10
-
@@ -1,16 +0,0 @@
1
- variable "name" {
2
- description = "Base name for resources"
3
- type = string
4
- }
5
-
6
- variable "environment" {
7
- description = "Environment name (e.g. dev, staging, prod)"
8
- type = string
9
- }
10
-
11
- variable "s3_expiration_days" {
12
- description = "Number of days after which S3 objects expire (null to disable expiration)"
13
- type = number
14
- default = null
15
- }
16
-
@@ -1,39 +0,0 @@
1
- data "aws_region" "current" {}
2
-
3
- ################################################################################
4
- # Database Credentials Secret
5
- ################################################################################
6
-
7
- resource "kubernetes_secret" "database_credentials" {
8
- metadata {
9
- name = "__APP_NAME__-database-credentials"
10
- namespace = var.namespace
11
- }
12
- type = "Opaque"
13
- data = {
14
- host = var.db_host
15
- port = tostring(var.db_port)
16
- database = var.db_name
17
- username = var.db_username
18
- password = var.db_password
19
- ssl_cert = var.db_ssl_cert
20
- database_url = var.db_url
21
- }
22
- }
23
-
24
- # PostgreSQL Secret (Langfuse-style structure)
25
- resource "kubernetes_secret" "postgresql" {
26
- metadata {
27
- name = "__APP_NAME__-postgresql"
28
- namespace = var.namespace
29
- }
30
- type = "Opaque"
31
- data = {
32
- postgres-password = var.db_password
33
- database_url = "postgresql://${var.db_username}:${var.db_password}@${var.db_host}:${var.db_port}/${var.db_name}"
34
- database_name = var.db_name
35
- host = var.db_host
36
- port = tostring(var.db_port)
37
- username = var.db_username
38
- }
39
- }
@@ -1,9 +0,0 @@
1
- output "database_secret_name" {
2
- description = "Name of the Kubernetes secret containing database credentials"
3
- value = kubernetes_secret.database_credentials.metadata[0].name
4
- }
5
-
6
- output "postgresql_secret_name" {
7
- description = "Name of the Kubernetes secret containing PostgreSQL credentials (Langfuse-style)"
8
- value = kubernetes_secret.postgresql.metadata[0].name
9
- }
@@ -1,51 +0,0 @@
1
- variable "namespace" {
2
- description = "Kubernetes namespace for secrets"
3
- type = string
4
- }
5
-
6
- variable "cluster_name" {
7
- description = "EKS cluster name"
8
- type = string
9
- }
10
-
11
- ################################################################################
12
- # Database Variables
13
- ################################################################################
14
-
15
- variable "db_host" {
16
- description = "Database host"
17
- type = string
18
- }
19
-
20
- variable "db_port" {
21
- description = "Database port"
22
- type = number
23
- }
24
-
25
- variable "db_name" {
26
- description = "Database name"
27
- type = string
28
- }
29
-
30
- variable "db_username" {
31
- description = "Database username"
32
- type = string
33
- }
34
-
35
- variable "db_password" {
36
- description = "Database password"
37
- type = string
38
- sensitive = true
39
- }
40
-
41
- variable "db_ssl_cert" {
42
- description = "Database SSL certificate"
43
- type = string
44
- sensitive = true
45
- }
46
-
47
- variable "db_url" {
48
- description = "Database connection URL"
49
- type = string
50
- sensitive = true
51
- }
@@ -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
-