export const API_BASE = 'http://localhost:3000'; export interface HealthResponse { status: string; version: string; } export interface Community { id: string; name: string; slug: string; description: string | null; created_at: string; } export interface User { id: string; username: string; email: string; display_name: string | null; created_at: string; } export async function getHealth(): Promise { const res = await fetch(`${API_BASE}/health`); return res.json(); } export async function getCommunities(): Promise { const res = await fetch(`${API_BASE}/api/communities`); return res.json(); } export async function getUsers(): Promise { const res = await fetch(`${API_BASE}/api/users`); return res.json(); }