How notghoull/spookcord works
Spookcord is an early-stage, self-hostable chat platform. Users sign up or sign in, enter chat, select a channel, load messages, and receive live message updates; they can also create or join servers and manage channels. The server exposes authenticated RPC and auth endpoints, while shared schemas define API data and a database schema supports persistence. The excerpts show message-query, realtime, server-creation, and authentication wiring; some listed routers and UI flows were not sampled, so their relationships are left unasserted or marked unverified.
Main entry points: ChatView.svelte Chat view · index.ts RPC router registry · server.ts Server operations · channel.ts Channel and message operations
Components 22
Web client
- Web application
apps/web/src/routes/+layout.svelte - Signup form
apps/web/src/components/SignUpForm.svelte - Chat view
apps/web/src/components/Chat/ChatView.svelte - Chat input
apps/web/src/components/Chat/ChatInput.svelte - Server and channel UI
apps/web/src/components/Servers/CreateServerPopup.svelte - Profile settings
apps/web/src/components/User-Settings/UserProfileSettings.svelte
API and identity
- HTTP and RPC entry
apps/server/src/index.ts - RPC router registry
apps/server/src/routers/index.ts - Authentication
apps/server/src/lib/auth.ts - Auth endpoints
apps/server/src/routers/auth.ts - Session context
apps/server/src/lib/context.ts
Community features
- Server operations
apps/server/src/routers/server.ts - Channel and message operations
apps/server/src/routers/channel.ts - User operations
apps/server/src/routers/user.ts - Current-member operations
apps/server/src/routers/me.ts
Shared data
- Message display
packages/ui/src/lib/components/Message.svelte - Database schema
packages/db-schema/src/schema.ts - API contracts
packages/types/src/api/server.ts - Messaging contracts
packages/types/src/api/channel.ts
Other components
- Member
- PostgreSQL database
- Supabase realtime
Connections 30
- Member → Web application: uses
- Member → Signup form: registers
apps/web/src/components/SignUpForm.svelte - Signup form → Authentication: submits credentials
- Web application → Chat view: opens chat
- Chat view → Channel and message operations: queries messages
apps/web/src/components/Chat/ChatView.svelte - Chat view → Auth endpoints: requests JWT
apps/web/src/components/Chat/ChatView.svelte - Chat view → Supabase realtime: subscribes to messages
apps/web/src/components/Chat/ChatView.svelte - Chat view → Message display: renders messages
apps/web/src/components/Chat/ChatView.svelte - Chat view → Chat input: renders input
apps/web/src/components/Chat/ChatView.svelte - Chat input → Channel and message operations: sends messages
- Member → Server and channel UI: manages communities
- Server and channel UI → Server operations: requests server actions
- HTTP and RPC entry → Authentication: routes auth requests
apps/server/src/index.ts - HTTP and RPC entry → Session context: creates RPC context
apps/server/src/index.ts - HTTP and RPC entry → RPC router registry: dispatches RPC
apps/server/src/index.ts - RPC router registry → Auth endpoints: registers
apps/server/src/routers/index.ts - RPC router registry → Server operations: registers
apps/server/src/routers/index.ts - RPC router registry → Channel and message operations: registers
apps/server/src/routers/index.ts - RPC router registry → User operations: registers
apps/server/src/routers/index.ts - RPC router registry → Current-member operations: registers
apps/server/src/routers/index.ts - Auth endpoints → Authentication: issues JWT
apps/server/src/routers/auth.ts - Authentication → PostgreSQL database: persists auth data
apps/server/src/lib/auth.ts - Server operations → PostgreSQL database: reads and writes
apps/server/src/routers/server.ts - Server operations → API contracts: validates server data
apps/server/src/routers/server.ts - Server operations → Database schema: queries entities
apps/server/src/routers/server.ts - Channel and message operations → PostgreSQL database: reads and writes
- Channel and message operations → Messaging contracts: uses contracts
- User operations → PostgreSQL database: reads user data
- Current-member operations → PostgreSQL database: reads member data
- Profile settings → User operations: updates profile