{
  "manifest_version": "1.0.0",
  "template": {
    "id": "5d806fa0-21d8-4a60-9e4c-5fa8cd080ce5",
    "slug": "fnd-initial-template",
    "name": "fnd-initial-template",
    "description": "Template para alunos da Fábrica de Negócios Digitais",
    "url": "https://railway.com/deploy/fnd-initial-template",
    "upstream": {
      "repo_url": "https://github.com/brabos-ai/fnd-quick-launch"
    }
  },
  "services": [
    {
      "name": "fnd-quick-launch",
      "source": {
        "repo": "https://github.com/brabos-ai/fnd-quick-launch"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        6379
      ],
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "fnd-quick-launch",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "API_PORT",
      "service": "fnd-quick-launch",
      "description": "Provide a value for API_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3001"
    },
    {
      "key": "LOG_LEVEL",
      "service": "fnd-quick-launch",
      "description": "Log Provider Configuration",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "NODE_MODE",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": false,
      "strategy": "default",
      "default": "hybrid"
    },
    {
      "key": "REDIS_URL",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "JWT_SECRET",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": true,
      "strategy": "default",
      "default": "Epgv6c9r+jz6k+S7nQgVgMtABVAfQECX7jNzerkP/T1ov8A5VYZItw068FGhjT8v"
    },
    {
      "key": "API_BASE_URL",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": false,
      "strategy": "default",
      "default": "http://localhost:3001"
    },
    {
      "key": "DATABASE_URL",
      "service": "fnd-quick-launch",
      "description": "Railway: Use Railway PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FRONTEND_URL",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": false,
      "strategy": "default",
      "default": "http://localhost:3000"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": true,
      "strategy": "default",
      "default": "14be70f6fb24932b2883c4f30951ede4e7e502d7f048aad7137695864335139e"
    },
    {
      "key": "RESEND_API_KEY",
      "service": "fnd-quick-launch",
      "description": "Provide a value for RESEND_API_KEY.",
      "secret": true,
      "strategy": "default",
      "default": "re_ZJQRYQFV_CdMxmi4y7fNWs4FmJaohJyZX"
    },
    {
      "key": "API_CORS_ORIGINS",
      "service": "fnd-quick-launch",
      "description": "Provide a value for API_CORS_ORIGINS.",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "RESEND_FROM_EMAIL",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": false,
      "strategy": "default",
      "default": "delivered@resend.dev"
    },
    {
      "key": "STRIPE_CANCEL_URL",
      "service": "fnd-quick-launch",
      "description": "Provide a value for STRIPE_CANCEL_URL.",
      "secret": false,
      "strategy": "default",
      "default": "http://localhost:3000/settings/billing?canceled=true"
    },
    {
      "key": "STRIPE_SECRET_KEY",
      "service": "fnd-quick-launch",
      "description": "Provide a value for STRIPE_SECRET_KEY.",
      "secret": true,
      "strategy": "default",
      "default": "sk_test_xxx"
    },
    {
      "key": "SUPER_ADMIN_EMAIL",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": false,
      "strategy": "default",
      "default": "harsh.lemming.guuf@protectsmail.net"
    },
    {
      "key": "STRIPE_SUCCESS_URL",
      "service": "fnd-quick-launch",
      "description": "Provide a value for STRIPE_SUCCESS_URL.",
      "secret": false,
      "strategy": "default",
      "default": "http://localhost:3000/settings/billing?success=true"
    },
    {
      "key": "STRIPE_WEBHOOK_SECRET",
      "service": "fnd-quick-launch",
      "description": "Provide a value for STRIPE_WEBHOOK_SECRET.",
      "secret": true,
      "strategy": "default",
      "default": "whsec_xxx"
    },
    {
      "key": "FEATURES_WORKSPACE_ENABLED",
      "service": "fnd-quick-launch",
      "description": "Enable workspace switching",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "FEATURES_WORKSPACE_SWITCHING_ENABLED",
      "service": "fnd-quick-launch",
      "description": "===========================================",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Redis host connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Redir port connection",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis user authentication",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Redis password authentication mapping",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Redis password authentication",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis externally",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "fnd-initial-template"
      }
    },
    "cli": "railway deploy --template fnd-initial-template",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "5d806fa0-21d8-4a60-9e4c-5fa8cd080ce5",
            "serializedConfig": {
              "services": {
                "4063022d-60fb-4c23-8e5c-fa3be83e6880": {
                  "name": "fnd-quick-launch",
                  "source": {
                    "repo": "brabos-ai/fnd-quick-launch",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "defaultValue": "${{API_PORT}}"
                    },
                    "API_PORT": {
                      "defaultValue": "3001"
                    },
                    "LOG_LEVEL": {
                      "description": "Log Provider Configuration",
                      "defaultValue": "info"
                    },
                    "NODE_MODE": {
                      "description": "===========================================",
                      "defaultValue": "hybrid"
                    },
                    "REDIS_URL": {
                      "description": "===========================================",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "JWT_SECRET": {
                      "description": "===========================================",
                      "defaultValue": "Epgv6c9r+jz6k+S7nQgVgMtABVAfQECX7jNzerkP/T1ov8A5VYZItw068FGhjT8v"
                    },
                    "API_BASE_URL": {
                      "description": "===========================================",
                      "defaultValue": "http://localhost:3001"
                    },
                    "DATABASE_URL": {
                      "description": "Railway: Use Railway PostgreSQL connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "FRONTEND_URL": {
                      "description": "===========================================",
                      "defaultValue": "http://localhost:3000"
                    },
                    "ENCRYPTION_KEY": {
                      "description": "===========================================",
                      "defaultValue": "14be70f6fb24932b2883c4f30951ede4e7e502d7f048aad7137695864335139e"
                    },
                    "RESEND_API_KEY": {
                      "defaultValue": "re_ZJQRYQFV_CdMxmi4y7fNWs4FmJaohJyZX"
                    },
                    "API_CORS_ORIGINS": {
                      "defaultValue": "*"
                    },
                    "RESEND_FROM_EMAIL": {
                      "description": "===========================================",
                      "defaultValue": "delivered@resend.dev"
                    },
                    "STRIPE_CANCEL_URL": {
                      "defaultValue": "http://localhost:3000/settings/billing?canceled=true"
                    },
                    "STRIPE_SECRET_KEY": {
                      "defaultValue": "sk_test_xxx"
                    },
                    "SUPER_ADMIN_EMAIL": {
                      "description": "===========================================",
                      "defaultValue": "harsh.lemming.guuf@protectsmail.net"
                    },
                    "STRIPE_SUCCESS_URL": {
                      "defaultValue": "http://localhost:3000/settings/billing?success=true"
                    },
                    "STRIPE_WEBHOOK_SECRET": {
                      "defaultValue": "whsec_xxx"
                    },
                    "FEATURES_WORKSPACE_ENABLED": {
                      "description": "Enable workspace switching",
                      "defaultValue": "true"
                    },
                    "FEATURES_WORKSPACE_SWITCHING_ENABLED": {
                      "description": "===========================================",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3001": {
                        "port": 3001
                      }
                    }
                  }
                },
                "633d25a8-bdfa-4c09-b701-717f9dde83c4": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\""
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Redis host connection",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redir port connection",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis user authentication",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password authentication mapping",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password authentication",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Connection string for connecting to redis externally",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    }
                  },
                  "volumeMounts": {
                    "ff8f1e6d-c23c-4164-aaaa-b1abe6de1521": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "65fdb01e-128c-4511-b54d-9e5371534a85": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "b74f3202-dedb-4773-86ec-8f2820e8b693": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-18T15:59:07.977Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_99663ca0cef54bddb046",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 166,
    "typical_build_seconds": 111,
    "typical_start_seconds": 10,
    "slowest_service": "fnd-quick-launch"
  }
}
