Skip to content

brown2020/promptmeai

Repository files navigation

Prompt.me AI

Next.js React TypeScript Tailwind CSS License

Compare AI model responses side-by-side in real-time

DemoFeaturesQuick StartDocumentationContributing


Overview

Prompt.me AI is an open-source platform that allows you to send the same prompt to multiple leading AI models simultaneously and compare their responses in real-time. Perfect for researchers, developers, and AI enthusiasts who want to understand the strengths and differences between various AI models.

Supported AI Models

Model Provider Description
GPT-5.1 Chat OpenAI Fast, capable language model
Claude Sonnet 4.5 Anthropic Advanced reasoning and analysis
Gemini 2.5 Flash Google Quick, efficient responses
Mistral Small Mistral AI Balanced performance model
LLaMA 3.1 8B Meta (via Fireworks) Open-source model

Features

  • 🤖 Multi-Model Comparison — Send prompts to 5 AI models simultaneously
  • Real-time Streaming — See responses as they're generated
  • 💾 Chat History — Save, pin, and organize your conversations
  • 🔑 Dual Usage Modes — Use platform credits or your own API keys
  • 💳 Payment Integration — Purchase credits via Stripe
  • 🌙 Dark Mode — Full dark/light theme support
  • 📱 Responsive Design — Works on desktop and mobile
  • 🔐 Secure Authentication — Firebase Auth with Google sign-in

Tech Stack

Frontend

AI Integration

Backend & Data

  • Firebase — Authentication & Firestore database
  • Stripe — Payment processing
  • Zustand — State management

Developer Experience

Quick Start

Prerequisites

  • Node.js 20.9+ (LTS recommended)
  • npm or yarn or pnpm
  • API keys from AI providers (optional if using credits)
  • Firebase project
  • Stripe account (for payments)

Installation

  1. Clone the repository

    git clone https://github.com/brown2020/promptmeai.git
    cd promptmeai
  2. Install dependencies

    npm install
  3. Configure environment variables

    cp .env.example .env.local

    Edit .env.local with your configuration (see Environment Variables)

  4. Start the development server

    npm run dev
  5. Open your browser

    Navigate to http://localhost:3000

Environment Variables

Create a .env.local file in the root directory with the following variables:

AI Provider Keys (Server-side)

# Required for credit-based usage
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_GENERATIVE_AI_API_KEY=...
MISTRAL_API_KEY=...
FIREWORKS_API_KEY=...

Firebase Configuration

# Client-side (public)
NEXT_PUBLIC_FIREBASE_APIKEY=...
NEXT_PUBLIC_FIREBASE_AUTHDOMAIN=your-project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECTID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGEBUCKET=your-project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID=...
NEXT_PUBLIC_FIREBASE_APPID=...
NEXT_PUBLIC_FIREBASE_MEASUREMENTID=G-...

# Server-side (Admin SDK)
FIREBASE_TYPE=service_account
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_PRIVATE_KEY_ID=...
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-...@your-project.iam.gserviceaccount.com
FIREBASE_CLIENT_ID=...
FIREBASE_AUTH_URI=https://accounts.google.com/o/oauth2/auth
FIREBASE_TOKEN_URI=https://oauth2.googleapis.com/token
FIREBASE_AUTH_PROVIDER_X509_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
FIREBASE_CLIENT_CERTS_URL=https://www.googleapis.com/robot/v1/metadata/x509/...

Stripe Configuration

NEXT_PUBLIC_STRIPE_KEY=pk_...
NEXT_PUBLIC_STRIPE_PRODUCT_NAME=PromptMe Credits
STRIPE_SECRET_KEY=sk_...

Application Settings

NEXT_PUBLIC_COOKIE_NAME=promptme_auth

Project Structure

