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
- Per-Generation Branches
- Main Branch
Each generation gets its own branch:
gen-abc123: First generationgen-def456: Second generationgen-ghi789: Third generation
- 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:| Variable | Description | Source |
|---|---|---|
SHOPIFY_CLIENT_ID | App client ID | Synapse config |
SHOPIFY_CLIENT_SECRET | App secret | Synapse config |
SHOPIFY_CLI_PARTNERS_TOKEN | Partners API token | Synapse config |
SHOPIFY_DEV_STORE_URL | Development store URL | User profile |
FLY_API_TOKEN | Fly.io project token | Auto-generated |
Build Process
Fly.io uses buildpacks to automatically detect and build:UI Extensions
UI Extensions
Detected: Deploy:
package.json with React/TypeScriptBuild:Functions
Functions
Detected: Deploy:
package.json or Cargo.tomlBuild: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
Build Failed
Build Failed
Cause: Dependency installation or build errorsSolutions:
- Check Fly.io logs for error messages
- Verify
package.jsondependencies - Ensure Node.js version compatibility
- Review TypeScript compilation errors
Deploy Failed
Deploy Failed
Cause: Shopify CLI errors or authentication issuesSolutions:
- Verify
SHOPIFY_CLI_PARTNERS_TOKENis valid - Check
SHOPIFY_CLIENT_IDmatches your app - Ensure dev store URL is correct
- Review extension target compatibility
Extension Not Visible
Extension Not Visible
Cause: Extension not added to checkout editorSolutions:
- Go to Settings → Checkout → Customize
- Add extension from left sidebar
- Save checkout configuration
- Clear browser cache
GitHub Push Failed
GitHub Push Failed
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:- Development
- Staging
- Production
Rollback Strategy
Rollback to a previous version:Performance Metrics
| Metric | Average | Best | Worst |
|---|---|---|---|
| GitHub Push | 2.1s | 0.8s | 5.2s |
| Fly.io Build | 18.3s | 12.1s | 45.7s |
| Shopify Deploy | 7.6s | 4.2s | 15.3s |
| Total Pipeline | 28.0s | 17.1s | 66.2s |
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