- GitHub account (for connecting repository to Vercel)
- Vercel account (sign up at https://vercel.com)
- Repository pushed to GitHub
- Log in to Vercel (https://vercel.com)
- Click "Add New..." and select "Project"
- Import your GitHub repository containing the PiggyWise project
- Configure project settings:
- Framework Preset: Next.js
- Root Directory: ./
- Build Command:
prisma generate && next build - Output Directory: .next
Add the following environment variables (copy from .env.production):
DATABASE_URL="postgresql://neondb_owner:npg_BMSk6cPCb5Rq@ep-lingering-night-a15hf4pi-pooler.ap-southeast-1.aws.neon.tech/neondb?sslmode=require"
DIRECT_URL="postgresql://neondb_owner:npg_BMSk6cPCb5Rq@ep-lingering-night-a15hf4pi.ap-southeast-1.aws.neon.tech/neondb?sslmode=require"
NEXTAUTH_SECRET="iQkGi+5pApz6pRE+cjDIc8xkbZdxw7M+l+X0D3I7xdY="
NEXTAUTH_URL="https://piggywise.vercel.app"
RESEND_API_KEY="re_Ji8saSQP_4kJWnNyR6q9VGPLuabL5bqQU"
RESEND_FROM_EMAIL="onboarding@resend.dev"
CLOUDINARY_CLOUD_NAME=dwxsrko1g
CLOUDINARY_API_KEY=764797368616464
CLOUDINARY_API_SECRET=XZfmiizy5E3SwlCTXtXtwWfKXGk
ADMIN_EMAILS=parent@test.com
Note: Make sure to update the NEXTAUTH_URL to match your Vercel deployment URL once it's deployed.
- Click "Deploy"
- Wait for the build and deployment to complete
- Click the deployment URL to open your application
- Test the following functionality:
- User registration/login
- Parent and child dashboards
- Module creation and assignment
- Task creation and completion
- Database connections through the app
- Go to the "Domains" section of your project settings
- Add your custom domain
- Follow the DNS configuration instructions
- Update the
NEXTAUTH_URLenvironment variable to your custom domain
If you encounter database connection issues:
- Verify that the Neon connection strings are correct
- Check that the database is accessible (not behind a firewall)
- Ensure the Prisma schema matches the database schema
If you encounter build errors:
- Check the build logs for specific error messages
- Verify that all dependencies are correctly installed
- Check for any NextAuth configuration issues
For future updates:
- Push changes to your GitHub repository
- Vercel will automatically detect changes and redeploy
- If you've made schema changes, you may need to apply them to the production database:
# Temporarily use production env vars cp .env.production .env npx prisma db push # Restore local env vars mv .env.local .env