This project is built using Zero, a powerful real-time sync engine that makes building collaborative apps easy. Special thanks to the Zero team for their amazing work!
- Node.js 20+
- Docker
- A Neon account for the database
- A Koyeb account for deploying Zero cache
- A Vercel account for deploying the frontend
git clone https://github.com/neondatabase-labs/canvas.git
cd canvas
npm install
- Sign up for a Neon account
- Create a new project
- Copy your database connection string (you'll need this for the next steps)
- Apply the migration from
seed.sql
- Run:
npx zero-deploy-permissions --schema-path='./src/schema.ts' --output-file='/tmp/permissions_canvas.sql'
and run the content of that file in your DB
- Create a
.env
file in your project root:
cp sample.env .env && rm sample.env
- Start Zero cache:
npm run dev:zero-cache
- In a new terminal, start the frontend:
npm run dev:ui
Your app should now be running at http://localhost:5173
- Sign up for a Koyeb account
- Create a new app and select "Deploy a Docker image"
- Use the Zero Docker image
- Configure the following environment variables:
ZERO_UPSTREAM_DB
: Your Neon database connection stringZERO_REPLICA_FILE
: "/tmp/sync-replica.db"ZERO_PORT
: "8080" (or your preferred port)
- Push your code to GitHub
- Create a new project in Vercel
- Connect your GitHub repository
- Configure the following environment variables:
VITE_PUBLIC_SERVER
: Your Koyeb app URL (e.g., "https://your-app.koyeb.app")ZERO_AUTH_SECRET
: A secure random string for authentication
- Frontend: React + Vite, hosted on Vercel
- Backend: Zero cache server, hosted on Koyeb
- Database: PostgreSQL, hosted on Neon
This project is built on top of Zero by Rocicorp. Special thanks to the Zero team for creating such an amazing tool for building real-time collaborative applications.
- Koyeb - For hosting the Zero cache server
- Vercel - For hosting the frontend
- Neon - For hosting the PostgreSQL database
MIT