Cloud Hosting

Deploy PiggyBack to the cloud using Vercel and Supabase. Free tier, zero maintenance.

Deploy PiggyBack using Vercel (free) and Supabase (free tier). This is the quickest way to get up and running.

What You'll Need

An Up Bank account

You'll need a personal access token from the Up API developer portal

A GitHub account

To fork the repository and connect to Vercel

A Supabase account (free)

Sign up at supabase.com — free tier is sufficient

A Vercel account (free)

Sign up at vercel.com — Hobby plan works, connect with GitHub

1

Set Up Supabase

Create a New Project

  1. Go to supabase.com and sign in
  2. Click "New Project"
  3. Choose your organization, name it (e.g. "piggyback"), set a database password, and choose a region close to you
  4. Wait for the project to initialize (~2 minutes)

Run the Database Migration

  1. In your Supabase dashboard, go to SQL Editor
  2. Click "New query"
  3. Copy the entire contents of supabase/migrations/00000000000000_initial_schema.sql
  4. Paste it into the SQL Editor and click "Run"
  5. This creates all 35+ tables, functions, triggers, and Row Level Security policies in one go
Already familiar with Supabase CLI? You can also run supabase db push against your remote project instead of using the SQL Editor.

Configure Authentication

  1. Go to Authentication URL Configuration
  2. Set Site URL to your Vercel URL (you'll get this in Step 2 — you can come back to update it)
  3. Under Redirect URLs, add:
    • https://your-app.vercel.app/auth/callback
    • https://your-app.vercel.app/update-password
Why this matters: Supabase sends users to these URLs after email confirmation and password resets. If they're not configured, authentication will break.

Get Your API Keys

  1. Go to SettingsAPI
  2. Copy these three values — you'll need them in Step 2:
    • Project URL (starts with https://...supabase.co)
    • anon/public key
    • service_role key (click "Reveal" — keep this secret!)
2

Deploy to Vercel

One-Click Deploy

The fastest option — click the button and Vercel will fork the repo and set up the project for you:

Deploy with Vercel

Manual Deploy

If you prefer to fork the repo yourself:

  1. Fork this repository on GitHub
  2. Go to vercel.com/new
  3. Import your forked repository
  4. Vercel will auto-detect Next.js — no build settings need to change

Set Environment Variables

In your Vercel project, go to Settings Environment Variables and add:

VariableRequiredDescription
NEXT_PUBLIC_SUPABASE_URLYesYour Supabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEYYesYour Supabase anon key
SUPABASE_SERVICE_ROLE_KEYYesYour Supabase service role key
UP_API_ENCRYPTION_KEYYesA 32-character hex string (see below)
NEXT_PUBLIC_APP_URLYesYour Vercel deployment URL
CRON_SECRETRecommendedA random secret for cron auth
NEXT_PUBLIC_SKIP_LANDINGOptionalSet to 'true' to skip marketing page

Generate Your Keys

terminal
# Generate encryption key (exactly 32 characters)
node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"

# Generate cron secret
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Update Supabase Auth URLs

Now that you have your Vercel URL (e.g. https://piggyback-abc123.vercel.app):

  1. Go back to Supabase Authentication URL Configuration
  2. Set Site URL to your Vercel URL
  3. Update the Redirect URLs with your actual Vercel URL:
    • https://piggyback-abc123.vercel.app/auth/callback
    • https://piggyback-abc123.vercel.app/update-password

Redeploy

After setting environment variables, trigger a redeployment from the Vercel dashboard to pick up your new values.

3

First-Time Setup

  1. Visit your deployed app
  2. Click Sign Up and create your account
  3. Check your email for the confirmation link and click it (check spam if you don't see it)
  4. Complete the onboarding flow
  5. Connect your Up Bank API token in Settings Up Bank Connection
Get your Up Bank API token from api.up.com.au

Optional Configuration

Change Region

The default Vercel region is syd1 (Sydney). Edit vercel.json to change it:

RegionCode
Sydney, Australiasyd1
US East (Virginia)iad1
US West (Oregon)pdx1
London, UKlhr1
Frankfurt, Germanyfra1
Tokyo, Japanhnd1

Enable Cron Jobs

PiggyBack has a daily cron job for payment reminders and AI-generated weekly summaries. Set the CRON_SECRET environment variable in Vercel. The cron is already configured in vercel.json to run daily at 9am UTC.

AI Assistant

No server-side API keys needed — each user configures their own in SettingsAI:

  • Google Gemini — free tier available
  • OpenAI — requires paid API access
  • Anthropic — requires paid API access

API keys are encrypted and stored per-user. They never leave the server except to call the provider's API.

Up Bank Webhook (Real-Time Sync)

Configured automatically when you connect your Up Bank account in the app — no manual setup required. The webhook endpoint is /api/upbank/webhook on your deployed URL.

Custom Domain

  1. In Vercel, go to Settings Domains
  2. Add your custom domain and follow the DNS instructions
  3. Update Supabase Site URL and Redirect URLs with your new domain
  4. Update NEXT_PUBLIC_APP_URL in Vercel and redeploy

Troubleshooting

"Invalid login credentials" after signup

You need to confirm your email first. Check your inbox (and spam folder) for the confirmation link from Supabase.

Auth redirect goes to the wrong URL

Make sure your Supabase Site URL and Redirect URLs match your actual deployment URL exactly. The app has a safety net that catches misrouted auth codes, but correct configuration prevents the issue entirely.

Build fails on Vercel

Ensure all required environment variables are set. Check that NEXT_PUBLIC_SUPABASE_URL starts with https:// and UP_API_ENCRYPTION_KEY is exactly 32 characters.

Webhook not syncing transactions

Verify NEXT_PUBLIC_APP_URL is set to your deployment URL (including https://). The webhook URL must be publicly accessible. Try disconnecting and reconnecting your Up Bank account.

Cron job not running

Verify CRON_SECRET is set. The cron runs daily at 9am UTC. Cron jobs only run on production deployments (not preview deployments).

Database migration fails

Make sure you copy the entire migration file (~1,400 lines). Run it in a single query. If you get extension errors, enable uuid-ossp and pgcrypto manually in Database > Extensions.