Skip to content

Frontend Overview

The Verifluence frontend is a React + TypeScript SPA built with Vite, styled with Tailwind CSS v4, and componentised with Flowbite React.

Tech Stack

TechnologyVersionPurpose
React19UI framework
TypeScript~5.9Type safety
Vite7Build tool and dev server
Tailwind CSSv4Utility-first styling (@import "tailwindcss")
Flowbite React^0.12Component library (Button, Badge, Alert, Spinner, Table, Modal, …)
flowbite-react-icons^1.3Icon set (imported directly, e.g. ArrowRight, CheckCircle)
React Routerv7Client-side routing (nested layout routes)
ethers.jsBlockchain interaction (MetaMask wallet)

Monorepo layout

frontend/         main React app
apps/storybook/   isolated Storybook 8 workspace (MSW, mock auth)

Page Structure

Routes are split into three layout groups:

Public / auth routes

RouteFileWho sees it
/pages/HomeLanding.tsxEveryone
/campaignspages/Home2.tsxEveryone
/campaign/:idpages/CampaignDetail.tsxEveryone
/streamer-signuppages/StreamerSignup2.tsxNew streamers
/signin2pages/SignIn.tsxEveryone
/s/:usernamepages/StreamerPublicProfile.tsxEveryone
/streamerspages/StreamersList.tsxOperators
/trust-scorepages/TrustScore.tsxAuthenticated streamers
/entrypages/Entry.tsxInvited operators
/auth/impersonatepages/AuthImpersonate.tsxAdmin
/adminpages/AdminPage.tsxAdmin

Streamer dashboard — ProfileLayout

Sidebar nav: Dashboard · Personal · Wallet · KYC · Applications · Campaigns · Streams

RouteFile
/profile/dashboardpages/streamer/DashboardPage.tsx
/profile/personalpages/streamer/PersonalPage.tsx
/profile/walletpages/streamer/WalletPage.tsx
/profile/kycpages/streamer/KycPage.tsx
/profile/applicationspages/streamer/ApplicationsPage.tsx
/profile/campaignspages/streamer/CampaignsPage.tsx
/profile/streamspages/streamer/StreamsPage.tsx
/profile/offerspages/streamer/OffersPage.tsx
/profile/negotiationspages/streamer/NegotiationsPage.tsx
/profile/dealspages/streamer/DealsPage.tsx

Operator dashboard — OperatorLayout

Sidebar nav: Account · Wallet · Campaigns · Active · Offers · Negotiations · Deals

RouteFile
/operator/accountpages/operator/AccountPage.tsx
/operator/walletpages/operator/WalletPage.tsx
/operator/campaignspages/operator/CampaignsPage.tsx
/operator/activepages/operator/ActivePage.tsx
/operator/offerspages/operator/OffersPage.tsx
/operator/negotiationspages/operator/NegotiationsPage.tsx
/operator/dealspages/operator/DealsPage.tsx

Key Components

ComponentPurpose
SiteNavPublic top nav — handles auth state, sign-out, mobile menu
AppFooterSite footer
CampaignCardPublicCampaign card for unauthenticated / public views
CampaignCardVerifiedCampaign card for authenticated streamers with apply state
StatusBadgeReusable status pill (type="campaign" or "deal" etc.)
FundDonutDonut chart — rewarded / escrowed / refunded / unallocated
FundCampaignPanelOn-chain escrow deposit flow
InviteCampaignModalOperator modal to invite a streamer to a campaign
NegTermEditorNegotiation terms editor (5-field bilateral form)
StreamerAvatarAvatar with Kick image / initials fallback

Context Providers

ContextPurpose
AuthContextAuthentication state, sign-in/out, impersonation bridge
NetworkContextEVM network config from .env (chain, RPC, tokens, explorer)

Styling conventions

All colours come from the token system — never hardcode hex values.

ts
import { T } from "../theme/tokens";          // pages/
import { T } from "../../theme/tokens";       // pages/operator/, components/, etc.

Tailwind v4 semantic classes use CSS custom property syntax:

tsx
<p className="text-(--color-body)">…</p>
<div className="bg-(--color-brand-soft) border-(--color-brand-subtle)">…</div>

See Design Tokens for the full token reference.

Verifluence Documentation