Public
Basic Assistance Request App
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 request tracker app built on Val Town with persistent storage — submitted requests are saved to SQLite and automatically loaded when the page opens.
Rendering mermaid diagram...
| Layer | Purpose | How |
|---|---|---|
| SQLite (primary) | Durable, queryable storage | std/sqlite/main.ts — per-val database |
| Blob Storage (backup) | Redundant mirror | std/blob — JSON snapshot synced on every write |
CREATE TABLE requests (
id INTEGER PRIMARY KEY AUTOINCREMENT,
text TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'pending', -- pending | in-progress | resolved
timestamp TEXT NOT NULL DEFAULT (datetime('now'))
)
| Layer | Checks |
|---|---|
| Frontend (React) | Empty input, min 3 chars, max 1000 chars, disables button |
| Backend (Hono) | Type check, empty/whitespace, min/max length |
| Database-level | Duplicate detection within 60 seconds, NOT NULL constraints |
| Method | Path | Description |
|---|---|---|
GET | /api/requests | Retrieve all saved requests |
POST | /api/requests | Submit a new request |
PATCH | /api/requests/:id | Update status (pending → in-progress → resolved) |
DELETE | /api/requests/:id | Delete a request |
GET | /api/validation-rules | Get validation rules |
GET | /api/backup-info | View blob backup status |
main.ts— Hono backend: SQLite + blob persistence, validation, API routesfrontend/index.html— HTML shell with Twindfrontend/index.tsx— React entry pointfrontend/components/App.tsx— State management, fetches saved data on loadfrontend/components/RequestForm.tsx— Form with client-side validationfrontend/components/RequestList.tsx— Displays requests with status badges