• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
abrinz

abrinz

agent-chat

Remix of std/reactHonoStarter
Unlisted
Like
1
agent-chat
Home
Code
3
backend
1
frontend
5
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
2
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
/
README.md
Code
/
README.md
Search
6/10/2025
Viewing readonly version of main branch: v20
View latest version
README.md

React Hono AI Chat

A clean AI chat interface built with React, Hono, and Vercel's AI SDK.

Features

  • ✅ Clean, minimal chat interface
  • ✅ AI Chat powered by OpenAI GPT-4o-mini
  • ✅ Real-time streaming responses
  • ✅ Responsive sidebar layout (1/3 screen width)
  • ✅ Input anchored to bottom
  • ✅ Tailwind CSS styling

Getting started

Get a copy of this starter template by clicking the Remix button in the top-right.

How it works

  • The entrypoint is /backend/index.ts. That's the backend HTTP server, which also serves the all the frontend assets.

  • The client-side entrypoint is /frontend/index.html

    • which in turn imports /frontend/index.tsx
    • which in turn imports the React app from /frontend/components/App.tsx.
  • The chat feature uses:

    • /frontend/components/Chat.tsx - React component with useChat hook
    • /api/chat endpoint in /backend/index.ts - Streaming AI responses

Chat Implementation

The chat interface features:

  • Sidebar layout - Takes up 1/3 of screen width and full height
  • useChat hook from Vercel AI SDK handles message state and streaming
  • OpenAI integration via Val Town's standard library
  • Streaming responses for real-time chat experience
  • Bottom-anchored input for optimal UX
  • Clean design with Tailwind CSS

Further resources

  • Vercel AI SDK Documentation for more chat features and customization options.
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.