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 basic storefront scaffold with a product catalog, category filtering, and a shopping cart β built with React + Hono on Val Town.
- π¦ Product catalog stored in SQLite (auto-seeded on first load)
- π·οΈ Category filter pills
- π Slide-out cart drawer with quantity controls
- π¨ Tailwind styling via Twind (zero build step)
Rendering mermaid diagram...
index.ts β Hono server (API + static files)
db.ts β SQLite schema, seed data, queries
frontend/
index.html β HTML shell (Twind + React)
index.tsx β React entrypoint
components/
App.tsx β Root: layout, state, data fetching
Header.tsx β Sticky header with cart button
ProductCard.tsx β Single product card
Cart.tsx β Slide-out cart drawer
| Method | Path | Description |
|---|---|---|
| GET | /api/products | List all products (optional ?category= filter) |
| GET | /api/products/:id | Get a single product |
| GET | /api/categories | List distinct categories |
- Add a product detail page
- Wire up checkout (Stripe, etc.)
- Add an admin panel for product CRUD
- Persist cart in localStorage
- Add user authentication via
std/oauth