Skip to content

AI 提示词管理与多模型对比平台:分类/标签、版本历史、导入导出,支持 OpenAI/Claude/Gemini/自定义 API | AI Prompt Management & Multi-Model Comparison Platform: Categories/Tags, Version History, Import/Export, Supports OpenAI/Claude/Gemini/Custom APIs

License

Notifications You must be signed in to change notification settings

XimilalaXiang/PromptManager

Repository files navigation

🚀 Prompt Manager Web

Next.js TypeScript Tailwind CSS Supabase License

一个功能强大的 AI 提示词管理与多模型对比平台

English | 中文


中文

✨ 功能特性

📝 提示词管理

  • 系统提示词 & 用户提示词 - 分类管理不同类型的提示词
  • 分类与标签 - 灵活的组织方式,快速查找和筛选
  • 版本历史 - 追踪提示词的每次修改,支持版本回滚
  • 收藏功能 - 快速访问常用提示词
  • 导入/导出 - 支持 JSON 和 Markdown 格式的批量导入导出

🤖 多模型对比

  • 多轮对话 - 与多个 AI 模型同时进行多轮对话
  • 并行响应 - 同时获取多个模型的响应,直观对比效果
  • 流式输出 - 实时显示 AI 生成过程
  • AI 自动评分 - 使用 AI 自动评估响应质量(准确性、相关性、清晰度等)
  • 手动评分 - 支持手动为每个模型响应打分和添加备注

📚 知识库

  • 文章管理 - 收集和管理参考资料、最佳实践
  • 分类归档 - 系统化整理知识内容
  • 阅读时间估算 - 自动计算文章阅读时间
  • 收藏与归档 - 灵活的内容组织方式

⚙️ AI 配置

  • 多提供商支持 - OpenAI、Claude、Gemini 及自定义 OpenAI 兼容 API
  • 多模型配置 - 每个配置可设置多个模型
  • 参数调节 - Temperature、Top-P、Max Tokens 等参数可调
  • 配置导入导出 - 快速迁移和备份 AI 配置

🎨 用户体验

  • 深色/浅色主题 - 支持主题切换
  • 响应式设计 - 适配桌面和移动设备
  • 隐藏式导航栏 - 最大化内容展示区域
  • 简洁的认证系统 - 基于应用密钥的轻量级认证

🛠️ 技术栈

类别 技术
框架 Next.js 15 (App Router)
语言 TypeScript
样式 Tailwind CSS 4.0
UI 组件 Radix UI + shadcn/ui
数据库 Supabase (PostgreSQL)
状态管理 React Hooks
图标 Lucide React
Markdown react-markdown + react-syntax-highlighter

📦 快速开始

前置要求

  • Node.js 18.0+
  • pnpm (推荐) 或 npm/yarn
  • Supabase 账户

安装步骤

  1. 克隆项目
git clone https://github.com/XimilalaXiang/prompt-manager-web.git
cd prompt-manager-web
  1. 安装依赖
pnpm install
  1. 配置环境变量

创建 .env.local 文件:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
  1. 初始化数据库

在 Supabase SQL Editor 中依次执行 scripts/ 目录下的 SQL 文件:

001_create_tables.sql
003_update_ai_configs_for_multiple_models.sql
004_make_prompt_id_nullable.sql
005_add_model_name_to_prompt_results.sql
006_add_system_prompt_support.sql
007_add_conversation_support.sql
009_add_model_parameters_to_conversations.sql
010_create_knowledge_articles_table.sql
  1. 启动开发服务器
pnpm dev

访问 http://localhost:3000 开始使用。

📁 项目结构

