This document provides a comprehensive overview of prompts.chat, an open-source prompt library platform that enables users to collect, organize, and share AI prompts across multiple AI models (ChatGPT, Claude, Gemini, Llama, Mistral, and others). This overview covers the platform's architecture, dual persistence model, core integrations, and configuration system.
For detailed information about specific subsystems, refer to:
prompts.chat is a Next.js-based web application that serves as a curated prompt library with the following characteristics:
| Characteristic | Description |
|---|---|
| License | CC0 1.0 Universal (Public Domain) |
| Primary Language | TypeScript with Next.js 14 (App Router) |
| Database | PostgreSQL with Prisma ORM |
| Authentication | NextAuth v5 (GitHub, Google, Apple, Azure AD, credentials) |
| Internationalization | 17 languages with RTL support |
| Deployment | Docker, Vercel, or self-hosted |
| API Protocols | REST API + MCP (Model Context Protocol) |
The platform supports five prompt types:
Sources: README.md1-67 prompts.config.ts1-92 src/lib/config/index.ts1-227
Key architectural decisions:
prompts.config.ts file controls all customizationSources: README.md1-242 src/components/layout/header.tsx1-673 src/lib/config/index.ts1-227
The platform implements a bidirectional sync between PostgreSQL (live data) and prompts.csv (git history) to achieve multiple goals:
Export process:
githubUsernameusername (if email ends with @unclaimed.prompts.chat)emailImport process:
role: ADMIN to trigger importisImported: true flag to distinguish imported promptsSources: src/app/prompts.csv/route.ts1-94 scripts/generate-contributors.sh1-431 src/components/admin/import-prompts.tsx1-222
The platform implements the Model Context Protocol for AI agent integration:
| Component | Path | Description |
|---|---|---|
| MCP Server | src/app/api/mcp | Handles MCP protocol requests |
| Tools | 10 registered tools | search_prompts, get_prompt, save_prompt, improve_prompt, etc. |
| Authentication | API key-based | Uses PROMPTS_API_KEY header |
| Capabilities | prompts/list, prompts/get | List and retrieve prompts |
Configuration example for VS Code/Cursor:
Sources: README.md138-163 packages/prompts.chat/README.md1-61
Command-line interface for browsing and executing prompts:
CLI capabilities:
Sources: packages/prompts.chat/README.md27-61
Platform-specific extensions for Chrome and Firefox:
| Browser | URL | Integration |
|---|---|---|
| Chrome | branding.chromeExtensionUrl | Context menu + sidebar |
| Firefox | Mozilla Addons | Firefox-specific package |
Extensions provide:
Sources: src/components/layout/header.tsx84-556 prompts.config.ts16-18
The platform uses a single configuration file (prompts.config.ts) with environment variable overrides:
| Section | Purpose | Key Fields |
|---|---|---|
| branding | Visual identity | name, logo, logoDark, description |
| theme | Design system | radius, variant, density, colors |
| auth | Authentication | providers[], allowRegistration |
| i18n | Languages | locales[], defaultLocale |
| features | Feature flags | privatePrompts, aiSearch, mcp, comments |
| homepage | Landing page | useCloneBranding, sponsors, achievements |
All configuration can be overridden at runtime using PCHAT_* environment variables:
This allows Docker deployments to customize without rebuilding:
Sources: prompts.config.ts1-92 src/lib/config/index.ts79-227
Platform supports 17 languages with full RTL support:
| Language Group | Locales | Special Support |
|---|---|---|
| Western | en, es, pt, fr, de, it, nl | LTR with Latin script |
| Asian | zh, ja, ko | LTR with CJK fonts |
| Middle Eastern | ar, fa, he | RTL with automatic dir attribute |
| Other | tr, az, ru, el | LTR with locale-specific fonts |
RTL language handling src/lib/i18n/config.ts8-14:
dir="rtl" attribute on <html> elementTranslation keys organized by domain:
nav.* - Navigation labelsprompts.* - Prompt managementadmin.* - Admin interfaceerrors.* - Error messagesfeed.* - Feed and discoverySources: src/lib/i18n/config.ts1-25 prompts.config.ts44-47
The platform supports three deployment models:
Quick start:
Features:
/dataDeployment:
Features:
Setup:
Requirements:
Sources: README.md100-129 SELF-HOSTING.md1-206
| Path | Purpose |
|---|---|
prompts.csv | Git-tracked prompt storage (3898.31 importance) |
PROMPTS.md | Human-readable prompt catalog (2448.53 importance) |
prompts.config.ts | Main configuration file (24.43 importance) |
scripts/generate-contributors.sh | CSV-to-git sync script (19.44 importance) |
src/app/prompts.csv/route.ts | CSV export API endpoint (5.96 importance) |
src/lib/config/index.ts | Configuration loader (8.14 importance) |
src/lib/i18n/config.ts | I18n configuration (4.61 importance) |
src/components/layout/header.tsx | Main navigation (29.58 importance) |
Sources: prompts.csv1-10 PROMPTS.md1-100 prompts.config.ts1-92 scripts/generate-contributors.sh1-431
This overview provides the foundation for understanding prompts.chat's architecture. For detailed information about specific subsystems, refer to the section-specific wiki pages listed at the beginning of this document.
Refresh this wiki
This wiki was recently refreshed. Please wait 1 day to refresh again.