A full-featured online shopping platform with integrated customer support chat.
├── 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
The app will be available at the HTTP endpoint once deployed. The backend serves both the API and the frontend files.
GET /api/products - Get all productsGET /api/products/:id - Get product by IDGET /api/products/category/:category - Get products by categoryGET /api/cart/:sessionId - Get cart contentsPOST /api/cart/:sessionId/add - Add item to cartPUT /api/cart/:sessionId/update - Update cart itemDELETE /api/cart/:sessionId/remove/:productId - Remove item from cartPOST /api/orders - Create new orderGET /api/orders/:id - Get order detailsGET /api/chat/messages/:roomId - Get chat messagesPOST /api/chat/messages - Send chat messageGET /api/chat/stream/:roomId - SSE stream for real-time messages