How shaeikh/konvo works
Konvo is a browser-based real-time chat application with account registration and login, switchable chat rooms, message history, online-user indicators, and theme switching. The principal workflow is: a user signs in, opens the chat workspace, selects a room, loads its history, and exchanges messages through Socket.io. Better Auth provides sessions, while a PostgreSQL-backed API serves chat history. The README documents major capabilities; some client/server wiring is not visible in the sampled excerpts, so those relationships are omitted or marked unverified.
Main entry points: ChatUI.tsx Chat workspace UI · auth.ts Better Auth · page.tsx Chat page · LoginForm.tsx Login form
Components 18
Identity
- Login form
app/(auth)/login/LoginForm.tsx - Registration form
app/(auth)/signup/RegisterForm.tsx - Auth validation
lib/validations/auth.ts - Auth client
lib/auth-client.ts - Auth API routes
app/api/auth - Better Auth
lib/auth.ts
Chat workspace
- Chat page
app/(main)/chat/page.tsx - Chat workspace UI
app/(main)/chat/ChatUI.tsx - Socket client
lib/socket.ts
Server and data
- Room history API
app/api/chat/[room]/route.ts - Application server
server.ts - PostgreSQL
lib/db.ts
Shared interface
- UI primitives
components/ui - Theme controls
components/ModeToggle.tsx - Theme provider
components/theme-provider.tsx - Page metadata
config/metadata.ts
Other components
- Chat user
- Socket service
Connections 25
- Chat user → Login form: submits credentials
app/(auth)/login/LoginForm.tsx - Chat user → Registration form: creates account
app/(auth)/signup/RegisterForm.tsx - Login form → Auth validation: validates input
app/(auth)/login/LoginForm.tsx - Registration form → Auth validation: validates input
app/(auth)/signup/RegisterForm.tsx - Login form → Auth client: signs in
app/(auth)/login/LoginForm.tsx - Registration form → Auth client: signs up
app/(auth)/signup/RegisterForm.tsx - Auth client → Auth API routes: uses auth endpoints
- Auth API routes → Better Auth: dispatches requests
app/api/auth/[...all]/route.ts - Better Auth → PostgreSQL: stores auth data
lib/auth.ts - Chat user → Chat page: opens workspace
README.md - Chat page → Chat workspace UI: renders
app/(main)/chat/page.tsx - Chat page → Better Auth: checks session
app/(main)/chat/page.tsx - Chat workspace UI → Socket client: uses
app/(main)/chat/ChatUI.tsx - Socket client → Socket service: exchanges chat events
- Chat workspace UI → Room history API: loads room history
- Room history API → Better Auth: checks session
app/api/chat/[room]/route.ts - Room history API → PostgreSQL: queries messages
app/api/chat/[room]/route.ts - Application server → PostgreSQL: uses connection
server.ts - Application server → Better Auth: uses auth
server.ts - Chat workspace UI → UI primitives: renders with
app/(main)/chat/ChatUI.tsx - Chat workspace UI → Theme controls: renders toggle
app/(main)/chat/ChatUI.tsx - Theme controls → UI primitives: uses controls
components/ModeToggle.tsx - Chat page → Page metadata: uses metadata
app/(main)/chat/page.tsx - Chat user → Theme controls: switches theme
README.md - Theme provider → UI primitives: provides theme context