All persistent state in the YUSEN LIMO Warehouse System is managed through named browser storage keys.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.
auth.js owns the authentication keys; app.js owns everything else. No server-side persistence is used — all data lives in the browser’s Local Storage (and, for one transient key, Session Storage).
Understanding these keys is essential when debugging unexpected UI state, building data export tools, or implementing a migration path to a backend database.
Key Reference
| Key | Storage Type | Value Type | Managed By | Description |
|---|---|---|---|---|
warehouseAuthAccounts | Local Storage | JSON string (array) | auth.js / AuthService | Array of all user account objects. Seeded with two default accounts if missing. |
warehouseAuthSession | Local Storage | JSON string (object) | auth.js / AuthService | Session for the currently logged-in user: userId, role, name, employeeId, position. Present only while logged in. |
warehouseShipments | Local Storage | JSON string (array) | app.js | All raw shipment records (inbound and outbound). Source of truth for inventory, activity, and dashboard data. |
warehouseProfile | Local Storage | JSON string (object) | app.js | Current user’s profile metadata: firstName, lastName, employeeId, position, email, phone. |
warehouseProfilePictures | Local Storage | JSON string (object) | app.js | Map of userId → base64 data URL. Each entry holds the profile picture for one user as a full data:image/...;base64,... string. |
warehouseNotificationState | Local Storage | JSON string (array) | app.js | Array of notification items with id, type, title, description, meta, time, and read boolean. Rebuilt from recent shipments each time the notification panel opens. |
sidebarCollapsed | Local Storage | string ('true' / 'false') | app.js | Stores the user’s sidebar expand/collapse preference. Read on every page load to restore the last-used layout state. |
warehouseLiveSearchSelection | Session Storage | JSON string (object) | app.js | Transient cross-page search value set when a user selects an item from the live search panel. Shape: { targetPage: 'inventory' | 'activity', value: string }. Consumed and removed immediately after the destination page loads. |
Key Details
warehouseAuthAccounts
Stores the complete account list managed by AuthService. The array is read on every AuthService method call and written back after any mutation (create, update, delete, reset password, toggle status).
If this key is missing or its value is an empty array, AuthService.initializeAuth() seeds it with the two default accounts (admin001 and emp001).
warehouseAuthSession
Written by AuthService.authenticateUser() on successful login and removed by AuthService.logout(). All page-load authentication guards call AuthService.isAuthenticated(), which reads this key.
warehouseShipments
The central data store for all warehouse transactions. Each array element is one raw shipment record (either inbound or outbound). Records are prepended (newest first) by the save shipment handler.
getStoredShipments() applies a migration pass on read to backfill missing releaseDate, releaseTime, releasePlate, and releaseDriver fields on older outbound records.
saveStoredShipments() always writes the full array and dispatches warehouse:data-updated to trigger UI refreshes.
warehouseProfile
Stores display-only profile metadata for the current user. Fields are merged with defaults on every write via saveStoredProfile(). The employeeId and position fields are overridden from the active AuthService session on each save to stay in sync with the auth account record.
warehouseProfilePictures
An object map where each key is a userId and each value is either a data:image/...;base64,... string or null. Storing images as base64 in Local Storage is convenient for a purely client-side system, but the encoded size is approximately 33 % larger than the original binary file.
warehouseNotificationState
An array of notification item objects built from the most recent shipments. The notification panel loads this state on open, marks items as read on interaction, and saves it back. It is rebuilt (not appended) each time new shipments are detected, so stale notifications are automatically replaced.
sidebarCollapsed
A simple boolean string: 'true' if the sidebar is collapsed, 'false' (or absent) if it is expanded. Read by app.js on DOMContentLoaded to restore the previous sidebar state. Written whenever the user clicks the sidebar toggle button.
warehouseLiveSearchSelection
A Session Storage key (not Local Storage) used for single-page-navigation state. When a user picks a result from the global live search panel on the dashboard, the system writes the target page and value to this key, then navigates to the appropriate page (inventory.html or the activity section of dashboard.html). The destination page reads and clears the key immediately on load, applying the value to its search input.
Inspecting Keys in the Browser Console
Use these snippets to inspect storage state during development or debugging:Resetting the App to Defaults
To wipe all warehouse data and return the system to its initial seeded state:- Open DevTools (
F12) → Application tab → Local Storage → select your origin. - Delete all keys that begin with
warehouse(warehouseAuthAccounts,warehouseAuthSession,warehouseShipments,warehouseProfile,warehouseProfilePictures,warehouseNotificationState). - Also delete
sidebarCollapsedif you want the sidebar preference reset. - Reload the page —
AuthService.initializeAuth()runs automatically and re-creates the two seeded accounts (admin001/Admin@123andemp001/Employee@123).
Session Storage (
warehouseLiveSearchSelection) is automatically cleared by the page that reads it, or when the browser tab/session is closed. You do not need to clear it manually during a factory reset.