Skip to content
This is the primary codebase for the WWW2PNG web application.
Python HTML CSS TSQL JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status Requirements Status Status Uptime Twitter Follow

This is the primary codebase for the www2png web application.

WWW2PNG is a free webpage screenshot service API with blockchain anchoring using RigidBit and Ethereum.

Development Prerequisites

Before developing on this application you should have working knowledge of the following technologies and toolchains:

You should also have working experience with the following frameworks and libraries:

You must have the following installed in your development environment to properly build:

Development Server Prerequisites

Production Server Prerequisites

Production Server Fonts

Websites in languages that do not use Roman characters may require additional fonts to display correctly. The fonts DejaVu and Noto are free fonts that can be installed which handle many of the common languages.

Development Setup

Supported Platforms

Ubuntu Linux 18.04 is the official development environment, however it may also work with other environments.

Basic Webserver Setup Procedure

  • Configure all server prerequisites.
  • Create a web directory and create an initialized venv directory within it.
  • Install dependencies within the venv.
  • Populate .env with secrets and settings.
  • Configure PostgreSQL server with a new database, user, and install the tables from dev/sql/create_tables.sql.
  • Configure webserver to use WSGI with the venv and serve static content from the static directory.


The steps below outline how to setup and start the development environment. This is different than production!

Using a venv is highly recommended.

python -m venv init venv
source venv/bin/activate

Installing dependencies from requirements.txt:

pip install -r requirements.txt

Saving dependencies to requirements.txt:

Using pipreqs is recommended over pip. While in an active venv use the following to regenerate requirements.txt.

pipreqs --ignore node_modules --force

Setting up the .env file:

See for a basic template.

Creating symbolic links:

Symbolic links will need to be setup from the src directory to the corresponding folders in the project root.

ln -s ../data src/data
ln -s ../static src/static

Starting the development server:

npm run flask


FLASK_APP=src/ FLASK_DEBUG=1 python -m flask run -h -p 5000

Starting the development CSS builder:

npm start

Starting the pruning service:


Starting the processing service:


Starting the aciton processing service:


Deploying to Production

Building static assets for production:

This builds all static CSS assets and puts them in the static folder.

npm build


Copy the following files and folders to the remote server.


Create the following empty folders.


Create symbolic links.

ln -s ../data src/data
ln -s ../static src/static

Create a venv and install the requirements.

python -m venv init venv
source venv/bin/activate
pip install -r requirements.txt

Configuring the web server:

Setup your webserver to serve static content from the static folder. All other requests should be sent to the uWSGI handler.

See for a basic Nginx configuration example.

Setting up services:

You will need to also setup services for:


You can use any service manager, but systemd is recommended. See for a basic configuration examples.


Setup the venv, symlinks, and database as noted above. The .env will need to be populated with valid settings. The webserver and uWSGI is not needed for testing.

To launch tests execute the following command from the project root:

npm run test


python -m unittest discover tests
You can’t perform that action at this time.