Update README.md with setup instructions, project stack details, chat functionality, and PocketBase integration information.
This commit is contained in:
@@ -1,2 +1,51 @@
|
||||
# Evoke
|
||||
|
||||
SvelteKit 5 + **Bun** + **shadcn-svelte** + **PocketBase**.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
bun install
|
||||
cp .env.example .env # optional: override PocketBase URL
|
||||
bun run dev
|
||||
```
|
||||
|
||||
- **Dev:** http://localhost:5173
|
||||
- **PocketBase:** https://pocketbase.ccllc.pro (set `PUBLIC_POCKETBASE_URL` in `.env` to override)
|
||||
|
||||
## Stack
|
||||
|
||||
- **SvelteKit 5** – app framework
|
||||
- **Bun** – package manager & runtime
|
||||
- **shadcn-svelte** – UI components (Tailwind, `$lib/components/ui`)
|
||||
- **PocketBase** – API at `https://pocketbase.ccllc.pro`
|
||||
|
||||
## Chat (Voxer-style)
|
||||
|
||||
- **Channels:** Sign in, then go to **Open channels** or `/channels`. Create a channel or open one.
|
||||
- **Channel view:** Unified feed of voice, text, image, and video messages with realtime updates.
|
||||
- **Voice (PTT):** Hold the “Hold to talk” button (or Space) to record; release to send. Uses `audio/webm;codecs=opus`.
|
||||
- **Text:** Type in the composer and click Send.
|
||||
- **Photo/Video:** Use the “Photo / Video” button to attach and send.
|
||||
- **PocketBase setup:** Create the `channels` and `messages` collections in the PocketBase Admin. See **docs/POCKETBASE_SETUP.md** for fields and API rules.
|
||||
|
||||
## PocketBase
|
||||
|
||||
- **Server:** Use `event.locals.pb` in `hooks.server.ts`, load functions, and form actions. Auth is synced via cookies.
|
||||
- **Client:** Use `createPocketBase()` from `$lib/pocketbase` for a client-side instance (e.g. in `onMount` or component logic).
|
||||
- **Health check:** `GET /api/health` – reports app and PocketBase reachability.
|
||||
|
||||
## Add more shadcn components
|
||||
|
||||
```bash
|
||||
bunx shadcn-svelte@latest add card
|
||||
bunx shadcn-svelte@latest add input
|
||||
```
|
||||
|
||||
## Scripts
|
||||
|
||||
| Command | Description |
|
||||
|---------------|--------------------|
|
||||
| `bun run dev` | Start dev server |
|
||||
| `bun run build` | Production build |
|
||||
| `bun run preview` | Preview production build |
|
||||
|
||||
Reference in New Issue
Block a user