Architecture

Adapter System

DevConsole is built on a modular architecture using the Adapter Pattern. This allows the toolkit to integrate with any authentication provider, state manager, or storage system by simply providing the correct interface.

Adapters act as bridges between the DevConsole UI and your application's internal systems. By default, the toolkit comes with generic adapters for standard web APIs, but you can provide custom ones for better integration.

AuthAdapter

Connects to your auth provider (Supabase, Clerk, Firebase, etc.). Allows the toolkit to display user info and manage tokens.

tsx
interface AuthAdapter {
  user: UserDetails | null;
  isAuthenticated: boolean;
  logout: () => void;
  refresh: () => Promise;
}

QueryClientAdapter

Integrates with data fetching libraries. The React Query adapter is included by default.

tsx
interface QueryClientAdapter {
  getQueryData: (queryKey: any[]) => any;
  invalidateQueries: (filters?: any) => Promise;
  refetchQueries: (filters?: any) => Promise;
}