VC
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.
Viewing readonly version of main branch: v2View latest version
A modern inventory management system built with TypeScript, Hono backend, React frontend, and SQLite database.
- Available Stock: View current inventory levels
- Stock In: Record incoming inventory with multiple items per transaction
- Stock Out: Record outgoing inventory with multiple items per transaction
- Add Items: Create new inventory items
- Stock Reports: Detailed transaction history with search functionality
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema setup
│ │ └── queries.ts # Database query functions
│ ├── routes/
│ │ ├── items.ts # Item management routes
│ │ ├── stock.ts # Stock transaction routes
│ │ └── static.ts # Static file serving
│ └── index.ts # Main Hono app entry point
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main React application
│ │ ├── StockTable.tsx # Available stock display
│ │ ├── StockForm.tsx # Stock in/out forms
│ │ ├── AddItemForm.tsx # Add new item form
│ │ └── ReportTable.tsx # Transaction reports
│ ├── index.html # Main HTML template
│ └── index.tsx # React entry point
├── shared/
│ └── types.ts # Shared TypeScript interfaces
└── README.md
id: Primary keystock_item_name: Item namepart_no: Part number/codeunit: Unit of measurement (PCS, DOZEN, NOS)stock: Current stock quantity
id: Primary keydate: Transaction dateitem_name: Item nameqty: Quantity addedinvoice_type: Type of invoiceinvoice_no: Invoice numbersupplier_name: Supplier name
id: Primary keydate: Transaction dateitem_name: Item nameqty: Quantity removedinvoice_type: Type of invoiceinvoice_no: Invoice numbersupplier_name: Supplier/customer name
GET /api/items- Get all itemsPOST /api/items- Add new itemGET /api/stock-in- Get stock in transactionsPOST /api/stock-in- Record stock in transactionGET /api/stock-out- Get stock out transactionsPOST /api/stock-out- Record stock out transaction
The application uses:
- Backend: Hono framework with SQLite database
- Frontend: React with TypeScript and TailwindCSS
- Styling: Bootstrap-like styling with TailwindCSS
- State Management: React hooks for local state