This directory contains the backend code for the real-time chat application.
index.ts: Main entry point with Hono setup, WebSocket handling, and HTTP routesdatabase/: Database setup and queries
migrations.ts: Schema definitionsqueries.ts: Database query functionsThe WebSocket connection handles the following message types:
join: User joining the chat with a usernamemessage: User sending a messagemessage: New message from a useruser_joined: Notification when a user joinsuser_left: Notification when a user leaveshistory: Message history when a user first connects