Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions platform/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Dependencies - will be installed inside the container
**/node_modules
**/bower_components

# Build artifacts
**/dist
**/build
**/.next
**/.cache

# Development files
**/.git
**/.gitignore
**/.env
**/.env.*

# IDE files
**/.vscode
**/.idea
**/*.swp
**/*.swo
**/.DS_Store

# Logs
**/npm-debug.log*
**/yarn-debug.log*
**/yarn-error.log*
**/lerna-debug.log*

# Testing
**/coverage
**/.nyc_output

# Temp files
**/tmp
**/temp
**/*.log
38 changes: 19 additions & 19 deletions platform/live-frame/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,21 @@
resolved "https://registry.yarnpkg.com/@plasmicapp/data-sources-context/-/data-sources-context-0.1.22.tgz#03ee66b603df6bea52ff0f4708a6cd019e57c73a"
integrity sha512-FxXHCZj/pVysamgBhbeVKP14xTfilQI+2peZixrY09gKCz+C2iVqKZCKuwhuXodFdMfCveiMSzWg8Hqz9xJRqQ==

"@plasmicapp/data-sources@0.1.188":
version "0.1.188"
resolved "https://registry.yarnpkg.com/@plasmicapp/data-sources/-/data-sources-0.1.188.tgz#5ac1613f8781deeb5c05f875b2f0118925180fab"
integrity sha512-MFynj9ZWGi99wQldotfgx5afgEcQ7MXBU7bblF2b9B5WapZtiXWR62l9JBs/VMU1yRfVkm7mZVXBBCHRAayp8A==
"@plasmicapp/data-sources@0.1.190":
version "0.1.190"
resolved "https://registry.yarnpkg.com/@plasmicapp/data-sources/-/data-sources-0.1.190.tgz#44e6b669d00367c003eb9ab0abb3025cfb2e5ce3"
integrity sha512-oivcCp+F4GS8DTDieng8qTlnUcRa7lni+GINCn6egRURwA9LV2CtMv/z7m80dNC8myuNpEi7U3x7/XIs/f9FTg==
dependencies:
"@plasmicapp/data-sources-context" "0.1.22"
"@plasmicapp/host" "1.0.224"
"@plasmicapp/host" "1.0.226"
"@plasmicapp/isomorphic-unfetch" "1.0.3"
"@plasmicapp/query" "0.1.80"
fast-stringify "^2.0.0"

"@plasmicapp/host@1.0.224":
version "1.0.224"
resolved "https://registry.yarnpkg.com/@plasmicapp/host/-/host-1.0.224.tgz#e37ac84107ca786a266dcbb495127c59e8448c75"
integrity sha512-vvyTVIPUjjfG148RyKuRYylpzpJPb0YNdlYNlaQGoxIdO3xjTGSS1v0ouI9zG80CKI3MqtYRgfoCFQ1RycbSUg==
"@plasmicapp/host@1.0.226":
version "1.0.226"
resolved "https://registry.yarnpkg.com/@plasmicapp/host/-/host-1.0.226.tgz#3807c401d2ac3c126d18973684b42db23abeba75"
integrity sha512-8tCtx2FqRaPkKREkFbwfuoVmhCmUl/BS7/7sE/xO1IlZXrKWh4qQV4t2iXQLaz4QmectkNaFm38BUjlnnpKYvA==
dependencies:
"@plasmicapp/query" "0.1.80"
csstype "^3.1.2"
Expand All @@ -139,17 +139,17 @@
dependencies:
unfetch "^4.2.0"

"@plasmicapp/loader-splits@1.0.64":
version "1.0.64"
resolved "https://registry.yarnpkg.com/@plasmicapp/loader-splits/-/loader-splits-1.0.64.tgz#07a68e66927eb97aa6814a794754c0abe7110641"
integrity sha512-PrZNSokH7aedwXtFD0tWn/P7yL+h1oDpEqKDm7zD0d0tjq6spL90I61lBU8MJlc5/dngLBrovLPyzO51EmPLqg==
"@plasmicapp/loader-splits@1.0.65":
version "1.0.65"
resolved "https://registry.yarnpkg.com/@plasmicapp/loader-splits/-/loader-splits-1.0.65.tgz#c167efe15b46c2505abdd4d13f45926c99d11e99"
integrity sha512-kU+5Ky157i9JUu5cSCp+yIohQKF2lGNr4mQcaV7SHpE7aexQ4WDIr36kyZehwh4EcFTIHHc3H2g+DzAt64AIDA==
dependencies:
json-logic-js "^2.0.2"

"@plasmicapp/nextjs-app-router@1.0.17":
version "1.0.17"
resolved "https://registry.yarnpkg.com/@plasmicapp/nextjs-app-router/-/nextjs-app-router-1.0.17.tgz#bee6242f48e83f516a44901e70a63351154d3150"
integrity sha512-aIYkQZoFunwDGo9Xf+zeJagHasVyORa41RtD17RbDvk6CSQM3rtTEwvz/xua0KZsF1DTfE8bMUP1pCRdJGQrbA==
"@plasmicapp/nextjs-app-router@1.0.18":
version "1.0.18"
resolved "https://registry.yarnpkg.com/@plasmicapp/nextjs-app-router/-/nextjs-app-router-1.0.18.tgz#86ed48fabbfc1790b4aa4b41ce95cd00500b1c1b"
integrity sha512-Rai/CrOfOzr6nmuDvNS18Rfl4Qsn2fk+vYYgNWUlcp3S76XW0RFJPBt0iDpBo+f1ysHfkI+L0P8hz+aSPUVL6w==
dependencies:
"@plasmicapp/prepass" "1.0.20"
"@plasmicapp/query" "0.1.80"
Expand Down Expand Up @@ -1684,7 +1684,7 @@ lines-and-columns@^1.1.6:
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=

loader-utils@1.4.2, loader-utils@^1.1.0:
loader-utils@^1.1.0:
version "1.4.2"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3"
integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==
Expand Down Expand Up @@ -1737,7 +1737,7 @@ minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"

minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.8:
minimist@^1.2.0, minimist@^1.2.5:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
Expand Down
1 change: 1 addition & 0 deletions platform/wab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"pegjs": "~0.10.0",
"pegjs-coffee-plugin": "~0.3.0",
"prando": "^6.0.1",
"raw-loader": "^4.0.2",
"storybook": "^7.6.20",
"sucrase": "^3.35.0",
"ts-node": "^10.9.2",
Expand Down
2 changes: 2 additions & 0 deletions platform/wab/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ export default defineConfig({
SENTRY_ORG_ID: OPTIONAL_VAR,
SENTRY_PROJECT_ID: OPTIONAL_VAR,
STRIPE_PUBLISHABLE_KEY: OPTIONAL_VAR,

REACT_APP_DEFAULT_HOST_URL: REQUIRED_VAR,
})
),
new MonacoWebpackPlugin(),
Expand Down
41 changes: 12 additions & 29 deletions platform/wab/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15580,7 +15580,7 @@ loader-utils@^1.1.0:
emojis-list "^3.0.0"
json5 "^1.0.1"

loader-utils@^2.0.2, loader-utils@^2.0.4:
loader-utils@^2.0.0, loader-utils@^2.0.2, loader-utils@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c"
integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==
Expand Down Expand Up @@ -18256,6 +18256,14 @@ raw-body@2.5.2:
iconv-lite "0.4.24"
unpipe "1.0.0"

raw-loader@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6"
integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==
dependencies:
loader-utils "^2.0.0"
schema-utils "^3.0.0"

rc-align@^4.0.0:
version "4.0.9"
resolved "https://registry.yarnpkg.com/rc-align/-/rc-align-4.0.9.tgz#46d8801c4a139ff6a65ad1674e8efceac98f85f2"
Expand Down Expand Up @@ -20961,16 +20969,7 @@ string-length@^5.0.1:
char-regex "^2.0.0"
strip-ansi "^7.0.1"

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -21020,7 +21019,7 @@ stringify-object@^3.2.1:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -21034,13 +21033,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2"
Expand Down Expand Up @@ -22709,7 +22701,7 @@ workerpool@^6.1.4:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.4.tgz#6a972b6df82e38d50248ee2820aa98e2d0ad3090"
integrity sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -22736,15 +22728,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down
40 changes: 40 additions & 0 deletions terraform/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all plan files
*.tfplan
plans/*.tfplan

# Ignore override files
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Ignore CLI configuration files
.terraformrc
terraform.rc

# Ignore log files
*.log
*tunnel.log

# Generated files
.generated/*

# Environment-specific config files (contain sensitive values)
# Copy from .tfvars.example and fill in your values
**/config/*.tfvars
**/config/*-backend.tfvars
*.tfvars.bak

# Keep example files for documentation
!**/config/*.tfvars.example
65 changes: 65 additions & 0 deletions terraform/generate-configs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash
# Generate .tfvars files from .example files using environment variables
#
# Usage:
# Local: Export variables then run ./generate-configs.sh
# CI: Variables are already exported by GitHub Actions

set -e

# Required environment variables
REQUIRED_VARS=(
"AWS_ACCOUNT_ID"
"TERRAFORM_STATE_BUCKET"
"TERRAFORM_LOCKS_TABLE"
)

# Optional variables with defaults
: "${ALB_DNS_NAME:=placeholder-alb.us-east-2.elb.amazonaws.com}"
: "${CLOUDFRONT_DISTRIBUTION_URL:=placeholder.cloudfront.net}"
: "${INTERNAL_DOMAIN:=example.com}"
: "${LOADER_ASSETS_BUCKET:=placeholder-bucket}"
: "${DB_USERNAME:=plasmicadmin}"

# Check required variables
missing=()
for var in "${REQUIRED_VARS[@]}"; do
if [ -z "${!var}" ]; then
missing+=("$var")
fi
done

if [ ${#missing[@]} -gt 0 ]; then
echo "❌ Error: Missing required environment variables:"
printf ' - %s\n' "${missing[@]}"
echo ""
echo "Example usage:"
echo " export AWS_ACCOUNT_ID=123456789012"
echo " export TERRAFORM_STATE_BUCKET=my-terraform-state"
echo " export TERRAFORM_LOCKS_TABLE=my-terraform-locks"
echo " ./generate-configs.sh"
exit 1
fi

echo "Generating config files from examples..."
echo " AWS Account: ${AWS_ACCOUNT_ID}"
echo " Region: us-east-2"
echo ""

count=0
find projects -name "*.tfvars.example" -type f | while read -r example_file; do
output_file="${example_file%.example}"

sed -e "s|<AWS_ACCOUNT_ID>|${AWS_ACCOUNT_ID}|g" \
-e "s|<TERRAFORM_STATE_BUCKET>|${TERRAFORM_STATE_BUCKET}|g" \
-e "s|<TERRAFORM_LOCKS_TABLE>|${TERRAFORM_LOCKS_TABLE}|g" \
-e "s|<ALB_DNS_NAME>|${ALB_DNS_NAME}|g" \
-e "s|<CLOUDFRONT_DISTRIBUTION_URL>|${CLOUDFRONT_DISTRIBUTION_URL}|g" \
-e "s|<INTERNAL_DOMAIN>|${INTERNAL_DOMAIN}|g" \
-e "s|<LOADER_ASSETS_BUCKET>|${LOADER_ASSETS_BUCKET}|g" \
-e "s|<DB_USERNAME>|${DB_USERNAME}|g" \
"$example_file" > "$output_file"

echo "Generated: $output_file"
count=$((count + 1))
done
58 changes: 58 additions & 0 deletions terraform/modules/backend-service/alb.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Target Group
resource "aws_lb_target_group" "service" {
name = "plasmic-${var.environment}-${var.service_name}-tg"
port = var.container_port
protocol = "HTTP"
vpc_id = var.vpc_id
target_type = "ip"

health_check {
enabled = true
healthy_threshold = 2
unhealthy_threshold = 3
timeout = 5
interval = 30
path = var.health_check_path
protocol = "HTTP"
matcher = "200"
}

deregistration_delay = 30

tags = {
Name = "plasmic-${var.environment}-${var.service_name}-tg"
}
}

# Listener Rule
resource "aws_lb_listener_rule" "service" {
listener_arn = var.alb_listener_arn
priority = var.listener_rule_priority

action {
type = "forward"
target_group_arn = aws_lb_target_group.service.arn
}

dynamic "condition" {
for_each = var.host_header != null ? [1] : []
content {
host_header {
values = [var.host_header]
}
}
}

dynamic "condition" {
for_each = var.path_pattern != null ? [1] : []
content {
path_pattern {
values = [var.path_pattern]
}
}
}

tags = {
Name = "plasmic-${var.environment}-${var.service_name}-rule"
}
}
Loading