Skip to content

A cross-platform AI chat desktop client (macOS first) built with Tauri + React + TypeScript + Tailwind. Lightweight, fast startup, and privacy-friendly

License

Notifications You must be signed in to change notification settings

TaylorChen/prism-ai

Repository files navigation

Prism AI

A cross-platform AI chat desktop client (macOS first) built with Tauri + React + TypeScript + Tailwind. Lightweight, fast startup, and privacy-friendly.

Features

  • Multi-provider aggregation with unified interface
    • OpenAI, DeepSeek, Qwen (DashScope), Gemini (Google), Zhipu (GLM), Ollama (local)
  • Streaming chat UI with markdown/GFM and math (KaTeX) rendering
  • Session management: create, rename, delete, persist history (SQLite on Tauri, localStorage on Web)
  • Safe API key storage: macOS Keychain via Tauri backend; Web falls back to localStorage
  • Export conversation to Markdown (Web download or Tauri save dialog)
  • Resizable two-pane layout: left settings/sessions, right conversation

Screenshots (WIP)

  • Left: settings and sessions; Right: conversation with streaming responses
  • Light theme by default; Tailwind-based design system

Getting Started

Prerequisites:

  • Node.js 18+
  • Rust toolchain (for Tauri): rustup default stable

Install and run (Web only):

npm install
npm run dev

Run desktop app (Tauri dev):

npm run tauri:dev

Build production bundles:

npm run build          # Web build
npm run tauri:build    # Desktop build
\# macOS specific
npm run tauri:build:mac:arm64     # Apple Silicon
npm run tauri:build:mac:x64       # Intel
npm run tauri:build:mac:universal # Universal binary (if supported)
./scripts/build-macos.sh arm64|x64|universal

Configuration

Set API keys in the in-app Settings dialog (left sidebar → Settings):

  • OpenAI: openai
  • DeepSeek: deepseek
  • Qwen (DashScope): qwen
  • Gemini (Google): gemini
  • Zhipu (GLM): zhipu

Ollama requires a local server at http://localhost:11434 (no API key).

Architecture

  • Frontend: React + Vite + Tailwind + Zustand
  • Desktop shell: Tauri v2
    • Plugins: SQL (SQLite), Keychain (via keyring), FS, Dialog, Log
  • Data persistence:
    • Tauri: SQLite (via tauri-plugin-sql)
    • Web fallback: localStorage
  • Markdown: react-markdown + remark-gfm + rehype-katex

Key Files

  • src/components/ChatView.tsx: streaming chat UI, provider/model switch, export
  • src/services/providers/*: provider adapters (OpenAI, DeepSeek, Qwen, Gemini, Ollama, Zhipu)
  • src/services/db.ts: SQLite + localStorage fallback for messages
  • src/stores/chat.ts: session/messages store (Zustand)
  • src/services/secure.ts: API key storage (Tauri Keychain or localStorage)
  • src/services/export.ts: export conversations as Markdown (Web/Tauri)

Roadmap

  • More providers (Anthropic, Azure OpenAI, Baidu, iFlytek, Moonshot)
  • Prompt templates, roles, batch tools, usage metrics
  • Search across sessions, import/export sessions
  • Plugin system and automation workflows

License

MIT License. See LICENSE for details.

About

A cross-platform AI chat desktop client (macOS first) built with Tauri + React + TypeScript + Tailwind. Lightweight, fast startup, and privacy-friendly

Resources

License

Stars

Watchers

Forks

Packages

No packages published