prompt-manager-web/
├── app/                    # Next.js App Router 页面
│   ├── compare/           # AI 多模型对比页面
│   ├── dashboard/         # 仪表板
│   ├── knowledge/         # 知识库管理
│   ├── login/             # 登录页面
│   ├── prompts/           # 提示词管理
│   ├── results/           # 对比结果历史
│   ├── settings/          # 设置页面
│   └── setup/             # 初始化设置
├── components/            # React 组件
│   ├── ui/               # 基础 UI 组件 (shadcn/ui)
│   └── ...               # 业务组件
├── lib/                   # 工具库
│   ├── ai-service.ts     # AI API 调用服务
│   ├── ai-rating.ts      # AI 响应评分服务
│   ├── auth.ts           # 认证相关
│   ├── import-export.ts  # 导入导出功能
│   ├── supabase/         # Supabase 客户端
│   ├── types.ts          # TypeScript 类型定义
│   └── utils.ts          # 工具函数
├── hooks/                 # 自定义 React Hooks
├── scripts/               # 数据库迁移脚本
├── public/                # 静态资源
└── styles/                # 全局样式

🔧 配置说明

AI 提供商配置

提供商 API 端点 说明
OpenAI https://api.openai.com/v1/chat/completions GPT-4, GPT-3.5-turbo 等
Claude https://api.anthropic.com/v1/messages Claude 3 系列
Gemini https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent Gemini Pro 等
Custom 自定义端点 任何 OpenAI 兼容 API

🤝 贡献指南

我们欢迎所有形式的贡献!

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 创建 Pull Request

📄 许可证

本项目采用 MIT 许可证 - 详见 LICENSE 文件


English

✨ Features

📝 Prompt Management

  • System & User Prompts - Manage different types of prompts separately
  • Categories & Tags - Flexible organization for quick search and filtering
  • Version History - Track every modification with rollback support
  • Favorites - Quick access to frequently used prompts
  • Import/Export - Batch import/export in JSON and Markdown formats

🤖 Multi-Model Comparison

  • Multi-turn Conversations - Chat with multiple AI models simultaneously
  • Parallel Responses - Get responses from multiple models at once
  • Streaming Output - Real-time display of AI generation process
  • AI Auto-Rating - Automatic quality evaluation (accuracy, relevance, clarity, etc.)
  • Manual Rating - Rate and annotate each model's response

📚 Knowledge Base

  • Article Management - Collect and manage references and best practices
  • Categorization - Systematic content organization
  • Reading Time Estimation - Automatic calculation of reading time
  • Favorites & Archives - Flexible content organization

⚙️ AI Configuration

  • Multi-Provider Support - OpenAI, Claude, Gemini, and custom OpenAI-compatible APIs
  • Multi-Model Config - Configure multiple models per provider
  • Parameter Tuning - Adjustable Temperature, Top-P, Max Tokens
  • Config Import/Export - Quick migration and backup

🛠️ Tech Stack

Category Technology
Framework Next.js 15 (App Router)
Language TypeScript
Styling Tailwind CSS 4.0
UI Components Radix UI + shadcn/ui
Database Supabase (PostgreSQL)
State React Hooks
Icons Lucide React
Markdown react-markdown + react-syntax-highlighter

📦 Quick Start

Prerequisites

  • Node.js 18.0+
  • pnpm (recommended) or npm/yarn
  • Supabase account

Installation

  1. Clone the repository
git clone https://github.com/XimilalaXiang/prompt-manager-web.git
cd prompt-manager-web
  1. Install dependencies
pnpm install
  1. Configure environment variables

Create .env.local:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
  1. Initialize database

Execute SQL files in scripts/ directory in Supabase SQL Editor.

  1. Start development server
pnpm dev

Visit http://localhost:3000 to start using.

📄 License

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


Made with ❤️ by XimilalaXiang

⭐ Star this repo if you find it helpful!

About

AI 提示词管理与多模型对比平台:分类/标签、版本历史、导入导出,支持 OpenAI/Claude/Gemini/自定义 API | AI Prompt Management & Multi-Model Comparison Platform: Categories/Tags, Version History, Import/Export, Supports OpenAI/Claude/Gemini/Custom APIs

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages