Public
Like
helton
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.
index.ts
https://helton_munee--1f481b943fad11f08ae576b3cceeab13.web.val.run
A comprehensive inventory tracking and stock movement control system for wholesale businesses.
- Product Management: Add, edit, and categorize products
- Stock Movement Tracking: Record inbound/outbound stock movements
- Inventory Control: Real-time stock levels and low stock alerts
- Supplier Management: Track supplier information and purchase orders
- Reports: Stock movement history and inventory reports
- Dashboard: Overview of key metrics and alerts
βββ backend/
β βββ database/
β β βββ migrations.ts # Database schema setup
β β βββ queries.ts # Database query functions
β βββ routes/
β β βββ products.ts # Product CRUD operations
β β βββ movements.ts # Stock movement operations
β β βββ suppliers.ts # Supplier management
β β βββ static.ts # Static file serving
β βββ index.ts # Main Hono app entry point
βββ frontend/
β βββ components/
β β βββ App.tsx # Main React app
β β βββ Dashboard.tsx # Dashboard overview
β β βββ ProductList.tsx # Product management
β β βββ StockMovements.tsx # Stock movement tracking
β β βββ Reports.tsx # Reporting interface
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend entry point
βββ shared/
βββ types.ts # Shared TypeScript types
- The app will automatically set up the database on first run
- Navigate to the main URL to access the dashboard
- Start by adding products and suppliers
- Record stock movements as inventory changes
- Monitor stock levels and generate reports
GET /api/products
- List all productsPOST /api/products
- Create new productPUT /api/products/:id
- Update productDELETE /api/products/:id
- Delete productGET /api/movements
- List stock movementsPOST /api/movements
- Record stock movementGET /api/suppliers
- List suppliersPOST /api/suppliers
- Create supplierGET /api/dashboard
- Dashboard data
- products: Product information and current stock levels
- suppliers: Supplier contact and details
- stock_movements: All inbound/outbound stock transactions
- categories: Product categorization