Implementation

1. Implementation

1.1 Application Architecture

I built the dashboard as a Vue 3 and TypeScript single-page application using Vite. Vue Router controls navigation, Pinia manages authentication and feature flag state, TanStack Vue Query coordinates cache-related request state, and Axios handles HTTP access. SCSS and the internal WestJet component library provide the visual foundation.

The application is organized into the following layers:

Layer

Responsibility

Implemented result

Views and components

Operator workflows, validation, dialogs, results, and feedback

Administrators can inspect formatted cache data, select refresh operations, and review feature flag changes before saving.

Services

Endpoint selection, request construction, response validation, and error translation

Requests target the selected environment, returned data is validated, and failures produce readable feedback.

Stores

Current identity, client capabilities, staged configuration, and save state

The interface reflects the user’s role, tracks staged flag changes, and restores its previous state after a failed save.

Routing and lifecycle

Protected navigation, inactivity handling, and cross-tab session coordination

Dashboard routes require a valid client session; inactivity ends the session, and logout is coordinated across browser tabs.

1.2 Redis Cache Lookup and Refresh

I implemented cache lookup through DPS endpoints, with a service layer that prepares the returned data for display. Content fragment lookup uses a hosted list of keys. Partner-session lookup uses a hosted partner list and validates the partner, nine-digit WestJet ID, and thirty-two-character hexadecimal identifier before requesting a result.

Environment selectors begin without a selection, requiring an explicit operator choice. Production cache lookup and refresh are disabled in the current client. The selected environment appears in lookup results and refresh confirmation, reducing ambiguity when working across development, QA, and staging.

Successful lookup results are displayed as formatted JSON and can be copied. The service also handles responses in which JSON has been stored as an encoded string. Changing lookup tabs clears the previous inputs and result so that unrelated data is not carried into a different workflow. Invalid input and request failures produce feedback instead of misleading result content.

Cache refresh is a separate write workflow. A user with the cache-management capability selects an environment and resource types, reviews the confirmation, and submits the request to DPS. The service checks the response for succeeded and failed resource types, and the view displays progress and success or error feedback.

1.3 Feature Flag Management

I implemented feature flag management across development, QA, staging, and production. The interface combines flag names across the configuration documents, displays them alphabetically, and provides name/description search and enabled/disabled filters. Status filtering uses the development environment’s flag state.

Users with flag-management capabilities can create flags, edit descriptions, and change environment-specific statuses. Toggle changes can be staged and reviewed through a JSON preview and confirmation before saving. The Pinia store maintains a baseline so that changed environments can be identified and written without replacing every document unnecessarily.

The feature flag service validates the expected object schema and sends the full updated JSON document to the configured Blob write endpoint using a PUT request. Multiple changed environments are saved concurrently. On a successful save, the store updates its baseline. On failure, it restores the previous interface state and exposes an error.

The rollback restores the previous interface state. Each environment document is written separately, so successful storage writes remain in place if another environment fails. Storage-level recovery and concurrent-edit protection are separate from this UI behaviour.

1.4 Authentication, Capabilities, and Session Lifecycle

I integrated the dashboard with the deployed Azure authentication function using the Basic Authentication contract documented in DPA-7549.[6] The service provides /login, /me, and /logout endpoints. The client stores the access token in localStorage, validates a saved token through /me, and uses the returned identity to determine the available actions. Current-user validation and logout send the Bearer token explicitly, and logout clears the local session.

Authenticated role

Cache lookup and flag viewing

Cache refresh

Feature flag writes

cache-admin

Available

Available

Unavailable

feature-flag-admin or ff-admin

Available

Unavailable

Available

admin

Available

Available

Available

Other authenticated roles

Available

Unavailable

Unavailable

I added route guards to require an authenticated session and capability checks to hide or disable write controls. The feature flag store also checks write permission before changing or saving state. A read-only notice identifies the user’s current access. The frontend handles these interface controls, while remote services are responsible for enforcing authorization on requests.

I implemented a fifteen-minute inactivity timeout with cross-tab session coordination. User activity updates a shared timestamp, activity in another tab extends the idle window, and logout clears the shared token so that other tabs return to login. Session checks also run when the document becomes visible. The inactivity timer operates independently of the authentication service’s token lifetime and does not refresh the access token.

1.5 Requirements and Delivered Results

The following summary connects the main requirements to the completed dashboard workflows. It focuses on the implemented frontend rather than repeating the full requirements list.

Requirement area

Delivered result

Authentication and sessions

The dashboard uses the deployed Basic Authentication function, restores the saved client session, and supports inactivity logout and cross-tab coordination.

Cache inspection and validation

Content fragment and partner-session lookups validate input, target the selected environment, display formatted JSON, and provide copying and error feedback.

Controlled cache refresh

Users with cache-management access select resource types and an environment, confirm the operation, and receive progress and outcome feedback.

Feature flag management

Users can search and filter flags, stage environment-specific changes, review JSON, confirm writes, and recover the previous UI state after a failed save.

Read-only and administrative access

Role-derived capabilities determine which write controls are available, while read-only users can inspect cache data and feature flags.

Additional flag workflows

Flag creation and editing extend the core toggle workflow. Permanent deletion and historical configuration restore are not implemented.

Quality assurance

All 170 automated tests passed, aggregate critical-path coverage exceeded eighty percent, type checking passed, and QA validated the Jira acceptance criteria.

Enterprise SSO and service-side security and auditing remained outside the capstone deliverables. The Basic Authentication integration and client-side controls reflect the revised implementation scope.

4.6 Workflow Walkthrough

The following figures use local Storybook demo states and mock data to illustrate the implemented interface. They do not display live customer data or service credentials.

Cache lookup

The user selects an environment and a content key, then runs the lookup. The result identifies the environment and presents formatted JSON with a copy control. The example shows the sample tiers content in Development.

Figure 3: Content fragment lookup and formatted JSON result using mock data.

Cache refresh confirmation

The user selects the environment and cache resource types before opening the confirmation dialog. The dialog identifies the target environment and allows the user to cancel or confirm. This example stops at confirmation; no live cache operation was submitted.

Feature flag review

The user stages a flag change for an environment and selects Save changes to review the JSON. The preview identifies the changed flag and environment before the user continues to confirmation. This example enables a sample flag in Development and stops at the preview without writing a configuration document.

Leave a Reply

Your email address will not be published. Required fields are marked *