Prerequisites
Before installing from source, ensure you have:- Node.js 22.x or later (LTS recommended)
- pnpm 10.x or later
- PostgreSQL 16 or later
- FFmpeg (optional, for video thumbnail generation)
Installation
Building for production
To build and run Zipline in production mode:The build process compiles both the server and client code. The output is placed in the
build/ directory.Development with Nix
If you have Nix and direnv installed, setup is even simpler:- With direnv
- Without direnv
Useful Nix commands
The Nix environment provides helpful commands for development:| Command | Description |
|---|---|
pgup | Starts PostgreSQL server in the background |
pg_ctl status | Check if PostgreSQL is running |
minioup | Start a Minio server for testing S3 |
downall | Stop all running PostgreSQL and Minio services |
Database management
Zipline uses Prisma as its ORM. Here are common database operations:Making schema changes
After modifyingprisma/schema.prisma, create a migration:
This generates a migration file but doesn’t apply it. Zipline automatically applies migrations on startup.
Prototyping changes
For testing schema changes without creating migrations:Code quality
Zipline enforces code quality standards. Before submitting changes:Validate and format
- ESLint for code linting
- Prettier for code formatting
- TypeScript type checking
The build will fail if code doesn’t pass validation. Always run
pnpm validate before committing.Using zipline-ctl
Zipline includes a command-line tool for administrative tasks:Available scripts
Here are all available npm scripts:Development
Development
pnpm dev- Start development server with debug loggingpnpm dev:nd- Start development server without debug loggingpnpm dev:inspector- Start with Node.js inspector on port 9229
Production
Production
pnpm build- Build for productionpnpm start- Run production serverpnpm start:inspector- Run production server with inspector
Database
Database
pnpm db:migrate- Create a new migrationpnpm db:prototype- Push schema changes without migration
Code quality
Code quality
pnpm validate- Run linting, formatting, and type checking
CLI
CLI
pnpm ctl- Run zipline-ctl commandspnpm build:server- Build the server and CLI
Troubleshooting
Build fails with validation errors
Runpnpm validate to identify and fix linting or formatting issues.
Database connection errors
- Verify PostgreSQL is running
- Check your
DATABASE_URLin.env - Ensure the database exists:
createdb zipline
Module not found errors
- Delete
node_modulesandpnpm-lock.yaml - Run
pnpm installagain - Clear Prisma client:
rm -rf node_modules/.prisma
Port already in use
Change theCORE_PORT in your .env file to an available port.
Next steps
First steps
Create your admin account and configure basic settings
Configuration
Explore all configuration options
Contributing
Learn how to contribute to Zipline
API reference
Explore the Zipline API