• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dani786

dani786

VC

Public
Like
VC
Home
Code
3
backend
1
shared
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/29/2025
Viewing readonly version of main branch: v4
View latest version
README.md

Inventory Management System

A modern inventory management system built with TypeScript, Hono backend, React frontend, and SQLite database.

Features

  • 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

Project Structure

├── 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

Database Schema

Items Table

  • id: Primary key
  • stock_item_name: Item name
  • part_no: Part number/code
  • unit: Unit of measurement (PCS, DOZEN, NOS)
  • stock: Current stock quantity

Stock In Table

  • id: Primary key
  • date: Transaction date
  • item_name: Item name
  • qty: Quantity added
  • invoice_type: Type of invoice
  • invoice_no: Invoice number
  • supplier_name: Supplier name

Stock Out Table

  • id: Primary key
  • date: Transaction date
  • item_name: Item name
  • qty: Quantity removed
  • invoice_type: Type of invoice
  • invoice_no: Invoice number
  • supplier_name: Supplier/customer name

API Endpoints

  • GET /api/items - Get all items
  • POST /api/items - Add new item
  • GET /api/stock-in - Get stock in transactions
  • POST /api/stock-in - Record stock in transaction
  • GET /api/stock-out - Get stock out transactions
  • POST /api/stock-out - Record stock out transaction

Development

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
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.