Live Demo: https://crack-the-code-nine.vercel.app
Crack the Code is a logic-based puzzle game where players must guess a hidden number or word. Create your own custom games, challenge friends, and train your brain!
- 🔢 Number or 📝 Word guessing modes
- 🧠 Challenge friends with custom puzzles
- ♾️ Support for unlimited attempts or capped attempts
- 💡 Light/Dark theme toggle with persistence
- 🛠️ Built with React, Tailwind CSS, and React Router
- React – Functional components and hooks
- Tailwind CSS – For styling
- React Router v6 – Routing
- Context API – For theme and game state
- Vite / Create React App
- Vercel – Deployment
/public
├── index.html
├── logo.svg
└── manifest.json
/src
├── App.jsx
├── index.js
├── index.css
├── /components
├── /pages
└── /utils
| Path | Description |
|---|---|
/ |
Home page |
/number |
Number guessing game |
/word |
Word guessing game |
/create |
Create custom game |
/play?code=... |
Auto-redirect to custom game |
* |
404 Not Found |
git clone https://github.com/Cozyamy/Crack_the_Code.git
cd crack-the-code
npm install
npm startCustom game URLs are generated with encrypted parameters to avoid cheating:
/play?code=<encrypted_game_config>Game config includes:
mode:numberorwordanswer: the correct answermaxAttempts: number of allowed guesses (Infinityfor unlimited)
- Theme is persisted using
localStorage - Controlled via
ThemeProvidercontext
- Includes a
manifest.jsonfor installability
