1 Like
1 BranchVal 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 tiny public guestbook that showcases a handful of Val Town basics in one little app. Anyone with the link can drop a one-liner on the board, and a fresh "vibe of the day" rolls over every morning.
Try the app · lives at https://vibe-board.val.run/
| Capability | Where |
|---|---|
| 🚀 HTTP endpoint | main.ts — Hono server, served at a custom subdomain |
| 🗄️ SQLite | main.ts — visitor counter + guestbook notes via std/sqlite |
| ☁️ Blob storage | daily-vibe.ts — the daily vibe persisted via std/blob |
| 🕐 Interval cron | daily-vibe.ts — runs at 10 0 * * * (UTC) |
| 👤 Viewer identity | main.ts — greets logged-in visitors via X-Val-Town-User |
main.ts— the HTTP app: renders the page, accepts POSTs, and exposes a JSON API at/api/notes.vibes.ts— a shared list of vibes + the deterministicvibeFor(date)picker.daily-vibe.ts— a nightly cron that stores today's vibe in blob storage.
- Visit https://vibe-board.val.run/api/notes for the raw guestbook as JSON.
- Post a vibe in the box on the homepage — it's stored in SQLite and shown to everyone.
- Code runs on Val Town's Deno runtime — no filesystem, so state lives in
std/sqliteandstd/blob. - The cron sets a blob key per date; if it hasn't run yet, the app falls back to computing the same vibe deterministically.