{"id":22218292,"url":"https://github.com/coders-school/desktop-business-app","last_synced_at":"2025-07-03T17:34:25.945Z","repository":{"id":222711685,"uuid":"745824368","full_name":"coders-school/desktop-business-app","owner":"coders-school","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-29T22:32:21.000Z","size":3590,"stargazers_count":0,"open_issues_count":45,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-30T00:45:02.727Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coders-school.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-01-20T08:53:15.000Z","updated_at":"2024-10-27T10:37:32.000Z","dependencies_parsed_at":"2024-03-17T00:36:55.404Z","dependency_job_id":"4a7ae3fb-9f8b-41b2-a1c5-6cf0a5c45e75","html_url":"https://github.com/coders-school/desktop-business-app","commit_stats":null,"previous_names":["coders-school/desktop-business-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fdesktop-business-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fdesktop-business-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fdesktop-business-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fdesktop-business-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coders-school","download_url":"https://codeload.github.com/coders-school/desktop-business-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227810979,"owners_count":17823289,"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":"2024-12-02T22:20:10.618Z","updated_at":"2025-07-03T17:34:25.932Z","avatar_url":"https://github.com/coders-school.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Desktop Business Application\n\nTBD...\n\n## Development\n\n### Prerequisites\n\n- Docker\n- Google Test and Google Mock\n- C++20\n- clang-format (recommended minimum ver. 17)\n- OpenSSL\n\n### Format code before committing manually\n\n```bash\nfind . -name '*.cpp' -or -name '*.hpp' | xargs clang-format --verbose -style=file -i\n```\n\n\n### Build\n\n```bash\ndocker build -t desktop-business-application .\n```\n\n### Run image in terminal\n\n```bash\ndocker run -it --entrypoint /bin/bash desktop-business-application\n```\n\n### Run all tests from image\n```bash\ndocker run -it --entrypoint=\"/application/bin/desktop-business-app-tests\" desktop-business-application\n```\n\n### Running test locally\nAfter building test target locally  we can run all tests:\n```bash\ncd bin\n./desktop-business-app-tests\n```\n\nOr we can limit testing to some tests according to our needs (finding best phrase in our test code like test-case name), for example:\n```bash\ncd bin\n./desktop-business-app-tests --gtest_filter=\"*ReceptionistTestFixture*\"\n```\n\n### Run GUI application from docker (on Ubuntu)\n\n```bash\nxhost +local:docker\ndocker run --net=host -e DISPLAY=$DISPLAY desktop-business-application\n```\n\n### Investigating memory issues in valgrind\nExample of installing `valgrind` on ubuntu:\n\n```bash\nsudo apt install valgrind\n```\nAfter building tests for example one can run valgrind on tests:\n\n```bash\ncd bin\nvalgrind --leak-check=full ./desktop-business-app-tests\n```\n\nIf we want to limit our output somehow, we can find a best identification string in our test's name and use it like this:\n\n```bash\nvalgrind --leak-check=full ./desktop-business-app-tests --gtest_filter=\"*Association*\"\n```\n\n### New scripts for clean builds of backend and test targets\nTwo scripts are provided for convenience of building \"backend\" and \"tests\" targets (they might require privilages adding):\n\n1. clean build of backend\n```bash\n./backend_clean_build.sh\n```\nPlease note that this makes clean build of backend, so if you have just minor changes it might be more convenient to rebuild manually.\nThis will not rebuild external_libraries from scratch if they exist and there is no version change.\n\n2. clean build of tests with previous clean build of backend\n```bash\n./tests_and_backend_clean_build.sh\n```\nPlease note that this makes clean build of backend and test, so if you have just minor changes or just tests-changes for example might be more convenient to rebuild manually.\nThis will not rebuild external_libraries from scratch if they exist and there is no version change.\n\n### Running ctest\nAfter building test targets, ctest running all the tests can be run in 2 ways:\n1. from `build` directory, simply using command `ctest`\n2. from main desktop-app-folder via script\n   ```bash\n    ./ctest_run.sh\n   ```\n   I recommend using script. It is tailored to print main info and just failed tests\n\n\n\n\n### docker container\nWe can mount a local directory (volume) to Docker container. This way any changes we make locally will immediately be reflected in the conatiner without need to rebuild the image every time.\n\nTo work with it follow steps:\n\n1. Run script run_container.sh \nNow you should have working container, which is detached and is running in the background.\nYou can check it using command: \n```\ndocker ps\n```\nYou should see output as follows:\n```\n$ docker ps -a\nCONTAINER ID   IMAGE                  COMMAND               CREATED       STATUS          PORTS     NAMES\n37383cccbce3   desktop-business-app   \"tail -f /dev/null\"   5 hours ago   Up 43 minutes             desktop-business-app\n```\n2. Enter docker container \nTo enter docker container use docker exec command\n```\ndocker exec -it desktop-business-app /bin/bash\n```\nNow you should be inside docker container named desktop-business-app.\nYou can add them to your .bashrc file.\nI recommand adding aliases to speed up work\n\n```\nalias doe=\"docker exec -it desktop-business-app /bin/bash\"\nalias domake=\"docker exec desktop-business-app make -C /application/build\"\nalias dotest=\"docker exec desktop-business-app ctest --test-dir /application/build\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoders-school%2Fdesktop-business-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoders-school%2Fdesktop-business-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoders-school%2Fdesktop-business-app/lists"}