Prerequisites
Before deploying to Vercel:- GitHub, GitLab, or Bitbucket repository
- Vercel account (free tier available)
- PostgreSQL database (Vercel Postgres, Supabase, or external)
Quick Start
Connect Repository
Import your Noteverse repository to Vercel:
- Go to Vercel Dashboard
- Click “Add New” → “Project”
- Select your Git provider and repository
- Click “Import”
Configure Build Settings
Vercel auto-detects Next.js. Verify these settings:
- Framework Preset: Next.js
- Build Command:
vercel-build(uses custom script) - Output Directory:
.next(default) - Install Command:
npm install
Environment Variables
Configure these environment variables in your Vercel project settings:Database Configuration
If using Vercel Postgres, the
DATABASE_URL is automatically configured. For external databases, ensure SSL mode is enabled.Authentication
Application URLs
Complete Environment Setup
Build Script Configuration
Noteverse uses a customvercel-build script defined in package.json:
- Generates Prisma Client: Creates type-safe database client
- Deploys Migrations: Applies database schema changes
- Builds Next.js: Creates production-optimized bundle
The
vercel-build script runs automatically during Vercel deployment. You don’t need to configure it manually.Vercel Blob Storage
Noteverse includes@vercel/blob for file uploads and storage.
Enable Vercel Blob
Add Blob Store
In your Vercel project:
- Go to “Storage” tab
- Click “Create Database”
- Select “Blob”
- Follow the setup wizard
Usage Example
WebSocket Considerations
Important Limitations
Noteverse uses a custom server (server.mjs) with Socket.IO for real-time collaboration:
- Maximum execution time: 10-60 seconds (plan dependent)
- Not suitable for persistent WebSocket connections
- Socket.IO requires long-lived connections
Solutions for Real-time Features
Recommended Approach
For production deployments with real-time features:- Deploy Next.js app to Vercel (static + API routes)
- Deploy Socket.IO server separately to Railway/Render
- Configure CORS for cross-origin WebSocket connections
- Set
NEXT_PUBLIC_SOCKET_URLto separate WebSocket server
Database Setup
Using Vercel Postgres
Create Database
- Go to “Storage” tab in your Vercel project
- Click “Create Database” → “Postgres”
- Choose region and plan
Using External Database
For external PostgreSQL (Supabase, Railway, etc.):Add
pgbouncer=true if your database uses connection pooling (common with Supabase).Deployment Workflow
Automatic Deployments
Vercel automatically deploys on:- Production: Pushes to
mainormasterbranch - Preview: Pull requests and other branches
Manual Deployment
Deploy manually using Vercel CLI:Monitoring and Logs
View Deployment Logs
- Go to your project dashboard
- Click on the deployment
- View “Build Logs” and “Function Logs”
Common Issues
Custom Domain
Add Domain
- Go to project “Settings” → “Domains”
- Enter your domain name
- Follow DNS configuration instructions
Performance Optimization
Edge Functions
Consider using Edge Functions for API routes:Image Optimization
Vercel automatically optimizes images vianext/image:
Next Steps
- Configure custom domain
- Set up monitoring with Vercel Analytics
- Enable preview deployments for testing
- Deploy WebSocket server separately for real-time features
Docker Deployment
For full WebSocket support, consider deploying with Docker