A cutting-edge, zero-backend web application that transforms text, images, and audio into emoji puzzles using Chrome's built-in AI. Create challenges from any content and share them for others to decode!
- Multimodal Input: Text, camera photos, audio recordings, and drag & drop images
- Chrome AI Integration: Real on-device AI processing with Gemini Nano
- Smart Challenge Generation: Two-step AI processing for meaningful puzzle creation
- Viral Sharing: Generate shareable URLs with embedded challenges
- Interactive Decoding Game: Progressive clue system with scoring
- Image Analysis: AI describes photos in 2-6 words, then converts to emojis
- Audio Transcription: AI transcribes speech and converts to emoji sequences
- Intelligent Clues: Chrome AI generates contextual hints based on attempt number
- Progressive Difficulty: Clues become more specific with each wrong answer
- Fallback Systems: Graceful degradation when AI is unavailable
- Responsive Design: Works perfectly on mobile and desktop
- Camera Integration: Full-screen webcam capture with live preview
- Audio Recording: One-click microphone recording with visual feedback
- Scoring System: Points-based gameplay with attempt tracking
- Social Sharing: Direct integration with Twitter, Facebook, LinkedIn, WhatsApp
- Debug Console: Real-time logging for development and troubleshooting
- Zero Backend: Pure client-side SPA with no server dependencies
- URL-Based Sharing: Base64-encoded challenges in shareable URLs
- Cross-Browser Compatibility: Graceful fallbacks for non-Chrome browsers
- HTTPS Security: Content Security Policy and XSS prevention
- Accessibility: Keyboard navigation and screen reader support
graph TB
subgraph "Input Layer"
A[Text Input]
B["๐ท Camera Capture"]
C["๐ค Audio Recording"]
D["๐ผ๏ธ Drag & Drop Images"]
end
subgraph "Chrome AI Processing"
E[Image Analysis AI]
F[Audio Transcription AI]
G[Emoji Generation AI]
H[Clue Generation AI]
end
subgraph "Core Engine"
I[Content Processor]
J[URL Encoder/Decoder]
K[Game Logic]
L[Scoring System]
end
subgraph "Output Layer"
M[Emoji Preview]
N[Share URLs]
O[Challenge Game]
P[Social Sharing]
end
A --> I
B --> E --> I
C --> F --> I
D --> E --> I
I --> G
G --> M
I --> J --> N
J --> O
O --> H
O --> K --> L
M --> P
N --> P
style E fill:#e1f5fe
style F fill:#e1f5fe
style G fill:#e1f5fe
style H fill:#e1f5fe
sequenceDiagram
participant U as User
participant UI as Interface
participant AI as Chrome AI
participant ENG as Engine
U->>UI: Input content (text/image/audio)
UI->>AI: Send to appropriate AI model
alt Image Input
AI->>AI: Analyze image โ description
AI->>AI: Description โ emojis
else Audio Input
AI->>AI: Transcribe audio โ text
AI->>AI: Text โ emojis
else Text Input
AI->>AI: Text โ emojis directly
end
AI->>ENG: Return emoji sequence
ENG->>ENG: Encode original + emojis
ENG->>UI: Generate shareable URL
UI->>U: Display preview + share options
sequenceDiagram
participant P as Player
participant UI as Interface
participant AI as Chrome AI
participant GAME as Game Logic
P->>UI: Click challenge URL
UI->>UI: Decode emojis + original text
UI->>P: Show emoji sequence
loop Guessing Game
P->>UI: Submit guess
UI->>GAME: Compare with original
alt Correct Answer
GAME->>UI: Success + final score
else Wrong Answer
GAME->>GAME: Deduct points, increment attempts
GAME->>AI: Generate contextual clue
AI->>UI: Show progressive hint
UI->>P: Display clue + try again
end
end
alt Max Attempts Reached
P->>UI: Request reveal
GAME->>UI: Show answer + final score
end
graph LR
subgraph "Scoring System"
A[Start: 100 points] --> B{Correct Answer?}
B -->|Yes| C[+Bonus for speed]
B -->|No| D[-15 points]
D --> E{Reveal answer?}
E -->|Yes| F[-30 points]
E -->|No| G[Generate AI clue]
G --> H[Continue guessing]
H --> B
end
subgraph "Clue Progression"
I[Attempt 1: Category hint]
J[Attempt 2: Structure hint]
K[Attempt 3: Almost-answer]
I --> J --> K
end
style C fill:#c8e6c9
style D fill:#ffcdd2
style F fill:#ffcdd2
graph TD
subgraph "AI Service Layer"
A[API Detection] --> B{Chrome AI Available?}
B -->|Yes| C[Create AI Session]
B -->|No| D[Fallback Mode]
C --> E[Configure Prompts]
E --> F[Process Content]
F --> G[Clean Response]
G --> H[Return Result]
D --> I[Static Responses]
I --> H
end
subgraph "AI Models Used"
J[Image Analysis Model]
K[Audio Processing Model]
L[Text-to-Emoji Model]
M[Clue Generation Model]
end
C --> J
C --> K
C --> L
C --> M
style B fill:#fff3e0
style C fill:#e8f5e8
style D fill:#ffebee
- Chrome Canary 130+ or Chrome Dev
- HTTPS environment (required for camera/microphone)
- Navigate to
chrome://flags
- Enable "Prompt API for Gemini Nano"
- Enable "Optimization Guide On Device Model"
- Restart Chrome
- Visit
chrome://components
- Update "Optimization Guide On Device Model"
# Clone repository
git clone <repository-url>
cd emoji-challenge
# Open index.html in Chrome Canary
# Or serve with any static server:
python -m http.server 8000
# Navigate to http://localhost:8000
This project includes automated deployment to GitHub Pages using GitHub Actions.
-
Repository Settings
- Go to your GitHub repository settings
- Navigate to "Pages" section
- Set source to "GitHub Actions"
-
Automatic Deployment
- Push to
main
ormaster
branch triggers deployment - GitHub Actions builds and deploys automatically
- Live site available at:
https://username.github.io/repository-name
- Push to
-
Manual Deployment (if needed)
# Deploy to gh-pages branch git checkout -b gh-pages git push origin gh-pages
- โ Automated testing (if tests exist)
- โ Linting with ESLint
- โ Zero-downtime deployment
- โ Build status checks
- โ Rollback capabilities
- Production:
https://username.github.io/emoji-challenge
- Preview: Generated for pull requests
- Local Development:
http://localhost:8000
- Add CNAME file with your domain
- Configure DNS settings
- Enable HTTPS in repository settings
# Add custom domain
echo "your-domain.com" > CNAME
git add CNAME && git commit -m "Add custom domain"
Input Type | AI Processing | Example Output |
---|---|---|
Text: "Happy Birthday" | Direct conversion | ๐๐๐๐ |
Photo: Birthday cake image | Image โ "birthday cake" โ emojis | ๐๐ฏ๏ธ๐โจ |
Audio: "Happy birthday song" | Speech โ "birthday song" โ emojis | ๐ต๐๐๐ |
https://your-domain.com/?e=%F0%9F%8E%89%F0%9F%8E%82&o=aGFwcHklMjBiaXJ0aGRheQ%3D%3D
e
: URL-encoded emoji sequenceo
: Base64-encoded original text
emoji-challenge/
โโโ index.html # Single-file application
โโโ README.md # This documentation
โโโ .taskmaster/ # Project management
โโโ tasks/ # Task definitions
โโโ docs/ # Additional documentation
graph LR
subgraph "Core Modules"
A[Media Capture] --> B[Chrome AI Service]
B --> C[Content Processor]
C --> D[URL Handler]
D --> E[Game Engine]
E --> F[UI Controller]
end
subgraph "UI Elements"
G[Camera/Mic Buttons]
H[Generate Button]
I[Game Interface]
J[Share Controls]
K[Debug Console]
end
F --> G
F --> H
F --> I
F --> J
F --> K
Feature | Chrome Canary | Chrome Stable | Firefox | Safari | Edge |
---|---|---|---|---|---|
Challenge Creation | โ | โ | โ | โ | โ |
Challenge Playing | โ | โ | โ | โ | โ |
Camera/Audio | โ | โ | โ | โ | โ |
AI Clues | โ | โ | โ | โ | โ |
Basic Gameplay | โ | โ | โ | โ | โ |
- Initial Load: < 50KB (single HTML file)
- AI Processing: 500ms - 2s (model dependent)
- Camera Capture: Instant preview
- Audio Recording: Real-time processing
- URL Generation: < 100ms
- Cross-browser Sharing: Universal compatibility
- Zero Data Collection: No analytics, tracking, or storage
- On-Device Processing: All AI runs locally in Chrome
- URL-Based Sharing: Original text encoded in shareable URLs
- No Third-Party Services: Completely self-contained
- Content Security Policy: XSS and injection prevention
- HTTPS Requirements: Secure media access
- Input Sanitization: Prevents malicious content
- Error Boundaries: Graceful failure handling
- Check Current Tasks: View
.taskmaster/tasks/
for available work - Feature Development: Focus on Chrome AI integration improvements
- Cross-Browser Support: Enhance fallback functionality
- UI/UX Improvements: Accessibility and mobile optimization
MIT License - Feel free to use, modify, and distribute!
๐จ Note: This application showcases Chrome's experimental on-device AI capabilities. Generation features require Chrome Canary with AI flags enabled, but challenge playback works in all modern browsers.