Products are automatically scoped to your tenant. You will only ever see products that belong to your account.
Product data model
TheProduct model in the database schema:
Inventory record and can have many StockMovement records over its lifetime.
Product interface
The frontend represents a product with the following TypeScript interface, sourced fromapp/products/page.tsx:
Viewing products
Navigate to Products in the sidebar. The page loads your full product list in a table with columns for Product Name, SKU, Price, Quantity, and Actions. Products are fetched from the API on page load:localStorage and sent in the Authorization header on every request. The backend filters results by tenantId extracted from the token.
Adding a product
Open the add product form
Click the Add Product button in the top-right corner of the Products page. A form appears above the product table.
Fill in the product details
Complete the required fields:
- Product Name — a descriptive name for the item
- SKU — a unique stock-keeping unit identifier
- Price — the unit price as a decimal number
Deleting a product
In the Actions column of the product table, click Delete next to the product you want to remove. This sends aDELETE request to /api/products/:id. The product list refreshes automatically after deletion.
API reference
| Method | Endpoint | Description |
|---|---|---|
GET | /api/products | List all products for your tenant |
POST | /api/products | Create a new product |
PUT | /api/products/:id | Update an existing product |
DELETE | /api/products/:id | Delete a product |
Authorization: Bearer <token> header.