promptmeai/
├── src/
│   ├── actions/           # Server actions (AI generation, payments)
│   ├── app/               # Next.js App Router pages
│   │   ├── chat/          # Main chat interface
│   │   ├── settings/      # User settings & API keys
│   │   ├── payment-*/     # Payment flow pages
│   │   └── ...
│   ├── components/        # Reusable UI components
│   │   ├── buttons/       # Button variants
│   │   ├── modals/        # Modal dialogs
│   │   └── ...
│   ├── constants/         # App constants & model config
│   ├── firebase/          # Firebase client & admin setup
│   ├── hooks/             # Custom React hooks
│   ├── layouts/           # Page layouts & navigation
│   ├── screens/           # Page-level components
│   │   ├── chat/          # Chat screen with sections
│   │   ├── settings/      # Settings screen
│   │   └── ...
│   ├── services/          # Business logic (chat CRUD)
│   ├── types/             # TypeScript type definitions
│   ├── utils/             # Utility functions
│   └── zustand/           # State management stores
├── public/                # Static assets
└── ...config files

Usage

Chat Interface

  1. Sign in with Google or email/password
  2. Type your prompt in the chat input
  3. View responses from all AI models simultaneously
  4. Save conversations automatically to your history
  5. Pin important chats for quick access

Usage Modes

Mode Description
Credits Use platform-provided credits (default)
API Keys Use your own API keys for each provider

Configure your usage mode in Settings.

Purchasing Credits

  1. Navigate to Settings
  2. Click Buy 10,000 Credits
  3. Complete payment via Stripe
  4. Credits are added instantly

Scripts

npm run dev      # Start development server
npm run build    # Build for production
npm run start    # Start production server
npm run lint     # Run ESLint

Firebase Setup

Firestore Database Structure

users/
  └── {uid}/
      └── profile/
          └── userData          # User profile & settings
      └── payments/             # Payment history
          └── {paymentId}

promptme_chats/
  └── {uid}/
      └── chat/
          └── {chatId}          # Individual chat conversations

Security Rules

This repo includes production-ready rules that ensure users can only access their own data:

  • Firestore: firestore.rules
  • Storage: storage.rules

What’s protected

  • User data: users/{uid} and users/{uid}/profile/userData
  • Payments: users/{uid}/payments/{paymentDocId} (read/create only; update/delete denied by default)
  • Chats: promptme_chats/{uid}/chat/{chatId} (create/update require userId === uid)
  • Everything else: denied by default

Deploy (Firebase Console)

  • Firestore: Firebase Console → Firestore Database → Rules → paste from firestore.rules → Publish
  • Storage: Firebase Console → Storage → Rules → paste from storage.rules → Publish

Deploy (Firebase CLI)

If you use the Firebase CLI, ensure your firebase.json points to the rule files:

{
  "firestore": { "rules": "firestore.rules" },
  "storage": { "rules": "storage.rules" }
}

Then deploy:

firebase deploy --only firestore:rules,storage:rules

Contributing

We welcome contributions! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests and linting
    npm run lint
    npm run build
  5. Commit your changes
    git commit -m "feat: add amazing feature"
  6. Push to your fork
    git push origin feature/amazing-feature
  7. Open a Pull Request

Commit Convention

We follow Conventional Commits:

  • feat: — New features
  • fix: — Bug fixes
  • docs: — Documentation changes
  • style: — Code style changes (formatting, etc.)
  • refactor: — Code refactoring
  • perf: — Performance improvements
  • test: — Test additions or modifications
  • chore: — Maintenance tasks

Development Guidelines

  • Write TypeScript with proper types
  • Follow the existing code style
  • Add comments for complex logic
  • Keep components small and focused
  • Use the existing utility functions

Roadmap

  • Add more AI models (Cohere, AI21, etc.)
  • Implement conversation branching
  • Add export functionality (PDF, Markdown)
  • Create API for programmatic access
  • Add team collaboration features
  • Implement prompt templates library

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) — see the LICENSE.md file for details.

Acknowledgments


⬆ Back to Top

Made with ❤️ by Brown2020

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •