{
  "manifest_version": "1.0.0",
  "template": {
    "id": "87850803-33c8-4851-9656-e59c0d83982f",
    "slug": "fullstack-fast-api",
    "name": "Fullstack FastAPI",
    "description": "Fullstack FastAPI template optimized for Railway",
    "url": "https://railway.com/deploy/fullstack-fast-api",
    "upstream": {
      "repo_url": "https://github.com/smolpaw/railway-fullstack-fast-api"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "backend",
      "source": {
        "repo": "https://github.com/smolpaw/railway-fullstack-fast-api"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "frontend",
      "source": {
        "repo": "https://github.com/smolpaw/railway-fullstack-fast-api"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "adminer",
      "source": {
        "image": "adminer"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17.6"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "backend",
      "description": "Port to connect to backend",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "DOMAIN",
      "service": "backend",
      "description": "Public domain of backend",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SECRET_KEY",
      "service": "backend",
      "description": "Secret key used by backend",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SENTRY_DSN",
      "service": "backend",
      "description": "Sentry DSN key",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENVIRONMENT",
      "service": "backend",
      "description": "Project environment name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "backend",
      "description": "Postgres DB name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PROJECT_NAME",
      "service": "backend",
      "description": "Project Name",
      "secret": false,
      "strategy": "default",
      "default": "Railway Full Stack FastAPI"
    },
    {
      "key": "FRONTEND_HOST",
      "service": "backend",
      "description": "Public domain of frontend",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "backend",
      "description": "Postgres DB PORT",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "backend",
      "description": "Postgres user/username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FIRST_SUPERUSER",
      "service": "backend",
      "description": "Admin email address",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "POSTGRES_SERVER",
      "service": "backend",
      "description": "Private endpoint of Postgres server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "EMAILS_FROM_EMAIL",
      "service": "backend",
      "description": "From Email for SMTP. Contact your provider",
      "secret": false,
      "strategy": "default",
      "default": "noreply@example.com"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "backend",
      "description": "Password of your DB",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BACKEND_CORS_ORIGINS",
      "service": "backend",
      "description": "CORS origins for your application",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "FIRST_SUPERUSER_PASSWORD",
      "service": "backend",
      "description": "Admin account password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "frontend",
      "description": "Port at which frontend will get served",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "NODE_ENV",
      "service": "frontend",
      "description": "Project environment name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VITE_API_URL",
      "service": "frontend",
      "description": "Backend public domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "adminer",
      "description": "Port at which service will get served",
      "secret": false,
      "strategy": "default",
      "default": "1080"
    },
    {
      "key": "ADMINER_DESIGN",
      "service": "adminer",
      "description": "Provide a value for ADMINER_DESIGN.",
      "secret": false,
      "strategy": "default",
      "default": "pepa-linha-dark"
    },
    {
      "key": "ADMINER_DEFAULT_SERVER",
      "service": "adminer",
      "description": "Default server to be auto filled in the web app",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "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": "fullstack-fast-api"
      }
    },
    "cli": "railway deploy --template fullstack-fast-api",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "87850803-33c8-4851-9656-e59c0d83982f",
            "serializedConfig": {
              "services": {
                "16d19a95-848c-4729-a7b1-e1f0919ad841": {
                  "icon": "https://raw.githubusercontent.com/smolpaw/railway-fullstack-fast-api/refs/heads/master/backend/fastapi.png",
                  "name": "backend",
                  "deploy": {
                    "startCommand": "",
                    "healthcheckPath": "/api/v1/utils/health-check/",
                    "preDeployCommand": [
                      "bash scripts/prestart.sh"
                    ]
                  },
                  "source": {
                    "repo": "https://github.com/smolpaw/railway-fullstack-fast-api",
                    "rootDirectory": "/backend"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port to connect to backend",
                      "defaultValue": "8000"
                    },
                    "DOMAIN": {
                      "isOptional": false,
                      "description": "Public domain of backend",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SMTP_TLS": {
                      "isOptional": true,
                      "description": "Check your SMTP provider",
                      "defaultValue": ""
                    },
                    "SMTP_HOST": {
                      "isOptional": true,
                      "description": "Check your SMTP provider",
                      "defaultValue": ""
                    },
                    "SMTP_PORT": {
                      "isOptional": true,
                      "description": "Check your SMTP provider",
                      "defaultValue": ""
                    },
                    "SMTP_USER": {
                      "isOptional": true,
                      "description": "Check your SMTP provider",
                      "defaultValue": ""
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "Secret key used by backend",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "SENTRY_DSN": {
                      "isOptional": true,
                      "description": "Sentry DSN key",
                      "defaultValue": "${{shared.SENTRY_DSN}}"
                    },
                    "ENVIRONMENT": {
                      "isOptional": false,
                      "description": "Project environment name",
                      "defaultValue": "${{RAILWAY_ENVIRONMENT_NAME}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Postgres DB name",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "PROJECT_NAME": {
                      "isOptional": false,
                      "description": "Project Name",
                      "defaultValue": "Railway Full Stack FastAPI"
                    },
                    "FRONTEND_HOST": {
                      "isOptional": false,
                      "description": "Public domain of frontend",
                      "defaultValue": "https://${{frontend.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Postgres DB PORT",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres user/username",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "SMTP_PASSWORD": {
                      "isOptional": true,
                      "description": "Check your SMTP provider",
                      "defaultValue": ""
                    },
                    "FIRST_SUPERUSER": {
                      "isOptional": true,
                      "description": "Admin email address",
                      "defaultValue": "admin@example.com"
                    },
                    "POSTGRES_SERVER": {
                      "isOptional": false,
                      "description": "Private endpoint of Postgres server",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "EMAILS_FROM_EMAIL": {
                      "isOptional": false,
                      "description": "From Email for SMTP. Contact your provider",
                      "defaultValue": "noreply@example.com"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of your DB",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "BACKEND_CORS_ORIGINS": {
                      "isOptional": false,
                      "description": "CORS origins for your application",
                      "defaultValue": "http://${{frontend.RAILWAY_PRIVATE_DOMAIN}}:${{frontend.PORT}},http://${{frontend.RAILWAY_PRIVATE_DOMAIN}},https://${{frontend.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "FIRST_SUPERUSER_PASSWORD": {
                      "isOptional": false,
                      "description": "Admin account password",
                      "defaultValue": "{{FIRST_SUPERUSER_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "2c79c7bc-76e0-4653-88b6-a835f790f17a": {
                  "icon": "https://devicons.railway.com/i/vitejs.svg",
                  "name": "frontend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "repo": "https://github.com/smolpaw/railway-fullstack-fast-api",
                    "rootDirectory": "/frontend"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port at which frontend will get served",
                      "defaultValue": "80"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Project environment name",
                      "defaultValue": "${{RAILWAY_ENVIRONMENT_NAME}}"
                    },
                    "VITE_API_URL": {
                      "isOptional": false,
                      "description": "Backend public domain",
                      "defaultValue": "https://${{backend.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "7d775132-08b2-47ef-a7ed-35846262cd1b": {
                  "icon": "https://raw.githubusercontent.com/smolpaw/railway-fullstack-fast-api/refs/heads/master/adminer/icon.png",
                  "name": "adminer",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "adminer"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port at which service will get served",
                      "defaultValue": "1080"
                    },
                    "ADMINER_DESIGN": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "pepa-linha-dark"
                    },
                    "ADMINER_DEFAULT_SERVER": {
                      "isOptional": false,
                      "description": "Default server to be auto filled in the web app",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:${{Postgres.PGPORT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "b6587f8b-893d-4344-a104-daffc221a419": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17.6"
                  },
                  "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": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "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": {}
                    }
                  },
                  "volumeMounts": {
                    "b6587f8b-893d-4344-a104-daffc221a419": {
                      "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": {
    "healthcheck": {
      "service": "backend",
      "method": "GET",
      "path": "/api/v1/utils/health-check/",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-09T00:02:40.379Z",
  "generator_version": "0.1.0"
}
