modules = ["nodejs-24", "python-3.11", "postgresql-16"]

[deployment]
router = "application"
deploymentTarget = "autoscale"

[deployment.postBuild]
args = ["pnpm", "store", "prune"]
env = { "CI" = "true" }

[workflows]
runButton = "Project"

[[workflows.workflow]]
name = "Project"
mode = "parallel"
author = "agent"

[[workflows.workflow.tasks]]
task = "workflow.run"
args = "Start application"

[[workflows.workflow.tasks]]
task = "workflow.run"
args = "API"

[[workflows.workflow]]
name = "Start application"
author = "agent"

[[workflows.workflow.tasks]]
task = "shell.exec"
args = "PORT=5000 BASE_PATH=/ VITE_API_PROXY_TARGET=http://localhost:8080 pnpm --filter @workspace/tx-os run dev"
waitForPort = 5000

[workflows.workflow.metadata]
outputType = "webview"

[[workflows.workflow]]
name = "API"
author = "agent"

[[workflows.workflow.tasks]]
task = "shell.exec"
args = "PORT=8080 pnpm --filter @workspace/api-server run dev"
waitForPort = 8080

[workflows.workflow.metadata]
outputType = "console"

[agent]
stack = "PNPM_WORKSPACE"
expertMode = true

[postMerge]
path = "scripts/post-merge.sh"
timeoutMs = 120000

[[ports]]
localPort = 5000
externalPort = 4200

[[ports]]
localPort = 5001
externalPort = 3001

[[ports]]
localPort = 5002
externalPort = 6800

[[ports]]
localPort = 8080
externalPort = 8080

[[ports]]
localPort = 8081
externalPort = 80

[[ports]]
localPort = 8082
externalPort = 3003

[[ports]]
localPort = 8083
externalPort = 5173

[[ports]]
localPort = 25785
externalPort = 3000

[[ports]]
localPort = 25786
externalPort = 3002

[[ports]]
localPort = 25787
externalPort = 5000

[nix]
channel = "stable-25_05"
