• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
Naa56

Naa56

my-first-val

Public
Like
my-first-val
Home
Code
8
backend
3
frontend
1
shared
1
01_script.tsx
H
02_http.tsx
C
03_cron.tsx
E
04_email.tsx
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
backend
/
README.md
Code
/
backend
/
README.md
Search
6/2/2025
Viewing readonly version of main branch: v13
View latest version
README.md

Backend - Team Travel Chat API

Hono-based API server providing real-time chat functionality for travel planning.

Structure

  • index.ts - Main Hono application with HTTP endpoints
  • database/migrations.ts - SQLite table setup
  • database/queries.ts - Database query functions

Endpoints

  • GET / - Serves the chat interface with initial message data
  • GET /api/messages - Returns recent messages (JSON)
  • POST /api/messages - Creates new message (JSON)
  • GET /api/messages/stream - Server-sent events for real-time updates
  • GET /frontend/* - Serves frontend static files
  • GET /shared/* - Serves shared utility files

Database Schema

CREATE 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 );

Real-time Updates

Uses Server-Sent Events (SSE) to push new messages to connected clients every 2 seconds.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.