• Blog
  • Docs
  • Pricing
  • Weโ€™re hiring!
Log inSign up
Satheesh_25

Satheesh_25

untitled-3483

Public
Like
untitled-3483
Home
Code
5
backend
3
frontend
3
shared
2
README.md
new-file-9444.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
backend
/
README.md
Code
/
backend
/
README.md
Search
5/16/2025
README.md

Toy Store Backend

This directory contains the backend code for the Toy Store website.

Structure

  • index.ts - Main entry point and API routes using Hono framework
  • database/ - Database setup, migrations, and queries

API Endpoints

  • GET /api/categories - Get all product categories
  • GET /api/products - Get products with optional filtering
    • Query params: featured, category, limit, search
  • GET /api/products/:slug - Get a single product by slug
  • GET /api/featured - Get featured products

Page Routes

  • GET / - Homepage
  • GET /product/:slug - Product detail page
  • GET /category/:slug - Category page with products
  • GET /cart - Shopping cart page
  • GET /contact - Contact page

Static File Serving

The backend serves static files from the /frontend and /shared directories.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
Weโ€™re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
ยฉ 2025 Val Town, Inc.