Beadebag
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.
index.ts
https://gracie1--6ea28bc23f9c11f0890276b3cceeab13.web.val.run
A complete e-commerce platform for selling handcrafted beaded bags with shopping cart functionality, order management, and customer features.
- Product Catalog: Browse beautiful beaded bags with detailed descriptions and images
- Shopping Cart: Add/remove items, adjust quantities, view totals
- Customer Orders: Place orders with contact information
- Admin Panel: Manage products and view orders (basic implementation)
- Responsive Design: Works on desktop and mobile devices
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema setup
│ │ └── queries.ts # Database query functions
│ ├── routes/
│ │ ├── products.ts # Product API endpoints
│ │ ├── orders.ts # Order API endpoints
│ │ └── static.ts # Static file serving
│ └── index.ts # Main Hono server
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main React application
│ │ ├── ProductCard.tsx # Individual product display
│ │ ├── Cart.tsx # Shopping cart component
│ │ └── OrderForm.tsx # Checkout form
│ ├── index.html # Main HTML template
│ ├── index.tsx # Frontend entry point
│ └── style.css # Custom styles
├── shared/
│ └── types.ts # Shared TypeScript types
└── README.md
- Backend: Hono (TypeScript API framework)
- Frontend: React 18.2.0 with TypeScript
- Database: SQLite for product and order storage
- Styling: TailwindCSS
- Deployment: Val Town platform
- The backend automatically sets up the database on first run
- Sample beaded bag products are pre-loaded
- Visit the main page to start shopping
- Add items to cart and proceed to checkout
GET /api/products
- Get all productsPOST /api/products
- Add new product (admin)GET /api/orders
- Get all orders (admin)POST /api/orders
- Place new orderGET /api/orders/:id
- Get specific order
- id (INTEGER PRIMARY KEY)
- name (TEXT)
- description (TEXT)
- price (REAL)
- image_url (TEXT)
- category (TEXT)
- in_stock (BOOLEAN)
- created_at (DATETIME)
- id (INTEGER PRIMARY KEY)
- customer_name (TEXT)
- customer_email (TEXT)
- customer_phone (TEXT)
- shipping_address (TEXT)
- items (TEXT) - JSON array of cart items
- total_amount (REAL)
- status (TEXT)
- created_at (DATETIME)
- Payment integration (Stripe/PayPal)
- User authentication and accounts
- Product reviews and ratings
- Inventory management
- Order tracking
- Email notifications
- Advanced admin dashboard