Frontend

One React Codebase, Two Products, Three Platforms

Section 2 of 5

Both consumer products are React 18 and TypeScript applications built with Vite and styled with Tailwind. They share a component foundation, an authentication stack, a routing shape and a deployment pattern — and then diverge into genuinely different products, one a map-and-list activity finder, the other a chat-first assistant that also ships as an Android application.

The engineering interest in this layer is not the component library. It is in four decisions: how the route tree is structured so that authentication, layout and product surface compose rather than tangle; how server state is kept out of a global store; how one Docker image is promoted across every environment without a rebuild; and how the Android application avoids being a second codebase.

105

TypeScript modules in the web client

20+

routes across nested route groups

3

authentication providers supported

1

codebase shipping web and Android

Frontend Architecture

The application is organised in layers that mirror how a request to render actually flows: providers wrap the router, the router composes guarded and unguarded branches, and the feature modules underneath talk to the API through a single typed service layer rather than calling it directly.

Provider ShellAuthContext · HeaderContext · Google OAuth · reCAPTCHA · Sentry boundaryRouter — react-router-dom v6 nested route treePublic Branch/auth/* · legal · help · waitlistGuarded Layout Branchexplore · map · venue · lists · notes · account · chatShared Component Librarygrouped by domain — Search, Map, List/Card, Category, Notification, Input, LayoutTyped API Service Layeraxios clients · token attachment · response typing · runtime base URL

Design Decisions

The route tree has three levels that each do one job. The outermost split separates the public branch — sign-in, sign-up, legal pages, help pages, the waitlist — from the application branch. The application branch renders through a Layout route that owns the header, navigation and footer, so every screen inside it inherits the chrome without importing it. Inside that, feature groups like explore/* nest their own sub-routes for results, venue detail and gallery views.

The practical payoff is that authentication is expressed once as a guard wrapping a branch, rather than as a check repeated in twenty screen components. Adding a protected screen means adding one route inside the guarded branch; it cannot accidentally ship unguarded, because there is nowhere to put it that skips the guard.

Venue detail is reachable from several entry points — explore results, map pins, saved listings — so it is declared at more than one position in the tree with a shared component and an optional route parameter, which keeps deep links stable and back-navigation correct regardless of how the user arrived.

Runtime Configuration Injection

How one built artifact serves every environment. The image is never rebuilt between staging and production — only the environment it is started with changes.

Cloud BuildCloud Runcontainer startEntrypointenv-config.shBrowserone image, pushed oncestart with this environment's variableswrite env-config.js into served directoryserve index.html + env-config.jsread configat runtimesame artifact in staging and production — the environment is the only variable