Project Overview

The web app requires sales/users to log in before use. However, in practice, users often remain logged in for much longer than expected. This creates several problems:

  1. Security risk. The website is publicly accessible on the internet. If a logged-in session is left open for hours, especially on a shared or public computer, it could allow unauthorized users to modify order data or trigger false formal emails to clients.
  2. Misleading UI/UX observations. Long-lived sessions distort usage metrics, especially form completion time. Some orders may appear to take an unusually long time to complete because users leave the page open, not because the website design or workflow is actually inefficient.

Goal and Limitation

  1. Automatically log users out when the 1-hour session limit is reached.
  2. Reduce unnecessary cross-department communication as much as possible.
  3. Instead of only asking users to follow the rules, provide a backup mechanism that fits their actual workflow.

Solutions

  1. To keep the workflow practical and reduce communication overhead, I did not simply apply a hard logout cutoff. Instead, when a session times out, the system saves the unfinished order as a draft and sends an email with the order code so the user can resume editing later.
  2. I created a separate database schema for drafts. Formal orders and timeout drafts are stored separately.
  3. The login page now has three entry points:
    • New Order: Create a new order. Once submitted, it is saved to the formal schema.
    • Load Old Order: Restore an existing submitted order from the formal schema using the order code.
    • Load Draft: Restore an unfinished draft from the draft schema using the order code.
  4. If a session times out, the current content is saved to the draft schema. If a draft with the same order code already exists, it is overwritten.
  5. If the user submits the form, the content is saved to the formal schema. If a formal order with the same order code already exists, it is overwritten.
  6. The same order code can exist in both schemas, with at most one record in each schema. Together, they represent the same logical order: one formal version and, if present, one draft version.
  7. The dashboard only reads from the formal schema, so draft records do not affect order statistics or rankings.
← Back to projects