Skip to main content
Noteverse is a real-time collaborative note-sharing platform that can be deployed to various hosting environments. This guide covers the requirements and options for deploying your Noteverse instance.

Production Requirements

Before deploying Noteverse, ensure your environment meets these requirements:

Runtime Environment

  • Node.js: Version 18.x or higher
  • Package Manager: npm, yarn, or pnpm
  • Database: PostgreSQL (with Prisma ORM)
  • WebSocket Support: Required for real-time collaboration

Database

Noteverse uses PostgreSQL with Prisma as the ORM. You’ll need:
  • PostgreSQL 12+ instance
  • Connection string with appropriate permissions
  • Support for Prisma migrations

Server Requirements

Noteverse uses a custom Node.js server (server.mjs) to support Socket.IO for real-time features. Standard Next.js serverless deployments won’t support WebSocket connections.
The application requires:
  • WebSocket support for Socket.IO
  • HTTP server for Next.js application
  • Port 3000 (default, configurable)

Environment Variables

Configure these environment variables for production:
# Database
DATABASE_URL="postgresql://user:password@host:5432/database"

# Authentication
NEXTAUTH_URL="https://your-domain.com"
NEXTAUTH_SECRET="your-secret-key"

# Application URLs
NEXT_PUBLIC_API_URL="https://your-domain.com"
NEXT_PUBLIC_SOCKET_URL="https://your-domain.com"
NEXT_PUBLIC_UPLOAD_URL="https://your-blob-storage.com"

# Production Environment
NODE_ENV="production"
Never commit .env files to version control. Use your hosting provider’s environment variable management system.

Build Process

The standard build process includes:
1

Install Dependencies

Install all required packages:
npm install
This automatically runs prisma generate via the postinstall script.
2

Generate Prisma Client

Ensure Prisma client is generated:
npx prisma generate
3

Run Database Migrations

Apply database schema migrations:
npx prisma migrate deploy
4

Build Next.js Application

Create the production build:
npm run build
5

Start Production Server

Start the custom Node.js server with Socket.IO:
npm start
This runs NODE_ENV=production node server.mjs

Deployment Options

Noteverse can be deployed to various platforms:

Vercel

Recommended for easy deployment with automatic CI/CD integration.
  • Automatic deployments from Git
  • Built-in Vercel Blob storage support
  • Environment variable management
  • WebSocket considerations apply (see Vercel deployment guide)
Learn more about Vercel deployment →

Docker

Ideal for self-hosted environments and full control over infrastructure.
  • Multi-stage build for optimized images
  • Docker Compose for PostgreSQL integration
  • Portable across cloud providers
  • Full WebSocket support
Learn more about Docker deployment →

Other Platforms

Noteverse can be deployed to any platform that supports:
  • Node.js 18+ runtime
  • WebSocket connections
  • PostgreSQL databases
Suitable platforms include:
  • Railway: Node.js and PostgreSQL support with WebSockets
  • Render: Native WebSocket support
  • DigitalOcean App Platform: Docker-based deployments
  • AWS EC2/ECS: Full control with Docker or direct deployment
  • Heroku: Supports WebSockets with appropriate dynos

Storage Configuration

Noteverse uses @vercel/blob for file storage:
import { put } from '@vercel/blob';

const blob = await put('filename.png', file, {
  access: 'public',
});

Alternative Storage

For non-Vercel deployments, configure:
  • AWS S3
  • Cloudflare R2
  • DigitalOcean Spaces
  • Self-hosted storage solutions

Real-time Features

The real-time collaboration features require WebSocket support. Ensure your deployment platform supports persistent WebSocket connections.
Noteverse’s server.mjs handles:
  • User registration and presence
  • Real-time content synchronization
  • Live user tracking
  • Collaborative editing events

Health Checks

Implement health check endpoints for production monitoring:
curl http://localhost:3000/api/health
Monitor:
  • Database connectivity
  • WebSocket connections
  • Server uptime
  • Memory usage

Next Steps

Choose your deployment platform:

Deploy to Vercel

Quick deployment with automatic CI/CD

Deploy with Docker

Self-hosted deployment with containers

Build docs developers (and LLMs) love