Skip to main content

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

KeyStorage TypeValue TypeDescription
warehouseAuthAccountslocalStorageJSON arrayAll registered user account objects
warehouseAuthSessionlocalStorageJSON objectThe current logged-in session record
warehouseShipmentslocalStorageJSON arrayEvery inbound and outbound shipment record
warehouseProfilelocalStorageJSON objectCurrent user’s editable profile metadata
warehouseProfilePictureslocalStorageJSON objectMap of userId → Base64 image data URL
warehouseNotificationStatelocalStorageJSON arrayNotifications derived from recent shipments with read/unread state
sidebarCollapsedlocalStorageBoolean string ("true" / "false")Sidebar collapse preference, persisted across page loads
warehouseLiveSearchSelectionsessionStorageJSON objectTemporary 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"
}
FieldTypeNotes
userIdstringUnique identifier; also used as the username for login
passwordstringStored in plaintext — see Migration Path for hashing guidance
rolestring"admin" or "employee"; controls UI feature visibility
namestringFull display name shown in the topbar and user table
employeeIdstringHuman-readable employee identifier, e.g. "ADM-001"
positionstringJob title, e.g. "Administrator"
statusstring"active" or "inactive"; inactive accounts cannot log in
lastLoginstringISO 8601 timestamp, updated on each successful login
createdAtstringISO 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
}
FieldTypeNotes
clientstringClient or consignee name
destinationstringDelivery destination label
hawbstringHouse Air Waybill number; used as the primary grouping key if present
mawbstringMaster Air Waybill number; used as the grouping key when hawb is absent
invoicestringCommercial invoice reference
transactionTypestring"Import" or "Export"
locationstringBay or storage location within the warehouse
statusstringHuman-readable status label, e.g. "received"
entryTypestring"inbound" or "outbound"; determines how the record is counted in aggregation
savedAtnumberUnix timestamp (milliseconds) when the record was saved; used for sorting and “latest record wins” merge logic
datestringISO date string (YYYY-MM-DD) of the transaction
timestring24-hour time string (HH:MM) of the transaction
receivedBystringName of the staff member who recorded the inbound
plateNostringVehicle plate number at the time of receipt
truckerstringTrucking company name
driverstringDriver name
cargoConditionstringCondition of cargo at receipt, e.g. "Good" or "Damaged"
releaseDatestring | nullDate of outbound release; null for inbound-only records
releaseTimestring | nullTime of outbound release
releasePlatestring | nullPlate number of the releasing vehicle
releaseDriverstring | nullDriver for the release trip
releaseQtynumber | nullQuantity released in this outbound event
remarksstring | nullFree-text notes
quantitynumberDeclared quantity at the time of entry
unitstringUnit of measure, e.g. "boxes", "pallets"
qtyInnumberInbound quantity for this record; summed across all inbound records for the same reference
qtyOutnumberOutbound 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"
}
FieldTypeNotes
firstNamestringGiven name
lastNamestringFamily name
employeeIdstringEmployee ID, mirrored from the account record at profile creation
positionstringJob title
emailstringContact email address
phonestringContact phone number
usernamestringLogin 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
}
FieldTypeNotes
idstringUnique identifier for this notification
typestring"inbound", "outbound", "status", "inventory", "warning", or "shipment" — controls the icon shown
titlestringShort headline for the notification card
descriptionstringOne-line summary referencing the HAWB, MAWB, or client
metaobjectAdditional context; typically contains hawb or mawb for linking
timestringISO 8601 timestamp shown in the notification panel
readbooleanfalse 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.

Build docs developers (and LLMs) love