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.
A real-time assistance request tracker and chat app built on Val Town.
- 📋 Requests Tab — Submit, view, and delete assistance requests. All requests persist in SQLite with timestamps.
- 💬 Chat Tab — Join with a username and send messages. Messages sync across users via polling (every 2 seconds). Chat history persists across sessions.
- 🔔 Toast Notifications — Visual confirmations for all actions (submit, delete, join, errors).
- 📱 Responsive — Works on mobile and desktop with flex layouts.
- ✅ Validation — Empty submissions are rejected on both client and server.
Rendering mermaid diagram...
index.ts ← Hono server (API + static files)
shared/
db.ts ← SQLite schema & init
frontend/
index.html ← HTML shell
index.tsx ← React entrypoint
favicon.svg ← App icon
components/
App.tsx ← Root layout + tab navigation
RequestsTab.tsx ← Submit & view requests
ChatTab.tsx ← Real-time chat with username
Toast.tsx ← Toast notification system
| Method | Path | Description |
|---|---|---|
GET | /api/requests | List all requests (newest first) |
POST | /api/requests | Create request ({ text }) |
DELETE | /api/requests/:id | Delete a request |
GET | /api/chat | Get last 200 chat messages |
POST | /api/chat | Send message ({ username, message }) |
GET | /api/chat/stream?after=ID | Poll for new messages after ID |