Complete step-by-step guide to deploy the Multisig Registry Dashboard to Vercel with PostgreSQL database.
- GitHub account
- Vercel account (sign up at vercel.com)
- Vercel CLI (optional, for local testing)
-
Push your code to GitHub:
git add . git commit -m "Prepare for Vercel deployment" git push origin main
-
Verify these files are committed:
data/wallets.json- Your wallet datadata/signers.json- Your signer dataprisma/schema.prisma- Database schemaprisma/migrations/- Database migrationspackage.json- Dependenciesvercel.json- Vercel configuration
-
Go to vercel.com and sign in
-
Click "Add New..." → "Project"
-
Import your GitHub repository:
- Select your repository
- Click "Import"
-
Configure Project Settings:
- Framework Preset: Next.js (auto-detected)
- Root Directory:
./(default) - Build Command:
npm run build(default) - Output Directory:
.next(default) - Install Command:
npm install(default)
-
Click "Deploy" (we'll add environment variables next)
-
In your Vercel project dashboard:
- Go to Storage tab
- Click "Create Database"
- Select "Postgres"
-
Configure Database:
- Name:
multisig-registry(or your preferred name) - Region: Choose closest to your users
- Click "Create"
- Name:
-
Wait for database to be created (takes ~1-2 minutes)
-
In your Vercel project dashboard:
- Go to Settings → Environment Variables
-
Add the following variables:
a. Database URLs (automatically added by Vercel Postgres):
DATABASE_URL- Already added automatically ✅PRISMA_DATABASE_URL- Already added automatically ✅
b. Session Secret:
- Key:
SESSION_SECRET - Value: Generate with:
openssl rand -hex 32 - Environment: Production, Preview, Development (all)
c. Safe API Key (optional but recommended):
- Key:
SAFE_API_KEY - Value: Your Safe Transaction Service API key
- Environment: Production, Preview, Development (all)
d. Admin Credentials (optional - for custom admin):
-
Key:
ADMIN_USERNAME -
Value:
******(or your preferred username) -
Environment: Production only
-
Key:
ADMIN_PASSWORD -
Value:
******(or your preferred password) -
Environment: Production only
-
Click "Save" for each variable
-
Trigger a new deployment:
- Go to Deployments tab
- Click "Redeploy" on the latest deployment
- Or push a new commit to trigger automatic deployment
-
Monitor the build:
- Watch the build logs
- The build process will:
- Install dependencies
- Generate Prisma client
- Build Next.js application
- Run database migrations (postbuild)
- Create admin user (postbuild)
- Import data from JSON files (postbuild)
-
Wait for deployment to complete (~2-3 minutes)
-
Check deployment status:
- Deployment should show "Ready" status
- Click on the deployment to see the live URL
-
Test the application:
- Visit your deployment URL (e.g.,
https://your-project.vercel.app) - You should see the Multisig Wallets dashboard
- Navigate to
/signersto see the Signers Directory - Try logging in with admin credentials
- Visit your deployment URL (e.g.,
-
Verify data:
- Check that wallets from
wallets.jsonare displayed - Check that signers from
signers.jsonare displayed - Verify no "Unknown" entries appear
- Check that wallets from
-
In Vercel dashboard:
- Go to Storage → Your Postgres database
- Click "Data" tab
- Verify tables exist:
wallets,signers,signer_addresses,users
-
Check data:
- Verify wallets are imported
- Verify signers are imported
- Verify admin user exists
- In Vercel dashboard:
- Go to Deployments → Latest deployment
- Click "Build Logs"
- Look for:
- ✅ "Migrations completed successfully"
- ✅ "Admin user created/updated"
- ✅ "Data import completed successfully"
Solution:
- Verify
DATABASE_URLis set in Environment Variables - Make sure it's set for the correct environment (Production/Preview/Development)
- Redeploy after adding the variable
Solution:
- Check that migrations ran successfully in build logs
- Manually run migrations:
# Using Vercel CLI vercel env pull .env.production DATABASE_URL="$(grep PRISMA_DATABASE_URL .env.production | cut -d '=' -f2-)" npx prisma migrate deploy
Solution:
- Check build logs for import errors
- Verify
data/wallets.jsonanddata/signers.jsonare in the repository - Manually run import:
vercel env pull .env.production DATABASE_URL="$(grep DATABASE_URL .env.production | cut -d '=' -f2-)" npm run import:json
Solution:
- Verify
SESSION_SECRETis set - Check that admin user was created (see build logs)
- Manually create admin user:
vercel env pull .env.production DATABASE_URL="$(grep DATABASE_URL .env.production | cut -d '=' -f2-)" npm run db:seed
Solution:
- Check Vercel function logs for API errors
- Verify database connection is working
- Check that signers were imported successfully
| Variable | Required | Description | How to Get |
|---|---|---|---|
DATABASE_URL |
Yes | Runtime database connection | Auto-added by Vercel Postgres |
PRISMA_DATABASE_URL |
Yes | Migration database connection | Auto-added by Vercel Postgres |
SESSION_SECRET |
Yes | Secret for session cookies | Generate: openssl rand -hex 32 |
SAFE_API_KEY |
Recommended | Safe Transaction Service API key | Get from Safe API |
ADMIN_USERNAME |
Optional | Admin username (default: stader) |
Set custom or use default |
ADMIN_PASSWORD |
Optional | Admin password (default: s2t1) |
Set custom or use default |
Before deploying, ensure:
- Code is pushed to GitHub
-
data/wallets.jsonexists and is committed -
data/signers.jsonexists and is committed -
prisma/migrations/directory exists with migrations - Vercel project is created and linked to GitHub repo
- PostgreSQL database is created in Vercel
-
DATABASE_URLenvironment variable is set (auto-added) -
PRISMA_DATABASE_URLenvironment variable is set (auto-added) -
SESSION_SECRETenvironment variable is set -
SAFE_API_KEYenvironment variable is set (if using Safe API) - Build completes successfully
- Migrations run successfully (check build logs)
- Admin user is created (check build logs)
- Data is imported (check build logs)
- Application is accessible and functional
To update wallets or signers:
-
Update JSON files locally:
- Edit
data/wallets.jsonordata/signers.json - Commit and push to GitHub
- Edit
-
Redeploy:
- Vercel will automatically redeploy on push
- Or manually trigger redeploy in Vercel dashboard
-
Import script runs automatically:
- The postbuild script will:
- Clean up invalid/orphaned entries
- Import new/updated data from JSON files
- Keep production in sync with JSON files
- The postbuild script will:
If you need to manually update data:
# Pull production environment variables
vercel env pull .env.production
# Import data
DATABASE_URL="$(grep DATABASE_URL .env.production | cut -d '=' -f2-)" npm run import:json
# Update departments
DATABASE_URL="$(grep DATABASE_URL .env.production | cut -d '=' -f2-)" npm run update:departments
# Clean up orphaned wallets
DATABASE_URL="$(grep DATABASE_URL .env.production | cut -d '=' -f2-)" npm run cleanup:wallets -- --confirmFor issues or questions:
- Check Vercel build logs
- Check Vercel function logs
- Review this deployment guide
- Check the main README.md for development setup