Puzzle Massive Overview
Massively Multiplayer Online Jigsaw Puzzles web application.
Project is hosted on sourcehut: puzzle-massive, however access to the project's source code is not publicly available. Ask Jake for a downloadable archive file of the source code. Please include your reason why you'd like to access it.
Puzzle Massive is a hobby project that Jake Hickenlooper is doing in his spare time. This is version 3, which is a rewrite of version 2.
Goals
- Handle thousands of players moving thousands of pieces.
- Local-first; support offline capabilities and let users own their data.
- A fun project to hack on.
- A sustainable and cost-effective project.
- Learn something new and apply it.
Overview
The technology stack is:
- Python for most server side applications
- Web frameworks LiteStar and Chill
- Database is SQLite for persistent storage
- redict for active data
- Client side makes use of Web Components, htmx, IndexedDB, and [lit-html]
- HTML canvas, and SVG for puzzle pieces interaction and rendering; based on the example from piecemaker, but uses three.js
- NGINX as the web proxy server
- Chillbox for keeping things cool
Software
Jigsaw puzzle related
- BeautifulSoup An XML parser
- CustomShapeJigsawJs A custom border jigsaw puzzle generator for laser cutting based on Voronoi tesselation
- ImageMagick is a free, open-source software suite, used for editing and manipulating digital images.
- piecemaker Create jigsaw puzzle pieces
- svgwrite Python Package to write SVG files
Backend (Server side)
- Chill a database driven web application framework in Flask and it can be used to create static or dynamic web sites.
- Litestar is a powerful, flexible, highly performant, and opinionated ASGI framework.
- PyJWT JSON Web Token implementation in Python
- Python is a programming language that lets you work quickly and integrate systems more effectively.
- SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine.
- arq Fast job queuing and RPC in python with asyncio and redis.
- boto3 AWS SDK for Python
- cedar is a language for defining permissions as policies, which describe who should have access to what.
- httpx A next-generation HTTP client for Python.
- msgspec is a fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML.
- redict is a distributed key/value store (a remote dictionary, if you will).
Frontend (Browser side)
- @msgpack/msgpack implementation of MessagePack for TypeScript and JavaScript, providing a compact and efficient binary serialization format.
- Phosphor is a flexible icon family for interfaces, diagrams, presentations — whatever, really.
- Plain Javascript Vanilla JavaScript for building powerful web applications
- htmx high power tools for HTML
- idb IndexedDB with usability.
- idiomorph is a DOM morphing algorithm created by the htmx creator.
- lit-html The rendering library used by LitElement.
- main.css A repository for the development of the HTML5 Boilerplate CSS file, main.css
- normalize.css A cross-browser CSS foundation
- pure.css A set of small, responsive CSS modules that you can use in every web project.
- rbush a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles
- three.js JavaScript 3D Library.
- utils-text SUIT CSS text utilities.
Infrastructure
- Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
- Chillbox Deployment scripts for websites running on Alpine Linux or Debian servers.
- Debian the universal operating system
- Litestream Fully-replicated database with no pain and little cost.
- NGINX is an HTTP web server, reverse proxy, content cache, load balancer, TCP/UDP proxy server, and mail proxy server.
- OpenTofu is a fork of Terraform that is open-source, community-driven, and managed by the Linux Foundation.
- rauthy Rauthy is an OpenID Connect (OIDC) Provider and Single Sign-On solution written in Rust.
- thumbor open-source smart on-demand image cropping, resizing and filters
Development
- GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.
- docker Containers
- esbuild An extremely fast bundler for the web
- ruff An extremely fast Python linter and code formatter, written in Rust.
- sqlfluff The SQL Linter for Humans
- vendor-grab Download gzipped tar files from URLs and extract only selected files to destination paths in current working directory.
Services
- DigitalOcean Hosting
- Gravatar Your Free Avatar, Profile, and Link In Bio.
- Let's Encrypt A nonprofit Certificate Authority providing TLS certificates to 500 million websites.
- Postmark The email delivery service that people actually like
- Unsplash Over 6 million free high-resolution photos and illustrations brought to you by the world’s most generous community of contributors.