Local deployment for developers
This guide is for developers running the repository. To use the hosted product, start with Getting started.
Prerequisites
Use the Node.js and pnpm versions supported by the repository, a local PostgreSQL instance, Git, and the Task command-line tool.
Configure a local environment
Clone the repository and install dependencies:
git clone https://github.com/vinpingammer/cloudy.git
cd cloudy
pnpm install
Copy the development environment example. Edit .env.dev with your own local database connection and required credentials. Set PRODUCT_NAME to nolkai or zhugong. Keep credentials out of Git.
cp .env.dev.example .env.dev
DATABASE_URL="postgresql://user:password@localhost:5432/cloudy"
DIRECT_URL="postgresql://user:password@localhost:5432/cloudy"
Apply migrations and start the app
Only run migrations against the local database you configured. The following starts the API and Vite app together:
task db:generate
pnpm --filter '@cloudx/api^...' -r --if-present build
task db:migrate:develop
task run:dev
Open http://localhost:3001. The API runs at http://localhost:4004; realtime connections use the same API process.
Next steps
Follow Getting started to save your first document, or see the API reference.