Sponsored by Deepsite.site

Y Gui

Created By
luohy159 months ago
A web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Content

y-gui ๐Ÿš€

A web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.

โœจ Features

  • ๐Ÿ’ฌ Interactive chat interface with AI models
  • ๐Ÿค– Support for multiple bot configurations (any base_url/api_key/model combination)
  • ๐Ÿ”— MCP (Model Context Protocol) client support with multiple server configurations
  • ๐Ÿ”’ Secure authentication with Auth0 and Google login
  • ๐ŸŒ“ Dark/light theme support
  • ๐Ÿ“ All chat data stored in Cloudflare KV/R2 for easy access and sync
  • ๐Ÿ”„ Real-time updates with SWR
  • ๐Ÿ“ฑ Responsive design for all devices

Demo

chat history

Architecture

y-gui consists of two main components:

  1. Frontend: React application with TypeScript, Tailwind CSS, and SWR for data fetching
  2. Backend: Cloudflare Workers with KV and R2 storage
flowchart TD
    Client[React Client] --> Worker[Cloudflare Worker]
    Worker --> KV[Cloudflare KV]
    Worker --> R2[Cloudflare R2]
    Worker --> AI[AI Providers]

    subgraph "Frontend"
        Client --> Components[React Components]
        Components --> State[SWR State]
        State --> API[API Layer]
    end

    subgraph "Backend"
        Worker --> Auth[Auth Middleware]
        Worker --> Storage[Storage Layer]
        Worker --> Provider[Provider Layer]
    end

โšก Quick Start

Prerequisites

  1. Node.js and npm
  2. Cloudflare account
  3. Auth0 account
  4. API keys for AI providers

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/y-gui.git
    cd y-gui
    
  2. Install dependencies:

    npm install
    
  3. Configure environment variables:

    • Create a .env file in the frontend directory with Auth0 configuration
    • Configure Cloudflare Worker settings in wrangler.toml
  4. Start the development server:

    npm run dev
    

๐Ÿ› ๏ธ Development

Project Structure

y-gui/
โ”œโ”€โ”€ frontend/               # React frontend application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/     # React components
โ”‚   โ”‚   โ”œโ”€โ”€ contexts/       # React contexts
โ”‚   โ”‚   โ”œโ”€โ”€ utils/          # Utility functions
โ”‚   โ”‚   โ””โ”€โ”€ index.tsx       # Entry point
โ”œโ”€โ”€ backend/                # Cloudflare Worker backend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ api/            # API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/     # Middleware
โ”‚   โ”‚   โ”œโ”€โ”€ repository/     # Data access
โ”‚   โ”‚   โ””โ”€โ”€ index.ts        # Worker entry
โ”œโ”€โ”€ shared/                 # Shared code between frontend and backend
โ”‚   โ””โ”€โ”€ types/              # TypeScript type definitions
โ””โ”€โ”€ memory-bank/            # Project documentation

Available Scripts

  • npm run dev: Start both frontend and backend development servers
  • npm run dev:frontend: Start only the frontend development server
  • npm run dev:backend: Start only the backend development server
  • npm run build: Build both frontend and backend
  • npm run deploy: Deploy the backend to Cloudflare Workers
  • npm run test: Run tests

๐Ÿ”’ Authentication

y-gui uses Auth0 for authentication with the following features:

  • Universal Login
  • Google social login
  • Token-based session management
  • Secure API access

๐Ÿค– Bot Configuration

y-gui supports multiple bot configurations with the following properties:

  • Name
  • Model
  • Base URL
  • API Key
  • Print Speed
  • MCP Servers
  • API Type
  • Custom API Path
  • Max Tokens
  • Reasoning Effort

๐Ÿ”— MCP Server Configuration

MCP (Model Context Protocol) servers can be configured with:

  • Name
  • Command
  • Arguments
  • Environment Variables
  • URL
  • Token

๐ŸŒ API Endpoints

The backend provides RESTful API endpoints for:

  • Chat operations
  • Bot configuration management
  • MCP server configuration management
  • Authentication

๐Ÿ”„ Data Storage

  • Chat data is stored in Cloudflare KV
  • Backup data is stored in Cloudflare R2
  • Bot and MCP server configurations are stored in Cloudflare R2

๐Ÿงฉ Technologies Used

  • Frontend: React, TypeScript, Tailwind CSS, SWR, Auth0
  • Backend: Cloudflare Workers, KV, R2
  • Build Tools: Vite, Wrangler, TypeScript

๐Ÿ“š Documentation

For more detailed documentation, see the memory-bank directory.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Recommend Clients
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BACHAI-TWITTER-API45Twitter็š„ไธ€ไบ›api mcp
CursorThe AI Code Editor
Roo Code (prev. Roo Cline)Roo Code (prev. Roo Cline) gives you a whole dev team of AI agents in your code editor.
Continueโฉ Create, share, and use custom AI code assistants with our open-source IDE extensions and hub of models, rules, prompts, docs, and other building blocks
HyperChatHyperChat is a Chat client that strives for openness, utilizing APIs from various LLMs to achieve the best Chat experience, as well as implementing productivity tools through the MCP protocol.
y-cli ๐Ÿš€A Tiny Terminal Chat App for AI Models with MCP Client Support
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbotโ„ข
Cline โ€“ #1 on OpenRouterAutonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
MCP ConnectEnables cloud-based AI services to access local Stdio based MCP servers via HTTP requests
LutraLutra is the first MCP compatible client built for everyone
Refact.aiOpen-source AI Agent for VS Code and JetBrains that autonomously solves coding tasks end-to-end.
WindsurfThe new purpose-built IDE to harness magic
Cherry Studio๐Ÿ’ Cherry Studio is a desktop client that supports for multiple LLM providers.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
MCP PlaygroundCall MCP Server Tools Online
A Sleek AI Assistant & MCP Client5ire is a cross-platform desktop AI assistant, MCP client. It compatible with major service providers, supports local knowledge base and tools via model context protocol servers .
ZedCode at the speed of thought โ€“ Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
chatmcpChatMCP is an AI chat client implementing the Model Context Protocol (MCP).