# Zep Zep is a self-hosted, real-time communication platform built with Svelte 5 and SpacetimeDB. It provides text, voice, and video messaging functionality designed for small groups and private communities. ## Core Tenets * **Low Dependencies:** We strive to keep the project's dependency graph as lean as possible, favoring native web capabilities over third-party libraries for better long-term maintainability and security. * **Frictionless Deployment:** Self-hosting should be trivial. Getting your own Zep server running must require the lowest number of steps possible (ideally just one command). * **Small Scale Focus:** The project is intended to be deployed amongst a small group of friends or team members. It is not currently designed to scale to massive numbers of concurrent users, although achieving higher scalability remains a stretch goal. * **Low Idle Resource Usage:** Don't take up a bunch of resources when you're not even using the service ## Data Ownership & Privacy * **Self-Hosted:** The application is designed to be hosted by the user. Data is stored in a SpacetimeDB instance controlled by the host. * **Data Isolation:** Data is not used for user profiling or advertising. * **Hosting Options:** Compatible with local SpacetimeDB instances or SpacetimeDB Maincloud. ## 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. * **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. ## Technology Stack * **Frontend:** Svelte 5 (Runes), TypeScript, Vite, Vanilla CSS. * **Backend:** SpacetimeDB (TypeScript WASM module). * **Communications:** WebRTC. * **Desktop:** Native app support via Tauri. --- ## Getting Started ### Prerequisites * Node.js (v18+) * pnpm * SpacetimeDB CLI (`spacetime`) * **For Docker:** Docker and Docker Compose --- ### One-Step Deployment (Recommended) The easiest way to get Zep running locally is using Docker. This command builds and starts both the frontend and the SpacetimeDB module in a single step. ```bash pnpm run deploy:local ``` --- ## Local Development (Manual Setup) ### 1. Backend Setup 1. Navigate to the backend directory: `cd spacetimedb` 2. Install dependencies: `npm install` 3. Publish the module to a local SpacetimeDB instance: ```bash pnpm run spacetime:publish:local ``` ### 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= ``` 3. Start the development server: `pnpm run dev` * *For local network testing with SSL, use `pnpm run dev:ssl`.* --- ## Production Deployment ### Option 1: Docker Zep can be deployed using Docker Compose for a production-like local environment or self-hosting. ```bash pnpm run deploy:local ``` ### Option 2: Cloud (SpacetimeDB Maincloud + Cloudflare Pages) #### Backend (SpacetimeDB Maincloud) 1. Publish the module to Maincloud: ```bash pnpm run spacetime:publish ``` #### Frontend (Cloudflare Pages) 1. Build and deploy using Wrangler: ```bash pnpm run deploy:cloudflare ``` --- ## License This project is open-source. See the `LICENSE` file for details. --- > [!IMPORTANT] > **Disclaimer:** This project is "vibe coded" and makes heavy use of AI. Expect experimental patterns and rapid structural changes.