The frontend uses shadcn/ui components with Tailwind CSS styling.
Component organization
App Shell
Directory: components/app-shell/
AppShell
Main layout wrapper providing:
- Collapsible sidebar
- Header with user menu
- Notification bell
- Global search
Navigation sidebar with:
- Role-based menu items
- Collapsible groups
- Active state indicators
Navigation items
File: nav-items.ts
Bell icon with notification dropdown:
- Unread count badge
- Notification list
- Mark as read actions
- Real-time updates
RealtimeSubscriptions
Global WebSocket subscriptions:
- Notification channel
- Query invalidation on updates
UI Primitives
Directory: components/ui/
shadcn/ui components customized for EVO:
Combobox
Required for brand selection. Never use plain <Select> for brands. Always use <Combobox> with search.
SilentErrorBoundary
Wraps non-critical widgets:
Catches errors without crashing the page.
Team components
Directory: components/team/
BrandPicker
Searchable brand selector:
- Combobox interface
- Recent brands
- All brands search
CreatorCard
Creator display card:
- Avatar
- Name and tier
- Metrics summary
- Action buttons
MetricCard
Metric display with:
- Label
- Value
- Trend indicator
- Sparkline (optional)
Creator components
Directory: components/creator/
DealCard
Brand deal display:
- Gamified design
- Prize podium
- Platform logos
- Apply button
BrandHubCard
Brand hub entry card:
- Brand logo
- Progress bar
- Quick stats
TierBadge
Creator tier indicator:
- Galaxy, Moonwalker, Rocket, Beginner
- Color-coded
- Icon variants
Strategy components
Directory: components/strategy/
StrategyDocument
Renders strategy content:
- Markdown parsing
- Embedded media
- Section navigation
StrategyEditor
WYSIWYG editor for strategies:
- Rich text editing
- Image upload
- Preview mode
Metrics components
Directory: components/metrics/
Chart
Recharts wrapper:
- Line charts
- Bar charts
- Area charts
- Consistent styling
MetricsOverview
Dashboard metrics display:
- Key metric tiles
- Time period selection
- Platform breakdown
Styling patterns
Tailwind utilities
CSS variables
Theme colors in globals.css:
Dark mode
CSS variables swap for dark mode:
Conventions
- Use
cn() for class merging
- Prefer composition over configuration
- Colocate route components in
_components/
- Wrap non-critical widgets in error boundaries