A self-hosted collection of classic word, number, and logic puzzles
Features โข Quick Start โข Installation โข Documentation โข Contributing
Enigma is a comprehensive, self-hosted web application featuring a curated collection of classic puzzles and games. From word formation challenges like WordGuess and Word Wheel, to number puzzles like Sudoku and Kakuro, to logic puzzles like Einstein's Riddle and NonogramsโEnigma brings together over 100+ games in one beautiful, modern interface.
Perfect for puzzle enthusiasts, educators, or anyone looking to host their own games collection ad-free without relying on external services.
A sample of our puzzles:
- ๐ Word Formation: WordGuess, Word Wheel, Word Ladder, Anagrams, Hangman, and more
- ๐ข Number Puzzles: Sudoku, Kakuro, Calcudoku, Futoshiki, and variants
- ๐งฉ Logic Puzzles: Nonograms, Einstein's Riddle, Knights and Knaves, Code Breaker
- ๐ฏ Pattern Recognition: Categories, Threads, Word Search, Memory Match
- ๐ Geography & Trivia: Flag Guesser, Capital Guesser, Currency Quiz, Classical Music Quiz
- ๐จ Visual Puzzles: Jigsaw, Famous Paintings, Constellations
- โ๏ธ Strategy Games: Chess Puzzles, Sokoban, Minesweeper, Tower of Hanoi
- ๐ Code Breaking: Cryptogram, Word Arithmetic, Drop Quotes, Phrase Guess
- Account Management: Play with your friends, share your scores on leaderboards
- Multiple Difficulties: Adjustable difficulty levels for many puzzles
- Hint Systems: Get help when you're stuck on challenging puzzles
- Responsive Design: Optimized for all screen sizes
There are two ways to get set up. We recommend using Docker, but you can run it natively if you wish:
- Node.js 18+ and npm (or yarn/pnpm)
- A modern web browser (Chrome, Firefox, Safari, Edge)
-
Clone the repository
git clone https://github.com/ianfhunter/enigma.git cd enigma -
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser
Navigate to http://localhost:5173
That's it! ๐ You should now see the Enigma home page with all available games.
To create an optimized production build:
npm run buildThe built files will be in the dist/ directory. You can serve them with any static file server:
# Using the built-in preview server
npm run preview
# Or using a simple HTTP server
npx serve distEnigma is available as a pre-built Docker image that includes both the frontend and backend in a single container.
Quick Start:
# Pull and run the latest image
docker run -d \
--name enigma \
-p 3000:3000 \
-v enigma-data:/app/data \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-e FRONTEND_URL=http://localhost:3000 \
boopboopboop/enigma:latestWith docker-compose:
version: '3.8'
services:
enigma:
image: boopboopboop/enigma:latest
container_name: enigma
ports:
- "3000:3000"
volumes:
- enigma-data:/app/data
environment:
- NODE_ENV=production
- SESSION_SECRET=your-secret-here-change-in-production
- FRONTEND_URL=http://localhost:3000
restart: unless-stopped
volumes:
enigma-data:Save this as docker-compose.yml and run:
docker-compose up -dAvailable Image Tags:
latest- Latest stable releasedev- Development builds (manual workflow dispatch)- Version tags like
1.0.1,1.0,1- Specific versions
Environment Variables:
SESSION_SECRET(required) - Secret for session cookies. Generate withopenssl rand -hex 32FRONTEND_URL(optional) - Frontend URL for CORS. Defaults tohttp://localhost:5173DB_PATH(optional) - Database path. Defaults to/app/data/enigma.dbPORT(optional) - Server port. Defaults to3000DEFAULT_LANGUAGE(optional) - Default interface language for new users. Options:en(English),es(Spanish). Defaults toen. Users can change this in Settings.
Data Persistence:
The container stores data in /app/data. Use a Docker volume (as shown above) to persist your database and user data between container restarts.
Health Check: The image includes a health check. Monitor with:
docker ps # Check STATUS columnOr test manually:
curl http://localhost:3000/api/healthIf you prefer to build the image yourself:
docker build -t enigma .
docker run -p 3000:3000 -v enigma-data:/app/data enigmaBuild with a custom default language:
docker build --build-arg DEFAULT_LANGUAGE=es -t enigma .enigma/
โโโ src/
โ โโโ components/ # Reusable React components
โ โโโ pages/ # Game pages (one folder per game)
โ โโโ hooks/ # Custom React hooks
โ โโโ assets/ # Images, audio, and other assets
โโโ public/ # Static assets served directly
โโโ branding/ # Logo and branding assets
โโโ datasets/ # Data for building puzzles
โโโ scripts/ # Build and utility scripts
- Create a new folder in
src/pages/with your game name (PascalCase) - Add your game component files:
YourGame.jsx- Main game componentYourGame.module.css- Stylesindex.js- Export file
- Register your game in
src/data/gameRegistry.js:{ title: 'Your Game', slug: 'your-game', description: 'A brief description', icon: '๐ฎ', category: 'Your Category', version: 'v0.1', }
- Add the route in
src/App.jsx
- We use ESLint for code quality
- Run
npm run lintto check for issues - Follow React best practices and hooks guidelines
- Use CSS Modules for component styling
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
# Frontend tests (3,425+ tests)
npm run test:run
# Backend plugin tests (6 tests)
npm run test:backend-standalone
# Or run both
npm run test:run && npm run test:backend-standalonenpm testnpm test -- src/pages/Sudoku/Sudoku.test.jsnpm run test:coverageSee _docs/TESTING.md for detailed testing documentation.
Run tests inside Docker to match CI:
docker run --rm -v "$PWD":/workspace -w /workspace node:22-bookworm bash -lc "npm ci && npm run test:run && npm run test:backend-standalone"Test the published Docker image to ensure it works correctly:
# Test the latest published image
./tests/docker/docker-image.test.sh
# Test a specific version
./tests/docker/docker-image.test.sh boopboopboop/enigma:1.0.1See tests/docker/README.md for more details.
We welcome contributions from the community! Whether you're fixing bugs, adding new games, improving documentation, or enhancing features, your help makes Enigma better for everyone.
-
Fork the Repository Click the "Fork" button at the top of this page to create your own copy.
-
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make Your Changes
- Write clean, readable code
- Add comments for complex logic
- Update documentation if needed
- Test your changes thoroughly
-
Commit Your Changes
git commit -m "Add feature: brief description of your changes"Use clear, descriptive commit messages. We follow Conventional Commits style.
-
Push to Your Branch
git push origin feature/your-feature-name
-
Open a Pull Request
- Navigate to the original repository
- Click "New Pull Request"
- Select your branch
- Fill out the PR template with details about your changes
- Link any related issues
- Code Quality: Ensure your code passes linting (
npm run lint) - Testing: Test your changes in multiple browsers if possible
- Documentation: Update README or add comments for new features
- Game Additions: When adding new games, ensure they're fully playable and polished
- Accessibility: Consider keyboard navigation and screen readers
- Performance: Keep bundle size in mind for new dependencies
- Permission To Use: If you are contributing Datasets, Images, Puzzles, etc. Please make sure the terms are compatible with our project.
- ๐ฎ New Games: Add classic puzzles or create original games
- ๐ Bug Fixes: Fix issues, improve error handling
- ๐จ UI/UX Improvements: Enhance design, add animations, improve mobile experience
- ๐ Documentation: Improve README, add code comments, create guides
- โก Performance: Optimize rendering, reduce bundle size
- ๐ Internationalization: Add support for multiple languages
- โฟ Accessibility: Improve keyboard navigation, ARIA labels, screen reader support
- ๐ฌ Discussions: Use GitHub Discussions for questions and ideas
- ๐ Issues: Report bugs or request features via GitHub Issues
- ๐ Documentation: Check existing code comments and game implementations
See GitHub Issues for a complete list.
This project uses multiple licenses. See the LICENSE/ folder for details.
Main Project: Licensed under a custom Personal Use License.
- Personal Use: You are free to use, modify, and host Enigma for personal, non-commercial purposes.
- Commercial Use: If you wish to host Enigma or any derivatives thereof for commercial purposes (SaaS, paid services, client hosting, etc.), please contact us to discuss commercial licensing terms.
Crossword Component: Licensed under GPL-3.0 (see LICENSE/GPL3-CROSSWORD.txt)
See the LICENSE/ folder for complete terms and conditions.
If you believe that content in this project infringes on your copyright, please reach out to us through GitHub Issues or Discussions. We take intellectual property rights seriously and will make every effort to address valid copyright concerns promptly.
Please see our separate file ATTRIBUTIONS.md.
Note: Some riddles in the dataset were manually added by the Enigma project contributors to expand the collection.
- ๐ Documentation - Game guides and development documentation
- Report a Bug
- Request a Feature
- Discussions
Made with โค๏ธ by the Enigma community
โญ Star this repo if you find it useful!