Deadman Vault is a Next.js 15 application backed by Supabase and the FlowVault SDK. Getting a fully functional local environment — complete with vault creation, heartbeat check-ins, and keeper settlement — takes less than ten minutes if you have Node.js, the Supabase CLI, and a Stacks testnet wallet ready to go.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/natureloved/DeadMan-Vault/llms.txt
Use this file to discover all available pages before exploring further.
You will need a Stacks-compatible wallet extension installed in your browser — either Leather or Xverse — to sign USDCx transfer transactions during testing. If you have both installed simultaneously, disable one to avoid a known
StacksProvider conflict (see the Troubleshooting section of the README).Setup
Clone the repo and install dependencies
Clone the repository and install all Node.js dependencies with The project uses Next.js 15 with Turbopack, TypeScript in strict mode, the FlowVault SDK (
npm install:flowvault-sdk@0.1.2), and @stacks/connect for wallet integration.Copy .env.example and fill in required variables
Copy the example environment file to Open
The following FlowVault contract variables are pre-filled in
.env.local, then fill in each required value:.env.local and provide the following variables:| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Your Supabase project URL (from Project Settings → API) |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Your Supabase anon/public key |
SUPABASE_SERVICE_ROLE_KEY | Your Supabase service role key (server-side only) |
NEXT_PUBLIC_APP_URL | The base URL of the app (use http://localhost:3000 for local development) |
RESEND_API_KEY | API key from resend.com for lifecycle emails |
RESEND_FROM_EMAIL | Verified sender address in your Resend account |
CRON_SECRET | A random secret used to authenticate Vercel Cron Job requests |
KEEPER_ENCRYPTION_KEY | 32-byte hex key for encrypting per-vault keeper private keys at rest (see step 4) |
.env.example and target the testnet deployment — leave those values as-is for local development:| Variable | Pre-filled value |
|---|---|
NEXT_PUBLIC_FLOWVAULT_NETWORK | testnet |
NEXT_PUBLIC_FLOWVAULT_CONTRACT_ADDRESS | STD7QG84VQQ0C35SZM2EYTHZV4M8FQ0R7YNSQWPD |
NEXT_PUBLIC_FLOWVAULT_CONTRACT_NAME | flowvault-v2 |
NEXT_PUBLIC_FLOWVAULT_TOKEN_CONTRACT_ADDRESS | ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM |
NEXT_PUBLIC_FLOWVAULT_TOKEN_CONTRACT_NAME | usdcx |
KEEPER_FUNDING_PRIVATE_KEY is optional. If provided, it must be a funded testnet Stacks private key used to automatically drip a small amount of STX to each new vault’s keeper address for gas fees. If omitted, you will need to fund new keeper addresses manually from the Stacks testnet faucet.Run database migrations
Apply the Supabase schema migrations to your project database. You can use either the npm script or the Supabase CLI directly:This creates all required tables:
vaults, beneficiaries, heartbeats, and notifications.Generate KEEPER_ENCRYPTION_KEY
The keeper uses AES encryption to store each vault’s dedicated Stacks private key securely in Supabase. Generate a 32-byte hex key with OpenSSL and paste it into Copy the output and set it as the value of
.env.local:KEEPER_ENCRYPTION_KEY in your .env.local file:Start the development server
Launch the Next.js dev server with Turbopack:The app will be available at http://localhost:3000. Open it in a browser with your Stacks wallet extension active.
Get Testnet Tokens
Deadman Vault runs on Stacks testnet only. You will need testnet STX (for transaction fees) and testnet USDCx (to fund your vault). Visit the Hiro Testnet Faucet to get STX, then use the testnet USDCx faucet available through the FlowVault demo app at flowvaultx.vercel.app to obtain USDCx tokens.
Next Steps
Now that your environment is running, create your first vault and explore the full heartbeat cycle:Create Your First Vault
Connect your wallet, set beneficiaries, choose a heartbeat interval, and make your first deposit.
How It Works
Understand the full lifecycle — from vault activation through keeper settlement and beneficiary claims.