Skip to content

redpill-ai/redpill-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”΄ RedPill Chat

Privacy-First AI Chat Interface with TEE-Protected Gateway

A modern, privacy-focused chat interface powered by RedPill Gateway. Built with Next.js 15, React 19, and Assistant UI, featuring cryptographic verification of all AI responses through hardware-protected Trusted Execution Environments (TEE).

License Next.js React

🌟 Key Features

  • πŸ”’ TEE-Protected Chat - All requests verified through hardware-protected gateway
  • πŸ›‘οΈ Cryptographic Verification - Verify AI responses with attestation reports
  • 🌐 250+ AI Models - Access OpenAI, Anthropic, Google, Meta, DeepSeek, and more
  • βœ… Message Integrity - Optional signature verification for every response
  • 🎨 Modern UI - Beautiful interface with Assistant UI components
  • πŸš€ Lightning Fast - Next.js 15 with Turbopack and React 19
  • πŸ“± Responsive Design - Works seamlessly on desktop and mobile

πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • RedPill API key (get one at redpill.ai)
  • RedPill Gateway API endpoint

Installation

# Clone the repository
git clone https://github.com/redpill-ai/redpill-chat.git
cd redpill-chat

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API key and endpoint

# Start development server
npm run dev

Open http://localhost:3000 to see the chat interface.

βš™οΈ Configuration

Create a .env.local file:

# RedPill Gateway API
API_URL=https://api.redpill.ai/v1
REDPILL_API_KEY=sk-your-api-key-here

# Optional - Enable TEE verification features
NEXT_PUBLIC_ENABLE_ATTESTATION=true
NEXT_PUBLIC_ENABLE_SIGNATURE_VERIFICATION=true

🎯 Tech Stack

πŸ“– Usage

Basic Chat

Simply open the interface and start chatting! The chat automatically:

  1. Connects to RedPill Gateway
  2. Routes requests through TEE-protected infrastructure
  3. Returns verified AI responses

Model Selection

Click the model selector to choose from 250+ available models:

  • OpenAI: GPT-5, GPT-5 Mini, O3, O4 Mini
  • Anthropic: Claude Sonnet 4.5, Claude Opus 4.1
  • Phala Confidential: TEE-protected inference models
  • And many more: Google, Meta, DeepSeek, Mistral, etc.

TEE Verification (Optional)

Enable attestation verification to get cryptographic proof that responses came from genuine TEE hardware:

  1. Toggle "Verify TEE" in settings
  2. Each message shows verification status
  3. View full attestation reports for complete hardware proof

Message Signatures (Optional)

Enable signature verification for maximum security:

  1. Toggle "Verify Signatures" in settings
  2. Each response includes cryptographic signature
  3. Verify signatures match TEE attestation reports

πŸ—οΈ Project Structure

redpill-chat/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/              # Next.js app router pages
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”‚   β”œβ”€β”€ chat-interface.tsx
β”‚   β”‚   └── ui/          # Shadcn/Radix UI components
β”‚   β”œβ”€β”€ state/           # Zustand state management
β”‚   β”‚   β”œβ”€β”€ attestation.ts
β”‚   β”‚   β”œβ”€β”€ models.ts
β”‚   β”‚   └── message-verification.ts
β”‚   └── types/           # TypeScript type definitions
β”‚       β”œβ”€β”€ attestation.ts
β”‚       β”œβ”€β”€ model.ts
β”‚       └── message-verification.ts
β”œβ”€β”€ public/              # Static assets
└── package.json

πŸ”§ Development

# Run development server with Turbopack
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Run linter
npm run lint

# Format code
npm run format

πŸ“¦ Deployment

Vercel (Recommended)

Deploy with Vercel

  1. Click the "Deploy" button above
  2. Add environment variables:
    • API_URL
    • REDPILL_API_KEY
  3. Deploy!

Docker

# Build image
docker build -t redpill-chat .

# Run container
docker run -p 3000:3000 \
  -e API_URL=https://api.redpill.ai/v1 \
  -e REDPILL_API_KEY=sk-your-key \
  redpill-chat

Self-Hosted

# Build the application
npm run build

# Start production server
npm start

πŸ›‘οΈ Privacy & Security

RedPill Chat is built with privacy-first principles:

  • No Data Collection - Chat messages never stored on our servers
  • TEE Protection - All requests processed in hardware-protected enclaves
  • Cryptographic Verification - Optional attestation reports prove genuine TEE execution
  • Open Source - Fully auditable codebase
  • Client-Side State - Messages stored only in your browser

πŸ”— Integration with RedPill Gateway

This chat interface connects to RedPill Gateway, which provides:

  • TEE-protected request routing
  • Access to 250+ AI models
  • Cryptographic attestation
  • Hardware-enforced privacy

See RedPill Gateway documentation for API details.

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run linter and formatter (npm run lint && npm run format)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

πŸ“ License

MIT License - see LICENSE for details.

πŸ™ Attribution

Built with:

Powered by RedPill Gateway and Phala Network TEE infrastructure.

πŸ”— Links


Built with πŸ’œ by the RedPill team β€’ Making AI privacy-first, one chat at a time.

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •