Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Empath

A research MVP for studying empathic AI interactions. The experiment uses a 3-condition design (text-only, avatar, avatar + gesture detection) with HRV biometric integration to measure user emotional responses.

Tech Stack

  • Frontend: React + TypeScript + Vite, Tailwind CSS
  • Backend: Firebase (Firestore, Cloud Functions, Hosting, Storage)
  • AI: Claude API (Anthropic) for empathic dialogue
  • Vision: MediaPipe for gesture/expression detection

Prerequisites

  • Node.js 20+
  • Firebase CLI (npm install -g firebase-tools)
  • A Firebase project
  • An Anthropic API key

Setup

1. Clone and install dependencies

git clone https://github.com/YOUR_USERNAME/ai-empath.git
cd ai-empath
npm install
cd functions && npm install && cd ..

2. Configure environment variables

Copy the example env files and fill in your values:

cp .env.example .env
cp functions/.env.example functions/.env

Root .env — Firebase config:

VITE_DEMO_MODE=false
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id

functions/.env — Anthropic API key:

ANTHROPIC_API_KEY=sk-ant-...

Set VITE_DEMO_MODE=true to run the frontend locally without Firebase (uses mock data).

3. Firebase setup

firebase login
firebase use your_project_id

Set the Anthropic key as a Firebase secret for production:

firebase functions:secrets:set ANTHROPIC_API_KEY

4. Run locally

# Frontend dev server
npm run dev

# Firebase emulators (optional, for local backend)
cd functions && npm run serve

5. Deploy

npm run build
firebase deploy

Project Structure

ai-empath/
  src/            # React frontend
  functions/      # Firebase Cloud Functions (Claude API integration)
  public/         # Static assets
  dist/           # Build output (gitignored)
  firebase.json   # Firebase config
  firestore.rules # Firestore security rules
  storage.rules   # Storage security rules

Scripts

Command Description
npm run dev Start Vite dev server
npm run build TypeScript check + production build
npm run test Run tests
npm run lint Lint with ESLint
firebase deploy Deploy everything to Firebase

About

Research MVP: empathic AI interaction experiment with avatar, gesture detection, and HRV biometrics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages