Getting Started โ
Set up the Gang Sheet Builder end-to-end โ from a Shopify product to live orders โ in about 30 minutes.
How It Works โ
The Gang Sheet Builder is a self-hosted web app that sits outside Shopify but integrates tightly with your store:
Customer on your Shopify product page
โ Selects a sheet size (variant)
โ Clicks "Create Gang Sheet"
โ Builder opens in a new tab (your deployed URL)
โ Customer uploads images, arranges layout
โ Clicks "Save & Add to Cart"
โ File uploads to your backend
โ Customer is redirected to Shopify cart
โ Customer checks out
โ Shopify webhook fires โ you receive email with download link
โ You download and print the gang sheetThere are two components you need to host:
| Component | What it is | Hosting |
|---|---|---|
| Frontend | The React builder app customers use | Netlify, Vercel, or your own server |
| Backend | Node.js API for file storage, order tracking, and email | Railway, Render, or your own server |
Step 1 โ Deploy the Backend โ
The backend handles file uploads, download link generation, order management, and email notifications.
1a. Environment Variables โ
Copy .env.example to .env in gang-sheet-backend/ and fill in:
PORT=5000
BASE_URL=https://your-backend-url.com
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-gmail-app-password
OWNER_EMAIL=you@yourdomain.comGmail App Password
Go to Google Account โ Security โ 2-Step Verification โ App passwords and generate a password for "Mail". Use that as EMAIL_PASS โ not your regular Gmail password.
1b. Deploy to Railway (Recommended) โ
- Push the
gang-sheet-backendfolder to a GitHub repository. - Go to railway.app and create a new project from that repo.
- Add your environment variables under Variables.
- Railway will auto-deploy. Note your deployment URL (e.g.
https://gang-sheet-backend-production.up.railway.app).
1c. Verify the Backend โ
Visit https://your-backend-url.com/health โ it should return {"status":"ok"}.
The admin dashboard is at https://your-backend-url.com/admin.
Step 2 โ Deploy the Frontend โ
The frontend is the builder app customers interact with.
2a. Configure the Backend URL โ
In gang-sheet-frontend-shopify/, create a .env file:
VITE_API_URL=https://your-backend-url.com2b. Build โ
cd gang-sheet-frontend-shopify
npm install
npm run build2c. Deploy to Netlify โ
- Go to netlify.com and sign in.
- Click Add new site โ Deploy manually.
- Drag the
dist/folder onto the upload area. - Get your URL:
https://your-site-name.netlify.app.
Alternatively, deploy to Vercel or upload the dist/ folder to any static hosting.
Step 3 โ Create the Shopify Product โ
- In Shopify admin, go to Products โ Add product.
- Set the title (e.g.
Custom DTF Gang Sheet). - Under Variants, add one variant per sheet size you offer. Name the option Size:
| Option Value | Price (example) | SKU |
|---|---|---|
| 22" ร 24" | $20.00 | GS-22x24 |
| 22" ร 36" | $30.00 | GS-22x36 |
| 22" ร 48" | $40.00 | GS-22x48 |
| 22" ร 60" | $50.00 | GS-22x60 |
| 22" ร 72" | $60.00 | GS-22x72 |
- Set Track inventory to No (it's made to order).
- Click Save and note each variant's ID.
Variant IDs
You can find variant IDs in the URL when you click a variant in the admin, or via the Shopify Admin API. They're needed to wire up the builder button.
Step 4 โ Add the "Create Gang Sheet" Button to Your Theme โ
Method A: Theme Editor (Recommended) โ
- Go to Online Store โ Themes โ Customize.
- Navigate to the Product page template.
- Add a Custom Liquid block.
- Paste the following, replacing
YOUR_BUILDER_URLwith your Netlify URL:
{% if product.handle == 'custom-dtf-gang-sheet' %}
<div style="margin: 20px 0;">
<button
onclick="openGangSheetBuilder()"
style="background:#16a34a;color:white;padding:14px 28px;font-size:17px;font-weight:bold;border:none;border-radius:8px;cursor:pointer;width:100%;"
>
๐จ Create Your Gang Sheet
</button>
</div>
<script>
function openGangSheetBuilder() {
const variantId = document.querySelector('input[name="id"]')?.value;
const selectedOption = document.querySelector('.product-form__input--variant option:checked');
const size = selectedOption?.text.trim();
if (!size) { alert('Please select a size first'); return; }
const sizeFormatted = size.replace(/["'\s]/g, '').toLowerCase();
const builderUrl = `YOUR_BUILDER_URL?variant=${variantId}&size=${sizeFormatted}&shop={{ shop.permanent_domain }}`;
window.open(builderUrl, '_blank');
}
</script>
{% endif %}- Replace
YOUR_BUILDER_URLwith your deployed frontend URL. - Click Save.
Method B: Edit Theme Code (Advanced) โ
Edit sections/main-product.liquid directly and add the button code after the product form.
Step 5 โ Configure Shopify Webhooks โ
Webhooks notify your backend when an order is placed so it can send you the download email.
- Go to Shopify Admin โ Settings โ Notifications โ Webhooks.
- Click Create webhook.
- Set:
- Event: Order creation
- Format: JSON
- URL:
https://your-backend-url.com/api/shopify/webhook/order-created
- Click Save.
Step 6 โ Test the Full Flow โ
- Visit your product page.
- Select a size variant.
- Click Create Gang Sheet.
- In the builder, upload a test image and arrange it.
- Click Save & Add to Cart.
- Go to cart โ confirm the item is there with the gang sheet file URL in the line item properties.
- Place a test order (Shopify test mode).
- Check your email for the order notification and download link.
- Click the download link and confirm the file is a high-resolution PNG.
Builder outside Shopify
If you open the builder URL directly (not from the product page), "Save & Add to Cart" will upload the file but the cart redirect will fail โ this is expected. Always test from the product page.
