Architecture and concepts for the FindU partner dashboard
src/ ├── components/ # Reusable UI components │ ├── ui/ # Base shadcn/ui components │ └── custom/ # App-specific components ├── features/ # Feature-based organization ├── hooks/ # Custom React hooks ├── lib/ # Utilities and helpers └── types/ # TypeScript definitions
features/ ├── campaigns/ │ ├── campaigns.tsx # Main page │ ├── studenttable.tsx # Data table │ ├── studentfilters.tsx # Filter UI │ └── types.ts # Types
// Feature component with data fetching export function CampaignsPage() { const { data, loading } = useCampaigns(); if (loading) return <LoadingState />; return ( <PageLayout> <StudentTable data={data} /> </PageLayout> ); }
// Shared data logic export function useCampaigns() { const [data, setData] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { fetchCampaigns().then(setData); }, []); return { data, loading }; }