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).
- π 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
- Node.js 20+
- RedPill API key (get one at redpill.ai)
- RedPill Gateway API endpoint
# 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 devOpen http://localhost:3000 to see the chat interface.
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- Framework: Next.js 15 with App Router
- React: React 19 with Server Components
- AI SDK: Vercel AI SDK with OpenAI-compatible provider
- Chat UI: Assistant UI for beautiful chat components
- Styling: Tailwind CSS 4 with motion animations
- Components: Radix UI primitives
- State: Zustand for client state
- Code Quality: Biome for linting and formatting
- Icons: Lucide React
Simply open the interface and start chatting! The chat automatically:
- Connects to RedPill Gateway
- Routes requests through TEE-protected infrastructure
- Returns verified AI responses
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.
Enable attestation verification to get cryptographic proof that responses came from genuine TEE hardware:
- Toggle "Verify TEE" in settings
- Each message shows verification status
- View full attestation reports for complete hardware proof
Enable signature verification for maximum security:
- Toggle "Verify Signatures" in settings
- Each response includes cryptographic signature
- Verify signatures match TEE attestation reports
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
# 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- Click the "Deploy" button above
- Add environment variables:
API_URLREDPILL_API_KEY
- Deploy!
# 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# Build the application
npm run build
# Start production server
npm startRedPill 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
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.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run linter and formatter (
npm run lint && npm run format) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
Built with:
- Next.js by Vercel
- Assistant UI by Assistant UI team
- Vercel AI SDK by Vercel
- Radix UI by Modulz
- Tailwind CSS by Tailwind Labs
Powered by RedPill Gateway and Phala Network TEE infrastructure.
- Website: https://redpill.ai
- Documentation: https://docs.redpill.ai
- Gateway: https://github.com/redpill-ai/redpill-gateway
- Discord: https://discord.gg/redpill
- Support: support@redpill.ai
Built with π by the RedPill team β’ Making AI privacy-first, one chat at a time.