A fun word game where players unscramble emoji puzzles to guess phrases from movies, idioms, and songs. The game uses AI-powered phrase generation via Ollama to create endless puzzles.
The game requires Ollama to generate emoji puzzles. Follow these steps to install and set up Ollama:
# Download and install Ollama
brew install ollama
# Start Ollama service
ollama serve# Download and install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Start Ollama service
ollama serveDownload the installer from ollama.ai and run it.
The game uses the Qwen3:1.7b model for phrase generation. Pull the model using:
ollama pull Qwen3:1.7bNote: You can use other models by modifying the
server/ollamaClient.jsfile, butQwen3:1.7bis recommended for optimal performance and quality.
Ensure Ollama is running and accessible:
# Check if Ollama is running
curl http://localhost:11434/api/tags
# You should see a response with your modelsnpm install# Start both frontend and backend servers
npm run devThis will start:
- Frontend: http://localhost:3000
- Backend: http://localhost:3001
- Open http://localhost:3000 in your browser
- The game should load with available categories (Movies, Idioms, Songs)
- Click "Play" to start a game session
- You should see scrambled words with emoji hints
- Multiple Categories: Movies, idioms, and songs
- AI-Powered Puzzles: Fresh puzzles generated using Ollama
- Smart Validation: Permissive answer validation that accepts mostly correct answers
- Session Management: Unique puzzles per game session
- Background Generation: Automatic phrase generation to ensure availability
- Difficulty Tracking: Adaptive difficulty based on player performance
# Install dependencies
npm install
# Start development servers (frontend + backend)
npm run dev
# Start only frontend development server
npm run dev:frontend
# Start only backend server
npm run dev:backend
# Build for production
npm run build
# Start production server
npm run start
# Run tests
npm run test
# Run specific server tests
npm run test:server
npm run test:unique
npm run test:multi-sessionGET /api/phrases/random?category=<category>- Get random phrasePOST /api/phrases/guess-result- Record guess resultGET /api/categories- Get available categoriesPOST /api/session/reset- Reset game session
The application uses a JSON configuration file at server/config.json. You can customize:
- Ollama Settings: Change the model or base URL
- Server Port: Change the backend server port
- Database Path: Change the SQLite database location
{
"ollama": {
"baseUrl": "http://localhost:11434",
"model": "qwen3:1.7b"
},
"server": {
"port": 3001
},
"database": {
"path": "./server/phrases.db"
}
}-
"Ollama connection failed"
- Ensure Ollama is running:
ollama serve - Verify the model is pulled:
ollama list - Check if port 11434 is accessible
- Verify the model name in
server/config.json
- Ensure Ollama is running:
-
"No phrases available"
- Wait for background generation to complete
- Check server logs for generation errors
- Verify Ollama is working correctly
-
Database errors
- Delete
server/phrases.dbto reset the database - Restart the server
- Delete
-
Configuration issues
- Check
server/config.jsonfor syntax errors - Delete the config file to regenerate defaults
- Check
# Test Ollama connection directly
node server/test-ollama.js
# Test full server flow
node server/test-full-flow.js- Frontend: Preact SPA with responsive design
- Backend: Node.js/Express server with SQLite database
- AI Integration: Ollama for phrase and emoji generation
- Session Management: Cookie-based session tracking
- Background Processing: Automatic phrase population
- Configuration: JSON-based config file for easy customization
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm run test - Submit a pull request
MIT License - see LICENSE file for details