# Old TIAR UI Inventory

Baseline source: `tiar-charging-app`.

This inventory records the existing customer-facing UI, browser routes, user actions, and major frontend modules to preserve during the migration to `tiar-webapp`.

## Scope

- Preserve the existing customer-facing visual design and browser routes where possible.
- Preserve behavior, loading states, error states, redirects, and responsive desktop/mobile behavior.
- Treat backend/API compatibility as a separate concern for the API comparison step.
- Exclude TailAdmin demo/admin pages from the first migration scope.

## Global application behavior

| Area | Existing behavior |
|---|---|
| Authentication guard | Unauthenticated users are redirected to `/signin`; authenticated users are redirected away from auth pages. |
| Token lifecycle | Access and refresh tokens are managed centrally; expired access tokens trigger refresh behavior. |
| Organization/branding | Organization code, logo, name, favicon, theme color, and feature flags affect the UI. |
| Responsive shell | Desktop top navigation and mobile header/bottom navigation are used for the customer app. |
| Theme | Light/dark theme toggle is available globally. |
| Notifications | Notification dropdown and browser notification permission flow are available globally. |
| Profile reminder | Incomplete profiles show a dismissible banner linking to `/onboarding`. |
| Feedback | Toasts, loading indicators, skeletons, empty states, and error/retry states are used throughout. |
| PWA | Manifest, install prompt, service worker, and mobile-app behavior are part of the application shell. |

## Authentication and onboarding pages

| Route | Feature/page | User actions | Primary frontend area |
|---|---|---|---|
| `/signin` | Sign in | Enter credentials, submit login, open sign-up, forgot password, accept terms, handle login errors. | `modules/authModule/signin` |
| `/signup` | Registration | Enter registration details, validate fields, submit sign-up, continue to email/OTP steps. | `modules/authModule/signup` |
| `/check-email` | Email check | Confirm email state and continue the registration flow. | `modules/authModule/check-email` |
| `/otp-verify` | OTP verification | Enter OTP, submit verification, request/resend OTP, handle expiry/errors. | `modules/authModule/otp` |
| `/verify-email` | Email verification | Process verification link/token and continue or show failure state. | `modules/authModule/verify-email` |
| `/signup/set-password` | Initial password setup | Enter and confirm password, submit account setup. | `modules/authModule/signup-set-password` |
| `/forgot-password` | Password reset request | Enter email, submit reset request, handle success/error. | `modules/authModule/forgot-password` |
| `/reset-password` | Password reset completion | Enter new password and confirmation, submit reset. | `modules/authModule/reset-password` |
| `/set-password` | Required password setup | Set a password when the authenticated account requires setup. | `modules/authModule/set-password` |
| `/onboarding` | Profile completion | Enter or update required profile information and save. | `components/auth/OnBoardingForm` |

## Charging and station pages

| Route | Feature/page | User actions | Primary frontend area |
|---|---|---|---|
| `/` | Home dashboard | View nearest station, latest news, available stations, recent sessions, and reservation summary; open linked details. | Home widgets, station/session/news modules |
| `/map` | Station map | View station markers, open station details, filter stations, locate nearest station, use desktop/mobile station drawers. | `modules/chargepointModule/map` |
| `/stations` | Station list | Search, filter by status/connector/power, clear filters, paginate/scroll, open station detail. | `modules/chargepointModule/list` |
| `/stations/[id]` | Station detail | View station and connector information, rates, live connector status, open directions, reserve a connector, start charging, handle login-required state. | `modules/chargepointModule/detail` |
| `/scan` | QR scanner | Scan with camera, upload a QR image, resolve the station/session, continue to the relevant flow. | `modules/sessionModule/qrScan` |
| `/sessions` | Session list | View session tabs/lists, session statistics, paginate/infinite-scroll, open session detail, view reservation-related session information. | `modules/sessionModule/list` |
| `/sessions/[id]` | Session detail | View live status, timer, energy/cost details, refresh stream state, stop charging, confirm stop, view receipt. | `modules/sessionModule/detail` |

## Wallet, payment, and transaction pages

| Route | Feature/page | User actions | Primary frontend area |
|---|---|---|---|
| `/wallet` | Wallet dashboard | View balance, refresh balance, view transaction history, open transaction detail, and start top-up. The repository also contains credit-card management components, but they are not wired into the active old-app route/flow. | `modules/walletModule` |
| `/topup` | Add wallet balance | Enter/select amount, choose payment method, confirm payment, handle payment-specific result/status screens. | `modules/topupModule` |
| `/transactions/[id]` | Transaction detail | View transaction status and details, follow payment status, return to wallet. | `modules/transactionModule` |
| `/wallet/withdrawals` | Withdraw funds | View available channels/accounts, validate withdrawal, request OTP, submit withdrawal, handle errors and confirmation. | `modules/withdrawalModule` |

### Top-up payment variants

The old UI contains separate flows/components for:

- Virtual account
- Over-the-counter payment
- QR payment
- E-wallet payment
- Credit-card payment
- PayPal payment integration
- Transaction status and redirect back to wallet/transaction detail

Each variant has its own confirmation, copy/download, close/cancel, and success/error behavior.

## Profile and account pages

| Route | Feature/page | User actions | Primary frontend area |
|---|---|---|---|
| `/profile` | Profile management | View and edit account information, address, and profile fields; save/reset changes. | `modules/profileModule` |
| `/profile` | Password management | Enter current/new password, show/hide fields, submit change, reset form. | `profileModule/components/ChangePasswordCard` |
| `/profile` | RFID management | Pair/add RFID, edit label, delete RFID, confirm destructive action, handle save/update errors. | `profileModule/sections/rfid` |
| `/profile` | Notification preferences | Toggle notification preference and handle save state. | `profileModule/sections/notifications` |
| Global user menu | Account navigation | Open profile, wallet, support, sign in, and log out. | `components/header/UserDropdown` |

## Content, support, and legal pages

| Route | Feature/page | User actions | Primary frontend area |
|---|---|---|---|
| `/news` | News list | Browse news cards and open an article. | `modules/newsModule/list` |
| `/news/[slug]` | News detail | Read article and navigate back/through related content. | `modules/newsModule/detail` |
| `/support` | Support center | Use quick actions, contact information, support resources, and FAQ accordion. | Support components and FAQ module |
| `/terms-and-conditions` | Terms and conditions | Read the latest organization-specific legal content. | Sanity content + `ArticleBody` |
| `/refund-policies` | Refund policy | Read the latest organization-specific refund policy. | Sanity content + `ArticleBody` |

## Primary navigation

### Desktop

- `/` — logo/home
- `/map` — Map
- `/stations` — Stations
- `/sessions` — Sessions
- `/scan` — Scan
- Theme toggle
- Notifications
- User menu

### Mobile

- `/map` — Map
- `/stations` — Stations
- `/sessions` — Sessions
- `/wallet` — Wallet
- Center scan action opening the QR scanner modal
- Theme toggle
- Notifications
- User menu

## Migration baseline acceptance criteria

The new frontend should be considered UI-compatible for a feature when:

1. The browser route is reachable at the same path unless a deliberate routing change is approved.
2. The page has the same primary layout, components, navigation, and responsive behavior.
3. The same user actions are available, including confirmation/cancel flows.
4. Loading, empty, error, retry, unauthorized, and success states are represented.
5. API differences are isolated in an adapter/service layer where possible.
6. Any intentional flow difference is recorded with a reason and minimal UI tweak.

## Explicitly out of first-scope migration

The old repository also contains TailAdmin sample/admin pages under `src/app/_private` and generic full-width demo/error pages. These should not be copied into the first customer-facing migration unless separately requested.
