Skip to content

Instantly decode word search grids. Features image upload, automatic puzzle solving, and a premium "Phoenix" dark theme interface.

License

Notifications You must be signed in to change notification settings

SyntaxAdi/Word-Grid-Solver-Web

Repository files navigation

Project Logo

❯ Word Grid Solver

Decode puzzles instantly, unleash hidden words

Built with the tools and technologies:

HTML5 CSS3 JavaScript Flask Docker Python


Table of Contents

I. Table of Contents
II. Overview
III. Features
IV. Project Structure
    IV.a. Project Index
V. Getting Started
    V.a. Prerequisites
    V.b. Installation
    V.c. Usage
VI. Contributing
VII. License


Overview


Features

Component Details
⚙️ Architecture
  • Simple Flask web service (single‑module entry point)
  • Static word list (words_alpha.txt) loaded at runtime
  • Docker‑based deployment (Dockerfile builds a Python 3 image)
🔩 Code Quality
  • Dependencies pinned in requirements.txt → reproducible builds
  • No explicit linting or type‑checking configuration (e.g., no flake8, mypy)
  • Minimal inline documentation; function names are self‑descriptive
📄 Documentation
  • Dockerfile provided – shows build steps and entrypoint
  • Missing high‑level README/usage guide
  • requirements.txt serves as informal API surface list
🔌 Integrations
  • Flask – HTTP routing & request handling
  • Requests – outbound HTTP calls (if any)
  • Werkzeug – underlying WSGI utilities (used by Flask)
🧩 Modularity
  • All logic currently in a single Python module (low modularity)
  • Static data (words_alpha.txt) kept separate for easy replacement
🧪 Testing
  • No test suite detected (no tests/ folder, no pytest/unittest config)
  • CI pipeline only builds Docker image, no test execution

Project Structure

└── /
    ├── app.py
    ├── Dockerfile
    ├── requirements.txt
    ├── solver.py
    ├── static
    │   ├── script.js
    │   └── style.css
    ├── templates
    │   └── index.html
    └── words_alpha.txt

Project Index

/
__root__
⦿ __root__
File Name Summary
app.py - Provides the web entry point for the application, exposing a homepage and an API endpoint that accepts image uploads and optional clues, stores the file temporarily, delegates processing to the solver module, returns the solution as JSON, and removes the temporary file
- Runs the Flask server on a configurable port, integrating the UI with the core solving logic.
Dockerfile - Provides a reproducible container environment for the Python application, establishing a lightweight 3.9‑slim base, installing required packages, and configuring a dedicated non‑root user with appropriate permissions for the /app directory and uploads folder
- Exposes port 7860 and launches the main app script, enabling consistent deployment and isolation within the overall microservice architecture.
requirements.txt - Defining the projects external Python dependencies, the requirements list guarantees that the Flask 3.0.0 web framework and its supporting libraries such as Requests and Werkzeug are installed with exact versions
- This ensures a reproducible environment across development, testing, and production, allowing the application layers to interoperate reliably within the overall architecture.
solver.py - Integrates OCR, grid parsing, dictionary loading, and word‑search solving
- Serving as the core orchestrator, it transforms an image of a word search puzzle into a searchable grid, extracts clue patterns, validates candidates against an English word list, and outputs found words
- It connects user interaction, external API calls, and utility functions within the overall application.
words_alpha.txt - Providing a comprehensive list of lowercase English words, words_alpha.txt serves as the central lexical resource for the projects text-processing components
- It enables functions such as validation, autocomplete, and linguistic analysis across modules, ensuring consistent word reference without external dependencies
- The dataset underpins features like spell checking, word games, and natural language utilities throughout the application.
templates
⦿ templates
File Name Summary
index.html - Render the primary web interface for the Antigravity Word Search Solver, establishing the navigation bar, input section for image uploads or clue text, and results display area
- It integrates the shared stylesheet and client‑side script via Flask’s url_for, acting as the central template that bridges user actions with the backend solving engine across the application.
static
⦿ static
File Name Summary
script.js - Handles the full client-side lifecycle of the application, managing drag-and-drop events and file inputs for image sourcing while providing real-time image previews
- It orchestrates asynchronous communication with the Flask backend to submit data and dynamically updates the DOM to display loading states, the detected grid matrix, and interactive search results with copy-to-clipboard functionality.
style.css - Implements the 'Phoenix Theme', a modern dark-mode design system featuring a dark grey palette with vibrant orange accents to create a high-contrast, tech-inspired aesthetic
- It establishes a responsive grid layout and defines component styles for the upload zone, input panels, and action buttons, incorporating CSS animations and visual effects like glows and scanline backgrounds for a premium user experience.

Getting Started

Prerequisites

This project requires the following dependencies:

  • Programming Language: Python
  • Package Manager: Pip
  • Container Runtime: Docker

Installation

Build from the source and intsall dependencies:

  1. Clone the repository:

    ❯ git clone ../
  2. Navigate to the project directory:

    cd 
  3. Install the dependencies:

    Using docker:

    ❯ docker build -t / .

    Using pip:

    ❯ pip install -r requirements.txt

Usage

Run the project with:

Using docker:

docker run -it {image_name}

Using pip:

python3 app.py

Contributing

  • 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
  • 🐛 Report Issues: Submit bugs found or log feature requests for the Word Grid Solver project.
  • 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
  • 🌟 New Feature or Idea?: If you're looking to outsource your project and want someone who delivers without excuses, I’m available for end-to-end development across multiple domains.
Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your LOCAL account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone .
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to LOCAL: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Details

License

This project is protected under the MIT License. For more details, refer to the LICENSE file.



About

Instantly decode word search grids. Features image upload, automatic puzzle solving, and a premium "Phoenix" dark theme interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published