Hono-based API server providing real-time chat functionality for travel planning.
index.ts - Main Hono application with HTTP endpointsdatabase/migrations.ts - SQLite table setupdatabase/queries.ts - Database query functionsGET / - Serves the chat interface with initial message dataGET /api/messages - Returns recent messages (JSON)POST /api/messages - Creates new message (JSON)GET /api/messages/stream - Server-sent events for real-time updatesGET /frontend/* - Serves frontend static filesGET /shared/* - Serves shared utility filesCREATE TABLE travel_chat_messages_1 (
id INTEGER PRIMARY KEY AUTOINCREMENT,
author TEXT NOT NULL,
content TEXT NOT NULL,
timestamp TEXT NOT NULL,
created_at INTEGER NOT NULL
);
Uses Server-Sent Events (SSE) to push new messages to connected clients every 2 seconds.