Self-Hosting Guide

Deploy your own prompts.example.vn instance with customizable branding, themes, and authentication.

What You Get

  • Curated prompt library with 100+ community-tested prompts
  • Custom branding, logos, and themes
  • Multiple auth providers (GitHub, Google, Azure, credentials)
  • AI-powered semantic search and generation (optional)
  • Multi-language support (11 locales)
  • CC0 licensed - use freely for any purpose

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • npm or yarn

Quick Start

# Clone the repository

git clone https://github.com/truongthanhquan/awesome-chatgpt-prompts.git

cd awesome-chatgpt-prompts

# Install dependencies

npm install

# Configure environment

cp .env.example .env

# Run migrations & seed

npm run db:migrate

npm run db:seed

# Start development server

npm run dev

Environment Variables

Create a .env file based on .env.example:

Core (Required)

VariableDescription
DATABASE_URLPostgreSQL connection string. Add ?connection_limit=5&pool_timeout=10 for serverless.
NEXTAUTH_URLYour app URL (e.g., http://localhost:3000)
NEXTAUTH_SECRETRandom secret for NextAuth session encryption

OAuth Providers (Optional)

VariableDescription
GITHUB_CLIENT_IDGitHub OAuth App client ID
GITHUB_CLIENT_SECRETGitHub OAuth App client secret
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
AZURE_AD_CLIENT_IDAzure AD application client ID
AZURE_AD_CLIENT_SECRETAzure AD application client secret
AZURE_AD_TENANT_IDAzure AD tenant ID

Storage Providers (Optional)

VariableDescription
ENABLED_STORAGEurl | s3 | do-spaces
S3_BUCKETS3 bucket name
S3_REGIONS3 region (e.g., us-east-1)
S3_ACCESS_KEY_IDS3 access key
S3_SECRET_ACCESS_KEYS3 secret key
S3_ENDPOINTCustom endpoint for S3-compatible services (MinIO, etc.)
DO_SPACES_*DigitalOcean Spaces: BUCKET, REGION, ACCESS_KEY_ID, SECRET_ACCESS_KEY, CDN_ENDPOINT

AI Features (Optional)

VariableDescription
OPENAI_API_KEYOpenAI API key for AI search and generation
OPENAI_BASE_URLCustom base URL for OpenAI-compatible APIs
OPENAI_EMBEDDING_MODELEmbedding model (default: text-embedding-3-small)
OPENAI_GENERATIVE_MODELGenerative model (default: gpt-4o-mini)

Analytics (Optional)

VariableDescription
GOOGLE_ANALYTICS_IDGoogle Analytics measurement ID (e.g., G-XXXXXXXXX)

Configuration (prompts.config.ts)

Customize your instance by editing prompts.config.ts:

Branding

OptionTypeDescription
namestringYour app name displayed in header and footer
logostringPath to logo for light mode
logoDarkstringPath to logo for dark mode
faviconstringPath to favicon
descriptionstringApp description for SEO and homepage

Theme

OptionValuesDescription
radiusnone | sm | md | lgBorder radius for UI components
variantflat | default | brutalUI style variant
densitycompact | default | comfortableSpacing density
colors.primaryhex or oklchPrimary brand color (e.g., #6366f1)

Authentication

OptionValuesDescription
providersarraycredentials, github, google, azure
allowRegistrationbooleanAllow public sign-up (credentials provider only)

Storage

OptionValuesDescription
providerurl | s3Storage provider for media uploads

Internationalization

OptionTypeDescription
localesstring[]Supported locales: en, tr, es, zh, ja, ar, pt, fr, it, de, ko
defaultLocalestringDefault language

Features

OptionDefaultDescription
privatePromptstrueAllow users to create private prompts
changeRequeststrueEnable version control with change requests
categoriestrueEnable prompt categories
tagstrueEnable prompt tags
aiSearchfalseAI-powered semantic search (requires OPENAI_API_KEY)
aiGenerationfalseAI-powered generation features (requires OPENAI_API_KEY)

White-Label Mode

Set useCloneBranding = true at the top of the config to:

  • Display your branding name and description on the homepage
  • Use your logo as the hero background watermark
  • Hide prompts.example.vn achievements (GitHub stars, Forbes, etc.)
  • Hide sponsor section and "Become a Sponsor" CTA
  • Hide "Clone on GitHub" button

// prompts.config.ts

const useCloneBranding = true;

Production Deployment

npm run build

npm run start

Deploy to Vercel, Railway, Render, or any Node.js hosting platform. Make sure to set all environment variables in your hosting provider's dashboard.

Support

For issues and questions, please open a GitHub Issue. For the complete documentation, see the SELF-HOSTING.md file in the repository.