{"id":23904798,"url":"https://github.com/sergio-eld/hash-service","last_synced_at":"2025-02-23T11:44:43.436Z","repository":{"id":233158553,"uuid":"624404302","full_name":"sergio-eld/hash-service","owner":"sergio-eld","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-12T20:36:11.000Z","size":49,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-05T00:47:10.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergio-eld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-06T11:51:17.000Z","updated_at":"2023-04-14T21:07:33.000Z","dependencies_parsed_at":"2024-04-14T07:50:50.598Z","dependency_job_id":"89d29e88-09c0-48a3-a875-7ba1c16ab504","html_url":"https://github.com/sergio-eld/hash-service","commit_stats":null,"previous_names":["sergio-eld/hash-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-eld%2Fhash-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-eld%2Fhash-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-eld%2Fhash-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-eld%2Fhash-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergio-eld","download_url":"https://codeload.github.com/sergio-eld/hash-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240310871,"owners_count":19781341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-05T00:47:11.662Z","updated_at":"2025-02-23T11:44:43.408Z","avatar_url":"https://github.com/sergio-eld.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Hashing service\nA small asynchronous TCP server providing a hashing functionality.\n\n## Description\nThis is a sample project based on a test assignment. The server expects lines of ASCII characters terminated by an `'\\n'` \n(single byte of value `10`) and for each line responds with its sha256-encoded hash in a HEX format, also terminated by\n`'\\n'`. For details refer to [specification.md](specification.md).  \n\nThe project is intended to demonstrate the full development lifecycle alongside with:\n- building a cross-platform application (including cross-compiling)\n- unit and functional testing of a system.\n- deployment\n- automated CI/CD using GitHub actions.\n\nThe project may and is expected to be used as a reference for solving recurring problems.\n\n## Building\nAccording to the specification, the target system is Ubuntu 20.04. Hence, all the required dependencies should be\ninstalled on your machine (currently: using `apt` or `pacman` is building with msys2). \nList of the dependencies can be found in [Dockerfile.dev](Dockerfile.dev). Package versions should be compatible with \nthose available on Ubuntu 20.04 (*TODO: specify versions explicitly*).    \nScripts for cross-platform package managers like Conan are not yet configured (*TODO*).  \nThe project can be built on your local machine or using the [Dockerfile.dev](Dockerfile.dev) image.\n\n### CMake  \n\nOptions:  \n- `BUILD_TYPE [Release|Debug|RelWithDebInfo|MinSizeRel]` build configuration. `Debug` by default.\n- `ALL_WARNINGS [ON|OFF]` maximum warnings level. `ON` by default.\n- `CLEAN_BUILD [ON|OFF]` treat all warnings as errors. `ON` by default\n- `BUILD_TESTS [ON|OFF]` enable tests. Will require `GTest` and `Pytest`. `ON` by default. \n- `UNIT_TESTS [ON|OFF]` enable unit tests. Will require `GTest`. Depends on `BUILD_TESTS`. `ON` by default.\n- `FUNCTIONAL_TESTS [ON|OFF]` enable functional tests. Will require `Pytest`. Depends on `BUILD_TESTS`. `ON` by default.\n- `DEBUG_ASIO [ON|OFF]` enables `ASIO_ENABLE_HANDLER_TRACKING`. `OFF` by default.   \n\nCommand:\n```\n\u003e mkdir build\n\u003e cd build\n\u003e cmake .. -G\u003cGENERATOR\u003e -DCMAKE_BUILD_TYPE=[Release|Debug|RelWithDebInfo|MinSizeRel] \n[-D[OPTION]...] \n[-DCMAKE_INSTALL_PREFIX=\u003cpath/to/output/packages\u003e]\n\u003e cmake --build . \n\u003e ctest .\n\u003e cmake --install .\n```\nTesting and installation is optional. \n\n### Docker\nThis project provides a [Dockerfile.dev](Dockerfile.dev) to build a Docker image to be used for building and \ndebugging purposes.  \nBuilding: `docker build -f ./Dockerfile.dev -t hash-service-dev .`  \nRunning: \n```\ndocker container run --rm -it -v $(pwd):/app:ro -v $(pwd)/build:/app/build hash-service-dev bash\n```\nThis command will run the container, mapping the source directory in `read-only` mode and `./build` in `write` mode \n(to output the built files).  \nWhen connected to the container's shell, build commands for CMake can be executed.  \nThe [Dockerfile.dev](Dockerfile.dev) also contains a gdbserver.\n\n### Cross-compilation\n(*TODO*)\n\n## Deployment\nCPack is used for generating installation packages.\n(*TODO: Ubuntu, Windows*)\n\n## TCP Server\n### Installation\n(*TODO*)\n\n### Running\nHashing server can be run using the following command:\n```\n\u003e ./server [port = 23]\n```\nThe server handles termination via `Ctrl + C` (SIGINT on Ubuntu).\n\n## CI \nCurrently, a `.yml` file for GitHub actions is implemented in `.github/workflows`.  \nThe pipeline supports:\n- Building\n- Running tests (TODO: functional, i.e. using docker-compose)\n- Deployment using CPack\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio-eld%2Fhash-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergio-eld%2Fhash-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio-eld%2Fhash-service/lists"}