Documentation Index
Fetch the complete documentation index at: https://mintlify.com/raceliciouss/YUSEN-LIMO-WAREHOUSE/llms.txt
Use this file to discover all available pages before exploring further.
All persistent data in YUSEN LIMO Warehouse lives exclusively in the browser’s localStorage (and, for one cross-page signal, sessionStorage). There is no remote database or server-side session store — the browser tab is the entire persistence layer. Understanding the keys and object shapes below is essential for debugging state issues, writing data migration scripts, or extending the system with new features.
Storage Keys
| Key | Storage Type | Value Type | Description |
|---|
warehouseAuthAccounts | localStorage | JSON array | All registered user account objects |
warehouseAuthSession | localStorage | JSON object | The current logged-in session record |
warehouseShipments | localStorage | JSON array | Every inbound and outbound shipment record |
warehouseProfile | localStorage | JSON object | Current user’s editable profile metadata |
warehouseProfilePictures | localStorage | JSON object | Map of userId → Base64 image data URL |
warehouseNotificationState | localStorage | JSON array | Notifications derived from recent shipments with read/unread state |
sidebarCollapsed | localStorage | Boolean string ("true" / "false") | Sidebar collapse preference, persisted across page loads |
warehouseLiveSearchSelection | sessionStorage | JSON object | Temporary cross-page payload carrying the selected search value and target page |
These keys are declared as constants in their respective source files. warehouseShipments is referenced by the constant STORAGE_KEY in assets/app.js. warehouseAuthAccounts and warehouseAuthSession are referenced by AUTH_STORAGE_KEY and SESSION_STORAGE_KEY respectively in assets/auth.js.
User Account Object
User accounts are stored as an array under warehouseAuthAccounts. Each element represents one registered user. The auth.js module is the sole writer for this key; app.js reads it only for display in the user management table.
{
"userId": "admin001",
"password": "Admin@123",
"role": "admin",
"name": "Juan Cruz",
"employeeId": "ADM-001",
"position": "Administrator",
"status": "active",
"lastLogin": "2024-06-01T08:00:00.000Z",
"createdAt": "2024-01-01T00:00:00.000Z"
}
| Field | Type | Notes |
|---|
userId | string | Unique identifier; also used as the username for login |
password | string | Stored in plaintext — see Migration Path for hashing guidance |
role | string | "admin" or "employee"; controls UI feature visibility |
name | string | Full display name shown in the topbar and user table |
employeeId | string | Human-readable employee identifier, e.g. "ADM-001" |
position | string | Job title, e.g. "Administrator" |
status | string | "active" or "inactive"; inactive accounts cannot log in |
lastLogin | string | ISO 8601 timestamp, updated on each successful login |
createdAt | string | ISO 8601 timestamp set when the account is first created |
Shipment Record Object
Shipments are stored as a flat array under warehouseShipments. Each element is a single transaction event — either an inbound receipt or an outbound release. The entryType field distinguishes them. Multiple records can share the same hawb or mawb value; aggregateShipmentsByReference() in app.js groups them at read-time to produce inventory rows.
getStoredShipments() reads this key and applies a one-time migration pass: if an outbound record is missing its releaseDate, releaseTime, releasePlate, or releaseDriver fields (old data format), those are backfilled from the top-level date, time, plateNo, and driver fields and written back to storage automatically.
saveStoredShipments() writes the entire array back and dispatches a warehouse:data-updated event on window so any live listener (e.g. the notification panel) can refresh.
{
"client": "Acme Corporation",
"destination": "Manila Warehouse A",
"hawb": "HAWB-20240601-001",
"mawb": "MAWB-YL-2024-888",
"invoice": "INV-2024-005",
"transactionType": "Import",
"location": "Bay 3",
"status": "received",
"entryType": "inbound",
"savedAt": 1717228800000,
"date": "2024-06-01",
"time": "09:30",
"receivedBy": "Joseph Dela Cruz",
"plateNo": "ABC-1234",
"trucker": "FastFreight Inc.",
"driver": "Mark Santos",
"cargoCondition": "Good",
"releaseDate": null,
"releaseTime": null,
"releasePlate": null,
"releaseDriver": null,
"releaseQty": null,
"remarks": null,
"quantity": 50,
"unit": "boxes",
"qtyIn": 50,
"qtyOut": 0
}
| Field | Type | Notes |
|---|
client | string | Client or consignee name |
destination | string | Delivery destination label |
hawb | string | House Air Waybill number; used as the primary grouping key if present |
mawb | string | Master Air Waybill number; used as the grouping key when hawb is absent |
invoice | string | Commercial invoice reference |
transactionType | string | "Import" or "Export" |
location | string | Bay or storage location within the warehouse |
status | string | Human-readable status label, e.g. "received" |
entryType | string | "inbound" or "outbound"; determines how the record is counted in aggregation |
savedAt | number | Unix timestamp (milliseconds) when the record was saved; used for sorting and “latest record wins” merge logic |
date | string | ISO date string (YYYY-MM-DD) of the transaction |
time | string | 24-hour time string (HH:MM) of the transaction |
receivedBy | string | Name of the staff member who recorded the inbound |
plateNo | string | Vehicle plate number at the time of receipt |
trucker | string | Trucking company name |
driver | string | Driver name |
cargoCondition | string | Condition of cargo at receipt, e.g. "Good" or "Damaged" |
releaseDate | string | null | Date of outbound release; null for inbound-only records |
releaseTime | string | null | Time of outbound release |
releasePlate | string | null | Plate number of the releasing vehicle |
releaseDriver | string | null | Driver for the release trip |
releaseQty | number | null | Quantity released in this outbound event |
remarks | string | null | Free-text notes |
quantity | number | Declared quantity at the time of entry |
unit | string | Unit of measure, e.g. "boxes", "pallets" |
qtyIn | number | Inbound quantity for this record; summed across all inbound records for the same reference |
qtyOut | number | Outbound quantity for this record; summed across all outbound records for the same reference |
Profile Object
The current user’s editable profile metadata is stored under warehouseProfile. This key is written by the profile page when the user saves their information. It is read to populate the profile form and the topbar display name. It is distinct from the account object in warehouseAuthAccounts — edits here do not propagate back to the auth store.
{
"firstName": "Juan",
"lastName": "Cruz",
"employeeId": "ADM-001",
"position": "Administrator",
"email": "admin@yusen.ph",
"phone": "+63-912-345-6789",
"username": "admin001"
}
| Field | Type | Notes |
|---|
firstName | string | Given name |
lastName | string | Family name |
employeeId | string | Employee ID, mirrored from the account record at profile creation |
position | string | Job title |
email | string | Contact email address |
phone | string | Contact phone number |
username | string | Login username (userId), stored here for display convenience |
Notification Object
warehouseNotificationState holds a JSON array of notification items. The array is rebuilt from the six most recent shipment records each time new data is saved, then merged with the existing state to preserve read flags. Each element has the following shape:
{
"id": "notif-001",
"type": "inbound",
"title": "Inbound Shipment Recorded",
"description": "HAWB-20240601-001 received at Bay 3",
"meta": { "hawb": "HAWB-20240601-001" },
"time": "2024-06-01T09:30:00.000Z",
"read": false
}
| Field | Type | Notes |
|---|
id | string | Unique identifier for this notification |
type | string | "inbound", "outbound", "status", "inventory", "warning", or "shipment" — controls the icon shown |
title | string | Short headline for the notification card |
description | string | One-line summary referencing the HAWB, MAWB, or client |
meta | object | Additional context; typically contains hawb or mawb for linking |
time | string | ISO 8601 timestamp shown in the notification panel |
read | boolean | false until the user opens the notification panel; badge count reflects unread total |
Relationships Between Keys
- Shipments and inventory: Raw records in
warehouseShipments are never stored in aggregated form. aggregateShipmentsByReference() groups them by hawb (preferred) or mawb at read-time. Inventory rows, activity rows, and dashboard statistics are all derived from this on-the-fly aggregation.
- Users and shipments: User account data in
warehouseAuthAccounts is entirely separate from shipment records. Shipments carry receivedBy as a free-text name string — there is no foreign key relationship to a userId.
- Profile pictures and profile metadata:
warehouseProfilePictures is keyed by userId (e.g. { "admin001": "data:image/png;base64,..." }) and is read and written independently of warehouseProfile. Deleting the profile metadata does not remove the stored picture, and vice versa.
- Session and accounts:
warehouseAuthSession holds a single object representing the currently active login. It references the authenticated user by userId, which can be used to look up the full account record from warehouseAuthAccounts when needed.