prompts.chat is an open-source AI prompt library and management platform. Originally known as Awesome ChatGPT Prompts, it has evolved into a full-stack application built with Next.js 16, Prisma, and PostgreSQL. It serves as a central hub for discovering, testing, and sharing prompts for models like ChatGPT, Claude, Gemini, and Llama. README.md1-19
The system is designed with a unique dual-persistence architecture: it synchronizes live database records with a flat-file CSV and Markdown system for Git-based version control and community attribution. README.md59-68
prompts.csv. scripts/generate-contributors.sh1-13prompts.config.ts. prompts.config.ts6-67Co-authored-by trailer injection for community contributions. scripts/rebuild-history.sh88-98Sources: README.md1-19 README.md59-68 prompts.config.ts6-67 scripts/generate-contributors.sh1-13
The application follows a modern Next.js architecture utilizing Server Components for data fetching and a robust configuration layer that supports both build-time and runtime overrides.
This diagram maps the high-level system components to their corresponding code entities and data stores, bridging the gap between natural language concepts and the code.
Sources: src/app/prompts.csv/route.ts28-30 src/lib/config/index.ts168-176 src/lib/i18n/config.ts5-14 scripts/generate-contributors.sh12-17 src/components/layout/header.tsx111-122
A defining characteristic of prompts.chat is how it handles data. While the web application uses a relational database for performance and features (like search and user profiles), the repository maintains a flat-file version of the prompts for the open-source community. LICENSE1-12
The scripts/generate-contributors.sh and scripts/rebuild-history.sh utilities ensure that every prompt in the database is correctly attributed to its creator in the Git history.
| Component | Role | Logic Reference |
|---|---|---|
prompts.csv | Flat-file export of non-private prompts. | src/app/prompts.csv/route.ts30-35 |
PROMPTS.md | Human-readable Markdown version of the library. | PROMPTS.md1-15 |
getUserIdentifier | Resolves contributor ID (GitHub username or email). | src/app/prompts.csv/route.ts17-24 |
git_commit | Injects Co-authored-by trailers into Git. | scripts/generate-contributors.sh116-130 |
Sources: src/app/prompts.csv/route.ts63-81 scripts/generate-contributors.sh38-44 scripts/generate-contributors.sh108-114 scripts/rebuild-history.sh121-148
The system supports 17+ locales, including Right-to-Left (RTL) languages like Arabic, Hebrew, and Persian. src/lib/i18n/config.ts5-9
NEXT_LOCALE cookies. src/lib/i18n/config.ts2isRtlLocale function triggers layout shifts for specific languages. src/lib/i18n/config.ts12-14The prompts.config.ts file allows for extensive "white-label" clones. By setting useCloneBranding: true, developers can hide the original prompts.chat achievements and sponsors to create a private instance. prompts.config.ts3-5 prompts.config.ts71-75
The platform functions as a Model Context Protocol (MCP) server, exposing tools to AI clients. README.md137-150
https://prompts.chat/api/mcp. README.md145npx prompts.chat mcp. README.md157Sources: src/lib/i18n/config.ts1-14 prompts.config.ts1-91 README.md125-163
The configuration system uses applyEnvOverrides to allow Docker environment variables (prefixed with PCHAT_) to override build-time settings in prompts.config.ts. src/lib/config/index.ts87-100
| Domain | Config Interface | Key Options |
|---|---|---|
| Branding | BrandingConfig | name, logo, logoDark, favicon src/lib/config/index.ts1-9 |
| Theme | ThemeConfig | radius (none/sm/md/lg), variant (flat/default/brutal) src/lib/config/index.ts11-22 |
| Auth | AuthConfig | providers (github, google, apple, azure) src/lib/config/index.ts26-32 |
| Features | FeaturesConfig | aiSearch, aiGeneration, mcp, privatePrompts src/lib/config/index.ts39-48 |
Sources: src/lib/config/index.ts1-81 src/lib/config/index.ts115-165 prompts.config.ts21-67
Refresh this wiki