A web-based, single-page application (SPA) for creating, editing, and playing Nonogram (Picross/Griddlers) puzzles.
- View existing nonograms from a predefined collection
- Search nonograms by row/column clues
- Play nonograms with validation and completion detection
- Create new nonograms with custom dimensions
- Edit existing nonograms
- Automatic calculation of row and column clues
For detailed information about the application, please refer to the following documentation:
- User Guide - How to use the application's features
- Architecture - Overview of the application's design and architecture
- Deployment Guide - Instructions for deploying the application
This project is divided into two main parts:
- Backend API (Python/FastAPI): Serves nonogram data and handles search queries
- Frontend SPA (Svelte/SvelteKit): Provides the user interface for all nonogram operations
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv .venv -
Activate the virtual environment:
- Windows:
.venv\Scripts\activate - macOS/Linux:
source .venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
From the backend directory with the virtual environment activated:
uvicorn main:app --reloadThe API will be available at
http://localhost:8000
-
From the frontend directory:
npm run devThe application will be available at
http://localhost:5173
- Use the dropdown menu to select a nonogram from the list.
- Click "Load Selected" to load the nonogram.
- The nonogram will load in "View" mode by default.
- Click the "Play" button to enter Play mode.
- Click or drag on grid cells to fill them. Right-click to mark cells with an X.
- When you correctly complete the puzzle, a success message will appear.
- Enter a clue pattern in the search box (e.g., "3 4" or "1,1,1").
- The application will search for nonograms with matching row or column clues.
- Select a nonogram from the search results and click "Load Selected".
- Click "New Puzzle".
- Enter the desired dimensions for the grid (rows and columns).
- Click "Create Grid".
- Click/drag on cells to toggle them between filled and empty.
- The clues will update automatically based on your grid.
- Click "Process Nonogram" to finalize your creation.
- Load a nonogram.
- Switch to "Edit" mode using the mode selector.
- Modify the grid by clicking on cells.
- The clues will update automatically.
- Click "Process Nonogram" to apply your changes.
nonogram-editor/
├── backend/
│ ├── app/
│ │ ├── api/
│ │ │ └── nonograms.py # API endpoints
│ │ ├── core/
│ │ │ ├── models.py # Pydantic data models
│ │ │ └── crud.py # Data operations
│ │ └── data/
│ │ └── nonogram-games.json # Sample nonogram data
│ ├── main.py # FastAPI application
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── src/
│ │ ├── lib/
│ │ │ ├── components/ # Svelte components
│ │ │ ├── stores/ # Svelte stores for state management
│ │ │ └── api/ # API client
│ │ └── routes/ # SvelteKit routes
│ ├── package.json # Node.js dependencies
│ └── svelte.config.js # Svelte configuration
├── docs/
│ ├── ARCHITECTURE.md # Application architecture documentation
│ ├── DEPLOYMENT.md # Deployment guide
│ └── USER_GUIDE.md # User manual
└── README.md # This file
- FastAPI: High-performance web framework for building APIs
- Pydantic: Data validation and settings management
- Uvicorn: ASGI server for running FastAPI applications
- SvelteKit: Framework for building web applications
- Svelte: Component-based JavaScript framework
- TypeScript: Typed JavaScript for better developer experience
- User accounts for saving personal puzzles
- Persistent storage of created/edited nonograms
- Advanced editor tools (line drawing, fill tool)
- Puzzle difficulty indicators
- Mobile optimization
- Automated test suite
If you encounter npm dependency errors when installing the frontend packages, use the --legacy-peer-deps flag:
cd frontend
npm install --legacy-peer-deps
This is necessary due to some version conflicts between SvelteKit and its plugins. Using this flag allows npm to bypass the peer dependency check and install the packages anyway.
Alternatively, you can use the -f or --force flag, but this is less recommended:
cd frontend
npm install --force
Some unit tests may fail due to TypeScript configuration issues. We're working on resolving these issues in future updates. These failures don't affect the functionality of the application.