Files
Timmy-time-dashboard/mobile-app/lib/_core/theme.ts
Alexander Whitestone 5e60a6453b feat: wire mobile app to real Timmy backend via JSON REST API (#73)
Add /api/chat, /api/upload, and /api/chat/history endpoints to the
FastAPI dashboard so the Expo mobile app talks directly to Timmy's
brain (Ollama) instead of a non-existent Node.js server.

Backend:
- New src/dashboard/routes/chat_api.py with 4 endpoints
- Mount /uploads/ for serving chat attachments
- Same context injection and session management as HTMX chat

Mobile app fixes:
- Point API base URL at port 8000 (FastAPI) instead of 3000
- Create lib/_core/theme.ts (was referenced but never created)
- Fix shared/types.ts (remove broken drizzle/errors re-exports)
- Remove broken server/chat.ts and 1,235-line template README
- Clean package.json (remove express, mysql2, drizzle, tRPC deps)
- Remove debug console.log from theme-provider

Tests: 13 new tests covering all API endpoints (all passing).

https://claude.ai/code/session_01XqErDoh2rVsPY8oTj21Lz2

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-26 23:58:53 -05:00

57 lines
1.4 KiB
TypeScript

/**
* Core theme definitions — dark arcane palette matching the Timmy Time dashboard.
*
* All color tokens are defined here; constants/theme.ts re-exports them.
*/
export type ColorScheme = "light" | "dark";
export interface ThemeColorPalette {
primary: string;
background: string;
surface: string;
foreground: string;
muted: string;
border: string;
success: string;
warning: string;
error: string;
}
/** Per-scheme flat color maps (used by NativeWind vars & ThemeProvider). */
export const SchemeColors: Record<ColorScheme, ThemeColorPalette> = {
light: {
primary: "#a855f7",
background: "#080412",
surface: "#110820",
foreground: "#ede0ff",
muted: "#6b4a8a",
border: "#3b1a5c",
success: "#00e87a",
warning: "#ffb800",
error: "#ff4455",
},
dark: {
primary: "#a855f7",
background: "#080412",
surface: "#110820",
foreground: "#ede0ff",
muted: "#6b4a8a",
border: "#3b1a5c",
success: "#00e87a",
warning: "#ffb800",
error: "#ff4455",
},
};
/** Alias used by useColors() hook — keyed by scheme. */
export const Colors = SchemeColors;
export const ThemeColors = SchemeColors;
export const Fonts = {
regular: { fontFamily: "System", fontWeight: "400" as const },
medium: { fontFamily: "System", fontWeight: "500" as const },
bold: { fontFamily: "System", fontWeight: "700" as const },
};