Prerequisites
Before installing VizBoard, ensure you have the following installed on your system:- Node.js: Version 20.x or higher (Download)
- Docker: For running PostgreSQL databases (Download)
- Docker Compose: Version 3.8+ (usually included with Docker Desktop)
- Git: For cloning the repository
VizBoard requires Node.js 20 or higher due to its use of Next.js 15 and React 19 features.
Installation Steps
Install Dependencies
Install all required npm packages:This will install all dependencies including Next.js, React, Prisma, and visualization libraries.
Configure Environment Variables
Create a Add the following environment variables to your
.env file in the project root with the required configuration:.env file:Generate Security Keys
Generate secure keys for authentication and encryption:Generate AUTH_SECRET (for NextAuth.js):Generate ENCRYPTION_KEY (for database credential encryption):Copy these generated values into your
.env file.The
AUTH_SECRET is used by NextAuth.js for JWT token signing. The ENCRYPTION_KEY is used to encrypt database connection credentials with AES-256-GCM.Start PostgreSQL Databases with Docker
VizBoard uses Docker Compose to manage multiple PostgreSQL databases:Verify all containers are running:You should see 4 PostgreSQL containers running:
- vizboard_main: Application database (users, projects, widgets)
- vizboard_test1, test2, test3: Test databases for creating sample connections
| Container | Port | Database | Purpose |
|---|---|---|---|
db_main | 5432 | vizboard_main | Application database |
db_test1 | 5433 | vizboard_test1 | Sample data for testing |
db_test2 | 5434 | vizboard_test2 | Sample data for testing |
db_test3 | 5435 | vizboard_test3 | Sample data for testing |
Run Database Migrations
Apply Prisma migrations to set up the application database schema:This creates all necessary tables including:
users: User accounts and authenticationaccounts: OAuth provider accountsprojects: Dashboard projectsdbconnections: External database connections (with encrypted credentials)widgets: Visualization widgets
Migrations are stored in
prisma/migrations/ and track your database schema changes over time.Seed Test Databases (Optional)
Populate test databases with sample data for exploring VizBoard features:This script seeds all three test databases with realistic data:
- vizboard_test1 & test2: Store data (users, products, sales, reviews)
- vizboard_test3: Client data, orders, and API request events
Test databases use Faker.js to generate realistic sample data, perfect for creating demo dashboards.
Start the Development Server
Launch VizBoard in development mode:The application will start at http://localhost:3000 with Turbopack for fast hot-reloading.You should see output like:
Docker Compose Configuration
Thedocker-compose.yml file defines 4 PostgreSQL containers:
docker-compose.yml
Database Schema
VizBoard’s application database uses the following Prisma schema:prisma/schema.prisma
Available Scripts
VizBoard provides several npm scripts for common tasks:Development
Database Management
Seeding Test Databases
Utilities
Environment Variables Reference
| Variable | Description | Example | Required |
|---|---|---|---|
DATABASE_URL | PostgreSQL connection string for main database | postgresql://user:pass@localhost:5432/vizboard_main | Yes |
AUTH_SECRET | Secret for NextAuth.js JWT signing | Generated with openssl rand -base64 32 | Yes |
NEXTAUTH_URL | Base URL of your application | http://localhost:3000 | Yes |
ENCRYPTION_KEY | 32-byte key for encrypting database credentials | Generated with Node.js crypto | Yes |
NODE_ENV | Environment mode | development or production | No |
Troubleshooting
Port Already in Use
If port 5432 is already in use:Migration Errors
If migrations fail:Connection Refused
If the app can’t connect to the database:- Verify Docker containers are running:
docker ps - Check your
DATABASE_URLin.env - Ensure the database is accessible:
docker logs <container-name>
Invalid Encryption Key
If you get encryption errors:- Ensure
ENCRYPTION_KEYis exactly 32 bytes in base64 format - Regenerate the key:
- Update
.envand restart the server
Production Deployment
For production deployment:Set Production Environment Variables
Update your
.env or hosting platform with production values:- Change
NODE_ENVtoproduction - Update
NEXTAUTH_URLto your production domain - Use a secure, production-grade
DATABASE_URL - Generate new
AUTH_SECRETandENCRYPTION_KEYfor production
Next Steps
Quickstart Guide
Create your first dashboard in 5 minutes
Introduction
Learn more about VizBoard’s features and capabilities
