1212
GitHub - reallyrehan/thenumble: Numble is a game like Wordle, but for math nerds. You guess an equation in 6 guesses or less, with a new equation every day! Β· GitHub
Skip to content

reallyrehan/thenumble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NUMBLE

Numble - Wordle for Math equations | Product Hunt

What is Numble?

Numble is a game like Wordle, but for math nerds. You guess an equation in 6 guesses or less, with a new equation every day!
  • Featured on the Guardian πŸ”₯
  • 1K+ users on Day 1 of launch
  • Crossed 100k pageviews in one month, 3K users per day
  • Came across a 🐞? Drop me a tweet/dm
  • 330,000 people have played Numble to date
  • Over 1 Million games have been played

πŸŽ‰ Major Update: Client-Side Migration (2024)

Numble has been migrated from a server-side app to a fully client-side application!

Why the Change?

To save on server costs - Numble previously cost $96/year to run on Heroku. The new client-only version can be hosted for free on platforms like Cloudflare Pages, reducing costs by 100% while maintaining all core game functionality.

What Changed?

Architecture:

  • Before: Python Flask backend + Redis + Heroku hosting
  • After: Pure JavaScript client-side app + static hosting (Cloudflare Pages)

Code Structure:

  • client_app/ - New client-only version (deployed to production)
  • server_side_app/ - Original server-side code (kept for reference)

Key Conversions:

  • Python backend logic β†’ JavaScript
  • Flask sessions β†’ localStorage
  • Redis global stats β†’ localStorage (personal stats only)
  • Server-side validation β†’ Client-side validation

What Still Works? βœ…

  • βœ… Daily puzzle generation (same algorithm, same puzzles)
  • βœ… All game mechanics (guessing, validation, feedback)
  • βœ… Personal statistics tracking
  • βœ… Dark mode
  • βœ… Custom seeds (mynumble)
  • βœ… Game state persistence (localStorage)
  • βœ… Google Analytics tracking
  • βœ… Ezoic ads integration

What's Different? ⚠️

Limitations:

  • ❌ Global statistics - No longer aggregated across all users (requires server)
  • ❌ Cross-device sync - Stats are device-specific (localStorage limitation)
  • ❌ Server-side security - All validation is client-side (users can inspect/modify code)
  • ❌ Server-side analytics - Only client-side analytics available

⚠️ Important Migration Note: Unfortunately, all previous statistics were lost during the migration. This is because:

  • Old stats were stored in server-side Flask sessions (on Heroku)
  • New stats are stored in browser localStorage (client-side)
  • There's no way to migrate data from server sessions to client localStorage

All users will start fresh with their statistics. The game functionality remains identical, but your previous win/loss history and guess distributions are no longer available.

Note: These limitations are expected for a client-only app and don't affect the core game experience. Personal statistics still work perfectly going forward!

For detailed limitations, see client_app/LIMITATIONS.md

Deployment

The client app is designed to be deployed to Cloudflare Pages (free) or any static hosting service:

  • No server required
  • No database needed
  • Zero hosting costs
  • Fast global CDN

See client_app/README.md for deployment instructions.


Keep Numble Alive! 🚨

Cost Update: With the client-side migration, hosting costs are now $0/year (down from $96/year)! πŸŽ‰

However, the domain still costs $12/year. If you want to help keep Numble alive, you can or send me a donation on Paypal

How to Play?

Project Structure

public_app/
β”œβ”€β”€ client_app/          # πŸ†• Client-only version (CURRENT - deployed to production)
β”‚   β”œβ”€β”€ index.html       # Main game page
β”‚   β”œβ”€β”€ js/              # JavaScript game logic
β”‚   β”œβ”€β”€ css/             # Stylesheets
β”‚   └── README.md        # Client app documentation
β”‚
β”œβ”€β”€ server_side_app/     # πŸ“¦ Original server-side version (kept for reference)
β”‚   β”œβ”€β”€ run.py           # Flask backend
β”‚   β”œβ”€β”€ utils.py         # Equation generator
β”‚   β”œβ”€β”€ templates/       # HTML templates
β”‚   └── static/          # Static assets
β”‚
β”œβ”€β”€ README.md            # This file
└── ...                  # Shared assets (logo, mockup, etc.)

Current Production Version: client_app/ (client-only, deployed to Cloudflare Pages)
Legacy Version: server_side_app/ (original Heroku deployment, kept for reference)

How to Contribute?

Make Numble better, however you want! The current active codebase is in client_app/:

  • Improve the JavaScript game logic
  • Enhance the UI/UX
  • Add new features (keeping in mind client-only limitations)
  • Optimize performance
  • Fix bugs

The original server-side code in server_side_app/ is kept for reference but is no longer actively maintained.

I am a Data Scientist, and as for all my web development skills -> I just want to make things work. So feel free to make big changes. I don't actively work on this project but would be happy to help in reviewing/approving your pull requests.

Oh and if you need some ideas on where to start, here is a laundry list of things that I wanted to do but never got around to,

To-Do

Completed βœ…

  • Fix Zero Equation Issue - no more 0 with x and /
  • change the colors of the available digits so more contrast between unused and unavailable. Black and grey are close
  • Add #thenumble to text
  • Add Dark Mode
  • Add stats
  • refresh session every day
  • Improve Colors
  • Python - JavaScript - Performance - half
  • Fix animation
  • Fix divide
  • Fix Cache - Persistent Storage
  • Remove debugging info - console.log, print
  • dynamic equation generation
  • Fix the stupid =
  • Fix double enter error - add disable enter boolean
  • Add time left
  • Help page
  • Lost - share word
  • Lost - remove 6/6
  • Word changed - update user / Cache equation
  • Privacy Policy
  • User stats
  • Custom seeds (mynumble)
  • Separate JavaScript
  • Migrate to client-side architecture πŸŽ‰

Future Enhancements

  • = animation?
  • Add global Stats (requires server - see limitations)
  • Add numblers today - count (requires server)
  • add IP? (not applicable for client-only)
  • add error messages (like no leading zeroes) - dont cheat
  • easy, medium, hard modes
  • Hints
  • Fix 00 - leading zeros before 0 (except 100 200 etc)
  • Add different colors for associativity
  • Timed scores - how long did you take
  • Analyze and fix issues - RankWatch
  • Add sitemap
  • Add robots.txt
  • Add about
  • Add preview image
  • Add alts for images (including Paypal donate button)
  • Add timeout for stats card

About

Numble is a game like Wordle, but for math nerds. You guess an equation in 6 guesses or less, with a new equation every day!

Resources

License

Stars

Watchers

Forks

Contributors