{
  "manifest_version": "1.0.0",
  "template": {
    "id": "284cc02a-e40f-477c-a215-18f7c51af9a8",
    "slug": "sparkyfitness-fitness-tracker",
    "name": "Sparkyfitness",
    "description": "Track nutrition, workouts, water and weight on your own Railway instance",
    "url": "https://railway.com/deploy/sparkyfitness-fitness-tracker",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/sparkyfitness-railway"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "sparkyfitness",
      "source": {
        "repo": "https://github.com/gridalpha/sparkyfitness-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "sparkyfitness-server",
      "source": {
        "image": "codewithcj/sparkyfitness_server:v1.6.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "sparkyfitness",
      "description": "nginx listening port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "NGINX_RATE_LIMIT",
      "service": "sparkyfitness",
      "description": "Per-client limit on auth routes",
      "secret": false,
      "strategy": "default",
      "default": "5r/s"
    },
    {
      "key": "NGINX_WORKER_PROCESSES",
      "service": "sparkyfitness",
      "description": "nginx worker count",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "sparkyfitness",
      "description": "Dockerfile location in the repo",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile"
    },
    {
      "key": "SPARKY_FITNESS_SERVER_HOST",
      "service": "sparkyfitness",
      "description": "Private API hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SPARKY_FITNESS_SERVER_PORT",
      "service": "sparkyfitness",
      "description": "API port to proxy to",
      "secret": false,
      "strategy": "default",
      "default": "3010"
    },
    {
      "key": "SPARKY_FITNESS_FRONTEND_URL",
      "service": "sparkyfitness",
      "description": "Public origin for CORS headers",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TZ",
      "service": "sparkyfitness-server",
      "description": "Server timezone",
      "secret": false,
      "strategy": "default",
      "default": "Etc/UTC"
    },
    {
      "key": "PORT",
      "service": "sparkyfitness-server",
      "description": "Health-check port selector",
      "secret": false,
      "strategy": "default",
      "default": "3010"
    },
    {
      "key": "NODE_ENV",
      "service": "sparkyfitness-server",
      "description": "Node runtime mode",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "sparkyfitness-server",
      "description": "Signs sessions, encrypts TOTP secrets",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SPARKY_FITNESS_DB_HOST",
      "service": "sparkyfitness-server",
      "description": "Private Postgres hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SPARKY_FITNESS_DB_NAME",
      "service": "sparkyfitness-server",
      "description": "Application database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SPARKY_FITNESS_DB_PORT",
      "service": "sparkyfitness-server",
      "description": "Postgres port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SPARKY_FITNESS_DB_USER",
      "service": "sparkyfitness-server",
      "description": "Owner account used for migrations",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOW_PRIVATE_NETWORK_AI",
      "service": "sparkyfitness-server",
      "description": "Block non-admin AI URLs to internal hosts",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "SPARKY_FITNESS_LOG_LEVEL",
      "service": "sparkyfitness-server",
      "description": "Server log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "ALLOW_PRIVATE_NETWORK_CORS",
      "service": "sparkyfitness-server",
      "description": "Reject private-network browser origins",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "SPARKY_FITNESS_ADMIN_EMAIL",
      "service": "sparkyfitness-server",
      "description": "Sign up with this email to be admin",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SPARKY_FITNESS_APP_DB_USER",
      "service": "sparkyfitness-server",
      "description": "Least-privilege role created at boot",
      "secret": false,
      "strategy": "default",
      "default": "sparky_app"
    },
    {
      "key": "SPARKY_FITNESS_DB_PASSWORD",
      "service": "sparkyfitness-server",
      "description": "Owner account password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SPARKY_FITNESS_SERVER_PORT",
      "service": "sparkyfitness-server",
      "description": "API listening port",
      "secret": false,
      "strategy": "default",
      "default": "3010"
    },
    {
      "key": "SPARKY_FITNESS_FRONTEND_URL",
      "service": "sparkyfitness-server",
      "description": "Public URL for CORS and auth",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SPARKY_FITNESS_DISABLE_SIGNUP",
      "service": "sparkyfitness-server",
      "description": "Set true once your accounts exist",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "SPARKY_FITNESS_APP_DB_PASSWORD",
      "service": "sparkyfitness-server",
      "description": "Password for that role",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SPARKY_FITNESS_PUBLIC_API_DOCS",
      "service": "sparkyfitness-server",
      "description": "Keep Swagger behind authentication",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "SPARKY_FITNESS_FORCE_EMAIL_LOGIN",
      "service": "sparkyfitness-server",
      "description": "Lock-out fail-safe if OIDC misconfigured",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SPARKY_FITNESS_API_ENCRYPTION_KEY",
      "service": "sparkyfitness-server",
      "description": "Encrypts stored provider credentials",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SPARKY_FITNESS_CUSTOM_BACKUP_DIRECTORY",
      "service": "sparkyfitness-server",
      "description": "Backup dump path on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/backup"
    },
    {
      "key": "SPARKY_FITNESS_CUSTOM_UPLOADS_DIRECTORY",
      "service": "sparkyfitness-server",
      "description": "Image storage path on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/uploads"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "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": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "sparkyfitness-fitness-tracker"
      }
    },
    "cli": "railway deploy --template sparkyfitness-fitness-tracker",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "284cc02a-e40f-477c-a215-18f7c51af9a8",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "38610665-5ebc-43c8-b256-987f3e865b23": {
                  "icon": "https://raw.githubusercontent.com/CodeWithCJ/SparkyFitness/main/SparkyFitnessFrontend/public/images/icons/icon-512x512.png",
                  "name": "sparkyfitness",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/sparkyfitness-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "nginx listening port",
                      "defaultValue": "8080"
                    },
                    "NGINX_RATE_LIMIT": {
                      "isOptional": false,
                      "description": "Per-client limit on auth routes",
                      "defaultValue": "5r/s"
                    },
                    "NGINX_WORKER_PROCESSES": {
                      "isOptional": false,
                      "description": "nginx worker count",
                      "defaultValue": "2"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile location in the repo",
                      "defaultValue": "Dockerfile"
                    },
                    "SPARKY_FITNESS_SERVER_HOST": {
                      "isOptional": false,
                      "description": "Private API hostname",
                      "defaultValue": "${{sparkyfitness-server.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "SPARKY_FITNESS_SERVER_PORT": {
                      "isOptional": false,
                      "description": "API port to proxy to",
                      "defaultValue": "3010"
                    },
                    "SPARKY_FITNESS_FRONTEND_URL": {
                      "isOptional": false,
                      "description": "Public origin for CORS headers",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "aee1551f-4d9e-45ec-ba22-2f66d17d2090": {
                  "icon": "https://raw.githubusercontent.com/CodeWithCJ/SparkyFitness/main/SparkyFitnessFrontend/public/images/icons/icon-512x512.png",
                  "name": "sparkyfitness-server",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'mkdir -p \"$SPARKY_FITNESS_CUSTOM_UPLOADS_DIRECTORY\" \"$SPARKY_FITNESS_CUSTOM_BACKUP_DIRECTORY\"; exec ./node_modules/.bin/tsx index.ts'",
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "codewithcj/sparkyfitness_server:v1.6.2"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Server timezone",
                      "defaultValue": "Etc/UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Health-check port selector",
                      "defaultValue": "3010"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Node runtime mode",
                      "defaultValue": "production"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Signs sessions, encrypts TOTP secrets",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "SPARKY_FITNESS_DB_HOST": {
                      "isOptional": false,
                      "description": "Private Postgres hostname",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "SPARKY_FITNESS_DB_NAME": {
                      "isOptional": false,
                      "description": "Application database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "SPARKY_FITNESS_DB_PORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "SPARKY_FITNESS_DB_USER": {
                      "isOptional": false,
                      "description": "Owner account used for migrations",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "ALLOW_PRIVATE_NETWORK_AI": {
                      "isOptional": false,
                      "description": "Block non-admin AI URLs to internal hosts",
                      "defaultValue": "false"
                    },
                    "SPARKY_FITNESS_LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Server log verbosity",
                      "defaultValue": "INFO"
                    },
                    "ALLOW_PRIVATE_NETWORK_CORS": {
                      "isOptional": false,
                      "description": "Reject private-network browser origins",
                      "defaultValue": "false"
                    },
                    "SPARKY_FITNESS_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Sign up with this email to be admin",
                      "defaultValue": "{{SPARKY_FITNESS_ADMIN_EMAIL}}"
                    },
                    "SPARKY_FITNESS_APP_DB_USER": {
                      "isOptional": false,
                      "description": "Least-privilege role created at boot",
                      "defaultValue": "sparky_app"
                    },
                    "SPARKY_FITNESS_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Owner account password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "SPARKY_FITNESS_SERVER_PORT": {
                      "isOptional": false,
                      "description": "API listening port",
                      "defaultValue": "3010"
                    },
                    "SPARKY_FITNESS_FRONTEND_URL": {
                      "isOptional": false,
                      "description": "Public URL for CORS and auth",
                      "defaultValue": "https://${{sparkyfitness.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SPARKY_FITNESS_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Set true once your accounts exist",
                      "defaultValue": "false"
                    },
                    "SPARKY_FITNESS_APP_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for that role",
                      "defaultValue": "{{SPARKY_FITNESS_APP_DB_PASSWORD}}"
                    },
                    "SPARKY_FITNESS_PUBLIC_API_DOCS": {
                      "isOptional": false,
                      "description": "Keep Swagger behind authentication",
                      "defaultValue": "false"
                    },
                    "SPARKY_FITNESS_FORCE_EMAIL_LOGIN": {
                      "isOptional": false,
                      "description": "Lock-out fail-safe if OIDC misconfigured",
                      "defaultValue": "true"
                    },
                    "SPARKY_FITNESS_API_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts stored provider credentials",
                      "defaultValue": "{{SPARKY_FITNESS_API_ENCRYPTION_KEY}}"
                    },
                    "SPARKY_FITNESS_CUSTOM_BACKUP_DIRECTORY": {
                      "isOptional": false,
                      "description": "Backup dump path on the volume",
                      "defaultValue": "/data/backup"
                    },
                    "SPARKY_FITNESS_CUSTOM_UPLOADS_DIRECTORY": {
                      "isOptional": false,
                      "description": "Image storage path on the volume",
                      "defaultValue": "/data/uploads"
                    }
                  },
                  "volumeMounts": {
                    "aee1551f-4d9e-45ec-ba22-2f66d17d2090": {
                      "mountPath": "/data"
                    }
                  }
                },
                "e9d45288-f0e8-4c75-a255-c2ec1c7340d5": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "e9d45288-f0e8-4c75-a255-c2ec1c7340d5": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0"
}
