Skip to Content
HomeLink Hub
Tenant Web App

Tenant Web App

How the public, tenant-facing HomeLink Hub web app is put together, with a map of every route and the navigation that ties the pages together.

The tenant web app (app/ in the workspace) is the public site at the root domain. Visitors browse and search listings without an account; signing in unlocks tour requests, payment requests, escrow, wishlist, messages and account settings. Landlords and agents do not list here: every "List your property" link opens the separate agent dashboard (client app) in a new tab.

It is a single-page app built with React 19, Vite, react-router (createBrowserRouter), Redux Toolkit with RTK Query, Socket.IO and shadcn UI. In production a small Node server (app/server) serves the built files and adds link previews, see Link previews.

Where it lives

Routes are declared in src/routes/router.tsx, which mounts four route groups.

RouteView / component fileAccessCovered in
/src/views/landing/index.tsxpublicLanding pages
/how-it-workssrc/views/landing/how-it-works.tsxpublicLanding pages
/featuredsrc/views/landing/featured.tsxpublicLanding pages
/aboutsrc/views/landing/about.tsxpublicLanding pages
/careerssrc/views/landing/careers.tsxpublicLanding pages
/pricingsrc/views/landing/pricing.tsxpublicLanding pages
/mobile-appsrc/views/landing/mobile-app.tsxpublicLanding pages
/supportsrc/views/landing/app-support.tsxpublicLanding pages
/become-an-agentsrc/views/landing/become-an-agent.tsxpublicLanding pages
/privacy-policysrc/views/landing/privacy-policy.tsxpublicLanding pages
/termssrc/views/landing/terms-and-condition.tsxpublicLanding pages
/helpsrc/views/landing/help.tsxpublicHelp centre
/help/category/:categorySlugsrc/views/landing/help-category.tsxpublicHelp centre
/help/article/:articleSlugsrc/views/landing/help-article-detail.tsxpublicHelp centre
/auth/signinsrc/components/login-form.tsxpublicSign up and sign in
/auth/signupsrc/views/auth/signup.tsxpublicSign up and sign in
/auth/forgot-passwordsrc/components/auth/forgot-password-form.tsxpublicSign up and sign in
/auth/check-emailsrc/components/auth/check-email.tsxpublicSign up and sign in
/auth/verify-emailsrc/components/auth/verify-mail.tsxpublic (email link)Sign up and sign in
/auth/reset-passwordsrc/components/auth/new-password.tsxpublic (email link)Sign up and sign in
/auth/reset-successsrc/components/auth/reset-success.tsxpublicSign up and sign in
/auth/google/callbacksrc/views/auth/google-callback.tsxpublic (Google redirect)Sign up and sign in
/appsrc/views/app/index.tsxpublicSearch and browse
/app/searchsrc/views/app/search-results.tsxpublicSearch and browse
/app/property/:idsrc/views/app/property-detail-view.tsxpublic, actions need sign-inProperty details
/app/inspectionssrc/views/app/inspections.tsxsigned-inTour requests and inspection payment
/app/inspections/verifysrc/views/app/inspection-payment-verify.tsxsigned-in (Paystack redirect)Tour requests and inspection payment
/app/property/:id/escrowsrc/views/app/escrow-payment-status.tsxsigned-inBooking and escrow payment
/app/property/:id/escrow/:escrowTxIdsrc/views/app/escrow-payment-status.tsxsigned-inBooking and escrow payment
/app/property/:id/escrow/successsrc/views/app/escrow-payment-success.tsxsigned-inBooking and escrow payment
/app/escrowssrc/views/app/escrow-transactions.tsxsigned-inBooking and escrow payment
/payment/completesrc/views/payment-complete.tsxpublic (checkout redirect)Booking and escrow payment
/app/wishlistsrc/views/app/wishlist.tsxsigned-inWishlist
/app/property/:id/messagesrc/views/app/message-agent.tsxsigned-inMessages
/app/notificationssrc/views/app/notifications.tsxsigned-inNotifications
/app/accountsrc/views/app/account.tsxsigned-inAccount and settings
/app/propertiessrc/views/app/my-properties.tsxsigned-inWallet and My Properties
/app/walletsrc/views/app/wallet.tsxsigned-inWallet and My Properties

Layouts (src/components/layout/):

LayoutRoutesWhat it adds
public-layout.tsx/ and the marketing pagesNavbar, footer, auth modal, scroll restoration
auth-layout.tsx/auth/*Two-column page: photo panel with headline on large screens, form on the right. No navbar
app-layout.tsx/app/*Navbar, footer, auth modal, scroll restoration, and the first-visit app tour
none/payment/completeStandalone page, no navbar

Signed-in is not enforced by the router

There are no route guards. "Signed-in" in the table means the page only works with a session: a signed-out visitor can still open the URL, and the page then shows its own error or empty state, or is bounced to /auth/signin if the API answers 401 with a token message.

Before you start

How a session is held (see src/hooks/storage.ts, src/services/auth/):

WhereKeyHolds
sessionStoragetokenAccess token (JSON-encoded). Gone when the tab closes
localStoragerefreshTokenRefresh token
localStorageuserThe signed-in user object (name, email, avatar)
localStoragenotificationsNotifications received over the socket
localStoragehl_tours_seenWhich users have seen the app tour
localStoragevite-ui-themeLight or dark theme choice
Redux auth sliceuser, token, authView, authModalOpenLive session state; useIsLoggedIn() reads auth.token

API access:

  • All REST paths are under /api/v1 on the API origin (from the build environment).
  • Auth calls use an axios instance (src/config/axios.ts). Everything else uses RTK Query APIs built with createBaseQuery (src/config/base-query.ts): propertyApi, userApi, chatApi, wishlistApi, paymentApi, settingsApi, calendarApi. Both attach Authorization: Bearer with the stored token.
  • Realtime uses one shared Socket.IO connection to the API origin (src/services/chat/socket.service.ts), authenticated with the same token, with up to 5 reconnection attempts 2 seconds apart.

Flow

  1. At the top of a page the navbar is one wide pill: logo (links to /), centre tabs Homes (/), Shortlets (/app/search?type=SHORTLET), Featured (/featured) and How it works (/how-it-works, extra-wide screens only), then List your property (opens the agent dashboard sign-up in a new tab), the theme toggle and the account menu button.
  2. After scrolling 24px the bar splits into separate pills and a compact search pill appears reading Anywhere, Any type, Any budget (or the current search criteria from the URL).
  3. Clicking the compact pill (or the search icon on phones) opens a panel titled Where would you like to live? containing the same search form as the home hero. It closes on Escape, on the close button, on a click outside, or once the page scrolls more than 120px.
  4. The account menu shows Sign up, Log in, the List your property card, any tabs hidden at the current width, and Help Center. Sign up and Log in open the auth modal over the current page.
  1. The logo links to /app and the centre tabs are hidden.
  2. A search box with the placeholder Search by title... submits to /app/search?title=.... Its clear button empties the box and goes to /app/search.
  3. A filter button (hidden on / and /app) opens Filter Properties: type pills (All, Apartment, House, Villa, Land, Commercial, Shortlet, Office), Max Price (₦), Location, and Bedrooms (hidden for Land and Office). Search goes to /app/search with type, price, location and rooms query params.
  4. The bell shows the unread count from localStorage (capped at 99+). Clicking it marks every stored notification as read and opens /app/notifications.
  5. The account menu shows the user's name and email, then My Properties, Wishlist, Inspections, Escrow Transactions, Wallet, Account, Replay App Tour (inside /app/* only), List your property, Help Center and Logout.

Mobile menu

Below the md breakpoint the account button opens a right-hand drawer titled Menu. Signed in, it holds the title search, the Filter Properties fields, Notifications, the profile links, Replay App Tour, List your property, a Dark mode / Light mode row and Logout. Signed out, it holds the browse tabs, the List your property card, Sign up, Log in, Help Center and the theme row.

Three link columns: Platform (How it works, Pricing, Property Search to /app, Become an Agent), Company (About, Pricing & Fees, Careers) and Support (Help Center, Mobile App, Privacy, Terms). The Facebook icon links to # and the ENGLISH (US) and NGN (₦) labels are static text.

First-visit app tour

src/components/tour/ runs a spotlight walkthrough the first time a signed-in user lands on exactly /app.

  1. It starts about 0.9 seconds after the page loads, once the hero search is on screen (it retries up to 15 times, 300ms apart).
  2. Steps, in order: Find your next home (hero search), Browse your way (view toggles), Narrow it down (Filters button), Stay in the loop (bell), Your account (account menu) and, on phones, Everything in one menu (menu button). A step whose target is not visible at the current screen size is left out.
  3. The card shows Step N of M with Skip tour, Back and Next; the last step's button reads Get started. Escape skips; the arrow keys move between steps. The page underneath cannot be clicked while it runs.
  4. Finishing or skipping writes tenant:USER_ID to hl_tours_seen in localStorage, so it does not run again for that user in that browser. Signing out does not clear it.
  5. Replay App Tour in the account menu navigates to /app and runs it again.

Theme

The sun/moon button toggles light and dark mode (default light) and stores the choice in localStorage.

States and edge cases

  • Pre-loader. Every full page load shows a branded splash ("HomeLink Hub", "Finding your perfect home…") for a fixed 2 seconds before the router renders.
  • Expired or invalid session. Any API response with status 401 whose message contains "token" clears the Redux session, removes token, refreshToken and user from storage and hard-redirects to /auth/signin. There is no silent token refresh: a refreshToken thunk exists (POST /api/v1/auth/refresh-token) but nothing calls it.
  • Closing the tab. The access token lives in sessionStorage, so a new tab or window starts signed out even though user is still in localStorage.
  • Unknown URLs and crashes. src/views/error-view.tsx shows "Oops! Something went wrong" with Go to Homepage and Refresh Page, and adds a noindex robots tag.
  • Toasts appear top-right (sonner).

Token format differs between the two API clients

The token is stored JSON-encoded. RTK Query parses it before use, but the axios request interceptor reads the raw sessionStorage value, so axios calls made while signed in (in practice only sign-out) send the token wrapped in quotes. Check sign-out against the backend when testing.

On this page