FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
Zee_paul
Zee_paulApp
Public
Like
App
Home
Code
7
backend
3
frontend
4
shared
1
README.md
new-file-3843.tsx
new-file-3872.tsx
new-file-7891.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 miliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://Zee_paul--7e4c76be3f7911f0b7ad76b3cceeab13.web.val.run
README.md

E-Commerce Chat App

A full-featured online shopping platform with integrated customer support chat.

Features

E-Commerce

  • Product catalog with categories
  • Shopping cart functionality
  • Checkout process
  • Order management
  • Product search and filtering

Chat System

  • Real-time customer support chat
  • Chat history
  • Multiple chat rooms/conversations
  • Admin chat interface

Project Structure

├── backend/
│   ├── database/
│   │   ├── migrations.ts    # Database schema setup
│   │   └── queries.ts       # Database query functions
│   ├── routes/
│   │   ├── products.ts      # Product API endpoints
│   │   ├── cart.ts          # Shopping cart endpoints
│   │   ├── orders.ts        # Order management
│   │   ├── chat.ts          # Chat API endpoints
│   │   └── static.ts        # Static file serving
│   └── index.ts             # Main Hono server
├── frontend/
│   ├── components/
│   │   ├── App.tsx          # Main app component
│   │   ├── ProductList.tsx  # Product catalog
│   │   ├── Cart.tsx         # Shopping cart
│   │   ├── Checkout.tsx     # Checkout form
│   │   └── Chat.tsx         # Chat interface
│   ├── index.html           # Main HTML template
│   ├── index.tsx            # Frontend entry point
│   └── style.css            # Custom styles
└── shared/
    └── types.ts             # Shared TypeScript types

Tech Stack

  • Backend: Hono (TypeScript API framework)
  • Frontend: React with TypeScript
  • Database: SQLite
  • Styling: TailwindCSS
  • Real-time: Server-Sent Events for chat

Getting Started

The app will be available at the HTTP endpoint once deployed. The backend serves both the API and the frontend files.

API Endpoints

Products

  • GET /api/products - Get all products
  • GET /api/products/:id - Get product by ID
  • GET /api/products/category/:category - Get products by category

Cart

  • GET /api/cart/:sessionId - Get cart contents
  • POST /api/cart/:sessionId/add - Add item to cart
  • PUT /api/cart/:sessionId/update - Update cart item
  • DELETE /api/cart/:sessionId/remove/:productId - Remove item from cart

Orders

  • POST /api/orders - Create new order
  • GET /api/orders/:id - Get order details

Chat

  • GET /api/chat/messages/:roomId - Get chat messages
  • POST /api/chat/messages - Send chat message
  • GET /api/chat/stream/:roomId - SSE stream for real-time messages
HTTP
  • index.ts
    Zee_paul--7e…13.web.val.run
Code
backendfrontendsharedREADME.mdnew-file-3843.tsxnew-file-3872.tsxnew-file-7891.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.