Skip to content

Installation

Requirements

Before you begin, make sure your system has the following:

  • C++17 or later (C++23 recommended)
  • CMake 3.20+
  • Boost (program_options, asio, beast, multi_index, uuid, json)
  • OpenSSL
  • {fmt} library

On Ubuntu or Debian, you can install the dependencies with:

bash
sudo apt update
sudo apt install build-essential cmake libboost-all-dev libssl-dev libfmt-dev

On macOS with Homebrew:

bash
brew install cmake boost openssl fmt

Building from Source

Clone the repository and build the framework:

bash
git clone <repo-url>
cd Service
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j$(nproc)

This produces the static library libframework.a that you can link into your own projects.

Installing the Framework

The project includes an install script that sets up the framework SDK on your system:

bash
./scripts/install.sh

This will copy the headers to /usr/local/include and the library to /usr/local/lib.

Creating Your First Project

Once the framework is installed, create a new directory for your service:

bash
mkdir my-service && cd my-service

Create a CMakeLists.txt that finds the installed framework:

cmake
cmake_minimum_required(VERSION 3.20)
project(MyService)

# Find the framework library installed by scripts/install.sh
find_library(FRAMEWORK_LIB framework PATHS /usr/local/lib)
if(NOT FRAMEWORK_LIB)
    message(FATAL_ERROR "Service Framework not found. Run scripts/install.sh first.")
endif()

add_executable(my_service main.cpp)
target_link_libraries(my_service ${FRAMEWORK_LIB})
target_include_directories(my_service PRIVATE /usr/local/include)

Now you are ready to write your first service. Continue to Your First Service.

Note: You can also use the pre-built Docker image. See Docker for details.