Character Foundry is a React + TypeScript app for creating and versioning fictional character profiles, with optional AI-assisted generation (Gemini text/image/TTS) through Python API proxies.
This repository has been salvaged and stabilized. It is now a robust platform for AI character creation.
- Local character CRUD with automatic versioning.
- AI-powered generation using Gemini 3 series.
- Lore Memory (RAG): Characters remember their past evolutions via ChromaDB.
- Advanced TTS: Cloud synthesis (Google/Edge) and local voice cloning (Qwen3-TTS).
index.tsx,App.tsx: frontend entry + shellcomponents/: UI and feature componentsstore/: Zustand store and versioning logicservices/geminiService.ts: frontend API client for AI endpointsproxy.py: Flask API proxy for local developmentapi/**: serverless Python handlers for Vercel API routesdocs/: audit, verdict, issue backlog, and salvage plan
- Node.js 18+
- Python 3.8+
- pnpm (preferred; repo includes pnpm lockfile)
- uv for Python dependency management
Run these from the repo root:
pnpm install
uv syncCreate .env.local (frontend usage) or .env (python usage) with:
GEMINI_API_KEY=your_gemini_api_key
GOOGLE_TTS_API_KEY=your_google_or_gemini_key_optional
VITE_API_BASE_URL=http://localhost:49152GOOGLE_TTS_API_KEY falls back to GEMINI_API_KEY in Python routes.
VITE_API_BASE_URL is optional. Leave it unset for same-origin /api/* calls, or set it when running frontend and Flask proxy on different ports during local development.
npm run dev– run Vite frontendnpm run dev:api– run Flask proxy onhttp://localhost:49152npm run dev:full– run frontend + Flask proxy concurrentlynpm run build– production frontend buildnpm run preview– preview built frontendnpm run test– Vitestnpm run typecheck– TypeScript checksnpm run check– typecheck + testsnpm run check:py– Python API/proxy syntax checknpm run check:foundation– Python syntax check + frontend build
POST /api/gemini/generate(Text)POST /api/imagen/generate(Portraits)POST /api/tts/google(Native TTS)POST /api/tts/qwen(Voice Cloning)POST /api/memory/index(RAG Indexing)POST /api/memory/search(RAG Retrieval)
These can be served by proxy.py locally, or via api/** serverless handlers in deployment.
- This repo currently focuses on stabilization and cleanup; no scope expansion is planned during salvage.