Snap! Websites Projects

Project Dependencies
(Click to Enlarge)

The Snap! Websites system makes use of several projects that are listed here.

All of these projects are maintained and supported by us so feel free to contact us if you have any problem or question. For contact information, check out the projects each has its own contact information.

All of the projects offered here are also available on launchpad (packages)

All our projects are documented, some have a separate reference found in the list of References of Snap! Websites Projects.

With time we end up with obsolete projects. We are keeping the obsolete projects pages and added a redirect to the new pages, but we are not working on those projects and they are not used in Snap! anymore.

  • Introduction

    Advanced getopt, the C++ libraryThis project is an advanced getopt() class to use with your C++ projects. It handles most everything that GNU-like tools offer as far as command line options go.

    The main idea is for you to have as little to do as possible parsing your command line arguments and configuration files. The library expects a table of available options with a short and long version of the options, and whether they accept arguments (i.e. -f <filename>).

    In your C++ program you can then just check whether a parameter is defined or not with the is_defined() function and get the value as a ...

  • as2js compiler

    The as2js compiler and library is used to convert C++ like scripts in JavaScript that will run in your browsers. The name comes ActionScript which is an extension of the ECMAScript language used by Flash Adobe that offers real classes, interfaces, and a complete system environment, contrary to browsers that only offer prototypes which are difficult to work with for most users.

    Current status: in development... we are fixing problems by writing a complete test suite with 100% coverage whenever possible. You can find the status of the coverage and tests below.

    The source code compiles, but most certainly does not work as expected yet. You can find it on here:

  • Introduction

    libaddr is an easy to use C++ library that parses IP addresses to C structures and C++ objects. This includes parsing one or more IPv4 and IPv6 addresses, with a port or a CIDR mask.

    The library also includes functions to list interfaces (i.e. "eth0", "eth1", etc.) and your route tables (see route(8).) The library actually includes a tool, ipv4_routes, one can use to list routes as the libaddr sees them.

  • Introduction

    We created a graphical based tool to check out a Cassandra database. Because of the possible cheer size of a Cassandra database, the tool is somewhat limited. At this time it will only really work well on smaller database, This is particularly practical for development when you test new things and want to make sure that the database includes the data that you expect of your tool.

  • CSS Preprocessor Logocsspp

    CSS Preprocessor (csspp) is a scripting language that transforms advanced (extended) CSS code into a script that browsers can read.

    The input to csspp can be the same as standard CSS, or it can use extensions as described below such as using basic math, embedding rules in other rules (cascading by nesting) and many other things.

    The project offers a C++ library that can readily be used in your own C++ project and a command line tool.

  • Introduction

    The C++ Thread project is the snap_thread.cpp/.h moved in its own project.

    We also will include any multi-thread related code to this project as we find it in our other libraries.

    The project allows for easy thread manipulation and communication which makes it really easy to add multitasking to your projects. It also includes a thread pool with workers which we want to ameliorate to allow for concurrent programming rather than parallel programming, very much based on the Go environment.

  • The Event Dispatcher LogoIntroduction

    The Event Dispatcher library is a low level C++ library used to communicate between local and remote services.

    For communication, the library supports TCP, UDP (direct and broadcast), Unix pipes.

    The event part also supports events from Unix signals and the File System.

    Each one of these objects can also be given a timeout date or an elapse time to generate ticks.

    Most of the components of the Event Dispatcher library were developed in the libsnapwebsites library. It was detached from that library so we could make use of its powerful features in other projects.

  • The ftmesh project is used to read a font and transform it in a list of triangles (i.e. ft → font; list of triangles → mesh).

    The handling and math are based on the ftgles project.

    The library loads FreeType fonts or any other font supported by the FreeType library and which supports vectors. It then transforms the polygons in meshes. A single character may be represented by multiple meshes; for example, the character "i" has a dot which has to be a separate mesh to work as expected.

    The advance in a string takes the kerning in account if present.

    Note: the library ...

  • Hammer with a forbidden sign on top.The iplock tool is a very simple to use executable used to add or remove IP addresses to your iptables firewall to protect your services such as Apache and Postfix and all local systems.

    The tool reads a set of configuration files under /etc/iplock/... where iptables commands and ports are defined. It is used by the tool to generate the iptables commands to run in order to block or unblock a set of IP addresses.

    The current version supports any number of configurations that can apply blocks in any number of firewall chains. The default offers blocks for specific sets of ports as defined by:

    • HTTP
    • SMTP
    • All (block all ports, no matter what)
  • IP Manager LogoThe IP Manager is a tool we created in order to manage our DNS zone files.

    Doing those manually is time consuming and many of the parameters (most, actually!) are repeated between all the different files.

    Instead of creating a zone, we actually use the rndc and nsupdate tools to create a new dynamic zone and add sub-domains to them.

  • Introduction

    libexcept library logo

    The Snap! C++ project makes use of exceptions whenever it bumps in a problem which can't be resolved at the time it is detected.

    This model means that exceptions are usually fairly rare (once in a while we have a problem and generate problematic exceptions, but we tend to fix those quickly.) In other words, our exceptions are pretty exceptional. For example, a file can't be opened when it should, we are likely to throw a Run Time Exception.

    As a result, it is possible for us to do something rather slow in our exceptions:

    Collect a Stack Trace

    This helps us ...

  • Serialization Made Easy with Qt

    Qt Serialization logoThe libQtSerialization library is a Qt extension that makes it really easy to serialize your data in a forward and backward compatible way1.

    The library is composed of two sides: the QWriter which helps you serialize data, and the QReader that helps you unserialize data.

    • 1. Being foward and backward compatible means you should be able to load your serialized data from newer and older versions of your software without having to tweak the serialized data before hand.
  • Introduction

    libutf8 to seamlessly handle UTF-8 in C++This project is a C++ library used to seamlessly handle UTF-8 strings. It offers very easy to use functions to convert characters and strings between UTF-32 and UTF-8.

    The library also includes a string iterator to go through a UTF-8 string without having to first convert it to a UTF-32 string (which saves you a malloc() and free() and up to 4x the space the original string in memory saving.)

    Later we intend to add support for UTF-16.


    The source is available on github in our project git.

    On Ubuntu, you may want to install it from our Snap! C++ Launchpad PPA. ...

  • The Catch2 logo from the catch2 project.

    Many of our C++ test make use of catch.hpp which is a standalone C++ header allowing us to very quickly develop unit tests against our code.

    We also have our own extensions in the snapcatch2.hpp file so we can very quickly create new tests with our standard set of command line extensions, verbose sections, etc.

  • Snap! CMake Modules ExtensionsIntroduction

    Snap! comes with many different projects, all of which need a common set of cmake rules and some of those are rather complex. For that reason we created a common project used to compile all of those projects. This project is the Snap! CMake Modules.


  • The Snap! Database System

    Snap! Database — a diverse database system for the Snap! CMSThe Snap! C++ Content Management System makes use of two databases at this point: Cassandra and Snap! Database System (sdbt).

    The Cassandra system has several drawbacks which we are slowly fixing by implementing the SDBT environment. The main one at first is to have a set of journaling tables which Cassandra has a really hard time with. This is because it creates tombstones and the Cassandra files grow indefinitely rendering the whole system very slow over time. It is slow because Cassandra ends up having to scan these large files from start to finish to gather the data on a read. Such reads end up being very long. When over about 10 seconds, it tends to timeout and more or less it breaks everything. So Cassandra is not a good solution for this type of tables.

  • The snapdev project includes a set of base classes and functions that are header only (a.k.a. inline). A form of std library, if you you wish, but mostly geared toward helper functions we use all over the place.

    The following are the features available at time of writing. It is not unlikely to grow every now and then.


    Change a file owner and group by name.


    Compute the intersection of two sets and return true if empty. The idea is that there is an algorithm to very quickly compute such a result without having to do any copy. Computing an ...

  • Lamport Algorithm in my book about "Distributed Systems: an algorithm approach" -- click to check out  the book on

    Chapter 7. Mutal Exclusion — Lamport's solution, also called the Bakery Algorithm (p. 130)


    The snaplock project is part of the snapwebsites environment. It is a daemon written in C++ allowing you to lock various resources on an entire cluster of computers for a small amount of time. A resource has a URL which is what we use to create the lock (we call it the Object Name.) The URL can be global to the whole cluster, specific to a website, or even specific to one special variable in a specific page of a specific website (in other words, very small granularity is ...

  • The Snap! Logger Project

    Snap Logger LogoOriginally, this project was a break up of the log.cpp and log.h from the libsnapwebsites to its own project. However, that implementation had a dependency on log4cplus which has all sorts of drawbacks for our Snap! environment. Don't get me wrong, up to here, it served us well and log4cplus version 1.2.x works very well.

    That being said, our way of handling configuration files, the fact that we like to use fork() and a few other things, made us think that having our own implementation of a logger would improve our general environment quite a bit. This newer version of the logger is the result.

  • Introduction

    WARNING: We are in the process of replacing this tool with snapmanager.cgi and snapmanagerdaemon which together allow an administrator to manage his cluster of computers. We already installed a 12 computer cluster with these two tools. At this time, the snapmanager is still necessary to setup the domains and websites tables, but that too will be converted to an interface accessible through snapmanager.cgi.

    The Snap! Manager graphical tool was created in order to setup the basics in the database. This is important because without those basics snapcgi and snapserver do not know ...

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly