Brew Digital collaborated with TAG’s technical and marketing teams to architect, engineer and launch a purpose-built partner portal. Rather than introducing another disparate software tool, we integrated the new portal directly into TAG’s existing monorepo web architecture—a tried and tested approach that already powers many of the websites in the group.
Integrating into the shared monorepo architecture
Bringing the application into the existing software stack allowed the portal the inherit pre-existing design token, UI components, and accessibility standards from the outset. This shared ecosystem additionally ensures that any global codebase improvements, bug fixes, or performance enhancements flow across all of TAG’s digital properties simultaneously.
Multi-tiered authentication and granular permissions with Clerk
To resolve TAG’s governance challenges, we deployed Clerk as the core identity provider, engineering a bespoke permission hierarchy tailored to complex B2B partner relationships:
Corporate domain authentication: Partner accounts are provisioned via the CMS and locked to verify corporate domains. This centralised approach prevents unauthorised account sharing, increases account security, and ensures sensitive commercial collateral remains strictly within the intended business ecosystem.
Inclusion and exclusion logic: Resources can be assigned to broad partner tiers while enforcing strict exclusion groups (such as competitor classifications) that override general access rules automatically.
Company-level targeting: Permissions can be dialed down to specific organisations, allowing TAG to build dedicated collateral hubs accessible only to an individual partner company.
Interface-wide gating: Permission rules dynamically control visibility across top-level navigation, footers, individual page modules, and sitewide search results, ensuring unauthenticated users see no trace of restricted content.
Server-side rendering for real-time security
While public marketing pages across TAG’s estate utilise static generation for speed, secure multi-tenant portals require live permission evaluation. We engineered the portal using Server-Side Rendering (SSR). Every incoming request authenticates user sessions live on the server before serving HTML. To offset server latency and ensure crisp page loads, we leveraged AI code analysis tools during development to stress-test nested permission trees and resolve server-side edge cases ahead of launch.
Content agility and dynamic branding in Sanity
We established an intuitive content environment within Sanity, giving TAG’s content editors full autonomy over site structure, documentation updates, and module-level permission assignments. Additionally, we introduced dynamic sub-brand theming, enabling editors to adjust accent colours and call-to-action styling to reflect specific business units while maintaining global header and footer consistency.