A modern React web application built with **TanStack Start**, providing a full-stack solution for data analytics, AI-powered chat interfaces, and business intelligence dashboards.
- **Routing**: TanStack Router with file-based routing
- **State Management**: TanStack Query for server state, TanStack Store for client state
- **Styling**: TailwindCSS with custom design system
- **UI Components**: Radix UI primitives with custom components loosely based on ShadCN.
- **Rich Text**: Plate.js editor
- **Deployment**: Cloudflare Workers via Wrangler (github action based)
## Source Directory Structure
### `/api/`
API client layer and data fetching utilities:
- **`asset_interfaces/`** - Type definitions for asset-related API interfaces (slowly depricating as we are moving to @buster-server/shared; We should NOT be creating additional things)
- **`auth_helpers/`** - Authentication utilities and helpers (cookies, expirations, etc.)
- **`buster_rest/`** - REST API client functions and endpoints
- **`buster-electric/`** - Electric SQL real-time sync client
- **`query_keys/`** - TanStack Query key factories for caching
- **`server-functions/`** - Server-side function definitions that are build on tanstack start
### `/assets/`
Static assets and media files:
- **`png/`** - PNG images, GIFs, and icons
- **`svg/`** - SVG components and utilities
### `/components/`
React component library:
- **`features/`** - Feature-specific components (components that require server integration, or other feature specific stuff)
- **`ui/`** - Reusable UI primitives and design system components (loosely built on shadcn, but kinda not)
### `/config/`
Application configuration:
- Development settings, external routes, and language configurations
### `/context/`
React Context providers AND local store for global state:
- **`BlackBox/`** - BlackBox messaging and store functionality
- **`BusterAssets/`** - Asset management state
- **`BusterNotifications/`** - Notification system and confirm modals
- **`BusterStyles/`** - Theme and styling providers
- **`Chats/`** - Chat application state
- **`Dashboards/`** - Dashboard state management
- **`GlobalStore/`** - Global application state (modals, etc.)
- **`Metrics/`** - Metrics and analytics state
- **`Posthog/`** - PostHog analytics provider
- **`Query/`** - React Query provider (kinda of depricated)
- **`Reports/`** - Report management state
- **`Routes/`** - Routing utilities and helpers
- **`Supabase/`** - Database connection context
- **`Themes/`** - Theme operations and palette management
- **`Users/`** - User-related context and state
- **`Providers.tsx`** - Root provider composition
### `/controllers/`
Page-level controllers that orchestrate data fetching and business logic: