Ecom
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 modern e-commerce website for shoes built with React, Hono, and SQLite.
- Product catalog with filtering and search
- Shopping cart functionality
- Product details with image gallery
- Responsive design with TailwindCSS
- Admin panel for product management
- SQLite database for data persistence
βββ backend/
β βββ database/
β β βββ migrations.ts # Database schema
β β βββ queries.ts # Database operations
β βββ routes/
β β βββ products.ts # Product API routes
β β βββ cart.ts # Cart API routes
β βββ index.ts # Main Hono server
βββ frontend/
β βββ components/
β β βββ App.tsx # Main app component
β β βββ ProductCard.tsx # Product display component
β β βββ Cart.tsx # Shopping cart component
β β βββ ProductDetail.tsx # Product detail view
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend entry point
βββ shared/
βββ types.ts # Shared TypeScript types
## Getting Started
1. The backend runs on Hono with SQLite for data storage
2. The frontend is a React SPA with TailwindCSS for styling
3. Products are pre-seeded with sample shoe data
4. Cart functionality works with local storage and API persistence
## API Endpoints
- `GET /api/products` - Get all products
- `GET /api/products/:id` - Get product by ID
- `POST /api/cart` - Add item to cart
- `GET /api/cart` - Get cart items
- `DELETE /api/cart/:id` - Remove item from cart