dev vs prod instructions

This commit is contained in:
2026-04-05 23:10:24 -04:00
parent dbc35b3906
commit 5116661847
+47 -19
View File
@@ -11,7 +11,7 @@ Zep is a self-hosted, real-time communication platform built with Svelte 5 and S
## Core Functionality
* **Communication:** Text channels, voice channels, and threaded conversations.
* **Performance:** Uses a client-side cache (`recent_message` table) for immediate channel loading, with lazy-loading for deep message history.
* **Performance:** Uses a client-side cache (`recent_message` table) for immediate channel loading with lazy-loading for deep message history.
* **WebRTC Integration:** Peer-to-peer audio and screen sharing using SpacetimeDB for signaling.
* **Customization:** User profiles (avatars, banners, bios), server icons, and multiple CSS-based themes.
* **Media Support:** Built-in image uploads and custom emoji support.
@@ -21,35 +21,63 @@ Zep is a self-hosted, real-time communication platform built with Svelte 5 and S
* **Frontend:** Svelte 5 (Runes), TypeScript, Vite, Vanilla CSS.
* **Backend:** SpacetimeDB (TypeScript WASM module).
* **Communications:** WebRTC.
* **Desktop:** Configured for Tauri.
* **Desktop:** Native app support via Tauri.
## Getting Started
---
## Local Development
### Prerequisites
* Node.js (v18+)
* pnpm
* SpacetimeDB CLI
### Backend Setup
* SpacetimeDB CLI (`spacetime`)
### 1. Backend Setup
1. Navigate to the backend directory: `cd spacetimedb`
2. Install dependencies: `npm install`
3. Publish the module: `spacetime publish --server maincloud <your-db-name>`
### Frontend Setup
1. Install dependencies: `pnpm install`
2. Configure `.env.local`:
```env
VITE_SPACETIMEDB_HOST=wss://maincloud.spacetimedb.com
VITE_SPACETIMEDB_DB_NAME=zep
3. Publish the module to a local SpacetimeDB instance:
```bash
pnpm run spacetime:publish:local
```
3. Start development server: `pnpm run dev`
### Deployment (Cloudflare Pages)
### 2. Frontend Setup
1. Navigate to the project root and install dependencies: `pnpm install`
2. Configure `.env.local` for local development:
```env
VITE_SPACETIMEDB_HOST=ws://localhost:3000
VITE_SPACETIMEDB_DB_NAME=<your-db-name>
```
3. Start the development server: `pnpm run dev`
1. Build: `pnpm run build`
2. Deploy: `pnpm run deploy:cloudflare`
---
## Production Deployment
### Option 1: Docker (Recommended for Self-Hosting)
Zep can be deployed as a set of containers using Docker Compose.
```bash
pnpm run deploy:local
```
### Option 2: Cloud (SpacetimeDB Maincloud + Cloudflare Pages)
#### Backend (SpacetimeDB Maincloud)
1. Publish the module to Maincloud:
```bash
spacetime publish --server maincloud <your-db-name>
```
#### Frontend (Cloudflare Pages)
1. Build the project:
```bash
pnpm run build
```
2. Deploy using Wrangler:
```bash
pnpm run deploy:cloudflare
```
---
## License