Skip to main content

Overview

Synapse automates the entire deployment process from code generation to live Shopify extension using GitHub, Fly.io, and Shopify CLI.

Architecture

The Pipeline Steps

1

Code Commit

Validated code is committed to your personal GitHub repository
  • Repository: user-{userId}/synapse-extensions
  • Branch: gen-{generationId}
  • Files: Complete extension with configs
2

Fly.io Trigger

GitHub push triggers Fly.io build via GitHub App integration
  • Automatic build detection
  • buildpacks builder
  • Environment variables injected
3

Container Build

Fly.io builds a container with Shopify CLI and your extension
4

Shopify Deploy

Container runs Shopify CLI to deploy extension
5

Completion

Extension is live and ready to configure in your store

GitHub Integration

Repository Structure

GitHub Actions Workflow

Every push automatically deploys:

Branch Strategy

Each generation gets its own branch:
  • gen-abc123: First generation
  • gen-def456: Second generation
  • gen-ghi789: Third generation
Benefits:
  • Easy rollback
  • Compare versions
  • Independent deployments

Fly.io Configuration

Service Setup

Fly.io automatically creates a service for each generation:

Environment Variables

Required environment variables are automatically set:

Build Process

Fly.io uses buildpacks to automatically detect and build:
Detected: package.json with React/TypeScriptBuild:
Deploy:
Detected: package.json or Cargo.tomlBuild:
Deploy:

Deployment Logs

View real-time deployment logs in the dashboard:

Monitoring

Fly.io Dashboard

Access your service in Fly.io:
  • Logs: Real-time deployment logs
  • Metrics: CPU, memory, network usage
  • Environment: Manage environment variables
  • Deployments: View deployment history
  • Settings: Configure domains, replicas

Shopify Partner Dashboard

View extensions in Partners:
  • Versions: All deployed versions
  • Status: Active, draft, or deprecated
  • Usage: Installation count
  • Analytics: Performance metrics

Troubleshooting Deployments

Cause: Dependency installation or build errorsSolutions:
  • Check Fly.io logs for error messages
  • Verify package.json dependencies
  • Ensure Node.js version compatibility
  • Review TypeScript compilation errors
Cause: Shopify CLI errors or authentication issuesSolutions:
  • Verify SHOPIFY_CLI_PARTNERS_TOKEN is valid
  • Check SHOPIFY_CLIENT_ID matches your app
  • Ensure dev store URL is correct
  • Review extension target compatibility
Cause: Extension not added to checkout editorSolutions:
  • Go to Settings → Checkout → Customize
  • Add extension from left sidebar
  • Save checkout configuration
  • Clear browser cache
Cause: Authentication or repository issuesSolutions:
  • Verify GitHub token permissions
  • Check repository exists
  • Ensure branch is not protected
  • Review GitHub Actions logs

Advanced Configuration

Custom Deployment Scripts

Override default deployment:

Multi-Environment Setup

Deploy to different environments:

Rollback Strategy

Rollback to a previous version:

Performance Metrics

Security

Encrypted Secrets

All tokens and secrets are encrypted at rest and in transit

Scoped Access

GitHub tokens have minimal required permissions

Isolated Services

Each user’s deployments run in isolated Fly.io services

Audit Logs

Complete deployment history for compliance

Next Steps

GitHub Setup

Configure GitHub repository and tokens

Fly.io Setup

Connect Fly.io and configure projects

Monitoring

Track and debug deployments

Best Practices

Optimize your deployment workflow