$ account Niek
ChatGPT-web is a Svelte 5 single-page application (with a Tauri desktop wrapper) that provides a configurable chat interface for multiple large language model (LLM) providers, including OpenAI, Anthropic, xAI, Google Gemini, Mistral, APIpie, OpenRouter, OrcaRouter, and custom endpoints. The system handles streaming and non-streaming chat completions, image generation, token counting, pricing estimation, chat profiles with system prompt injection, and export/import of conversations. All chat history and settings are stored client-side in localStorage and IndexedDB, making it a private, self-contained frontend. The architecture is a client-only SPA with no backend; it relies entirely on browser fetch calls to provider APIs. The codebase demonstrates a clear separation of concerns between UI components (Svelte), state management (local storage stores), provider abstractions (provider definitions, request classes), and utility modules (token counting, image caching, settings schema). However, it shows signs of organic growth with tight coupling between modules, frequent `any` type casts, and comments referencing desired refactors. The bundled prompts CSV from the awesome-chatgpt-prompts project serves as a built-in prompt library. The project is suitable for developers wanting a customizable, private, multi-provider chat frontend, but reusing individual components requires careful extraction due to internal dependencies.