Skip to content

erinmagennis/EigenSnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

EigenSnap

Photo capture app for Mentra smart glasses with TEE attestation and Supabase storage.

Project Structure

EigenSnap/
├── mentra-app/          # Web app for Mentra glasses
│   ├── index.html       # Camera UI
│   ├── app.js          # Photo capture logic
│   └── config.js       # Configuration
├── backend/            # TEE backend (coming next)
│   └── (will add later)
└── README.md

Current Status

✅ Phase 1: Photo Capture (Complete)

  • Camera access on Mentra glasses
  • Photo capture with preview
  • Local storage of photo metadata
  • Recent photos list
  • 50MB max photo size
  • JPEG compression

🔄 Phase 2: Basic Backend (Next)

  • Simple Express server to receive photos
  • Save photos to local filesystem
  • Photo metadata tracking

⏳ Phase 3: TEE Attestation (Planned)

  • Cryptographic signing of photos
  • Image hash generation
  • Timestamp attestation
  • TEE address verification

⏳ Phase 4: Supabase Integration (Planned)

  • Supabase storage bucket setup
  • Photo upload to Supabase
  • Metadata database
  • Public photo gallery

Quick Start (Current Phase)

1. Deploy Mentra App

Option A: Vercel

  1. Push this repo to GitHub
  2. Import to Vercel
  3. Set root directory: mentra-app
  4. Deploy
  5. Copy deployment URL

Option B: Local Testing

  1. Serve the mentra-app directory:
cd mentra-app
python3 -m http.server 8080
  1. Access at http://localhost:8080

2. Configure Mentra Console

  1. Go to https://console.mentraglass.com
  2. Create/edit your app
  3. Set Server URL to your deployment URL
  4. Install app on glasses

3. Test on Mentra Glasses

  1. Launch EigenSnap on glasses
  2. Tap "Start Camera"
  3. Tap "Take Photo"
  4. Review preview
  5. Tap "Upload Photo" (saves locally for now)

Features

Current (Phase 1):

  • 📸 Camera access with back camera
  • 🖼️ Photo capture and preview
  • 💾 Local storage of photos
  • 📋 Recent photos list
  • ✓ Photo metadata (size, format, timestamp)
  • ↺ Retake functionality

Coming Soon:

  • 🔐 TEE cryptographic attestation
  • ☁️ Supabase cloud storage
  • 🌐 Public photo gallery
  • ✅ Photo verification
  • 📊 Photo analytics

Configuration

Edit mentra-app/config.js:

const APP_CONFIG = {
  appName: "EigenSnap",
  maxPhotoSize: 50 * 1024 * 1024,  // 50MB
  photoQuality: 0.92,               // JPEG quality
  camera: {
    facingMode: 'environment',      // Back camera
    idealWidth: 1920,
    idealHeight: 1080
  }
};

Architecture (Planned)

Mentra Glasses (Camera App)
    ↓
Capture Photo (JPEG, max 50MB)
    ↓
POST /api/photo
    ↓
┌─────────────────────────────────────┐
│      TEE Backend                    │
│  1. Validate image                  │
│  2. Generate hash (SHA-256)         │
│  3. Create attestation              │
│  4. Sign with TEE key               │
│  5. Upload to Supabase              │
└─────────────────────────────────────┘
    ↓
Supabase Storage + Database
  • Image file (Storage)
  • Metadata (Database):
    - photo_id
    - image_hash
    - tee_signature
    - timestamp
    - tee_address

Development Roadmap

  • Phase 1: Photo capture UI
  • Camera access and preview
  • Photo capture and compression
  • Local metadata storage
  • Phase 2: Basic backend
  • Express server
  • Photo upload endpoint
  • Local file storage
  • Phase 3: TEE attestation
  • Image hashing
  • Cryptographic signing
  • Attestation verification
  • Phase 4: Supabase integration
  • Storage bucket setup
  • Database schema
  • Photo upload flow
  • Public gallery

Tech Stack

Mentra App:

  • Vanilla JavaScript
  • Mentra Camera API
  • localStorage for metadata

Backend (Coming):

  • Node.js + Express
  • Ethers.js (for TEE signing)
  • Supabase SDK

Storage (Coming):

  • Supabase Storage (images)
  • Supabase Database (metadata)

License

MIT

About

Photo capture app for Mentra glasses with TEE attestation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors