untitled-3483
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.
This directory contains the backend code for the Toy Store website.
index.ts- Main entry point and API routes using Hono frameworkdatabase/- Database setup, migrations, and queries
GET /api/categories- Get all product categoriesGET /api/products- Get products with optional filtering- Query params:
featured,category,limit,search
- Query params:
GET /api/products/:slug- Get a single product by slugGET /api/featured- Get featured products
GET /- HomepageGET /product/:slug- Product detail pageGET /category/:slug- Category page with productsGET /cart- Shopping cart pageGET /contact- Contact page
The backend serves static files from the /frontend and /shared directories.