{"id":16107700,"url":"https://github.com/n3d1117/book-manager","last_synced_at":"2026-05-06T08:34:39.189Z","repository":{"id":56298498,"uuid":"290498863","full_name":"n3d1117/book-manager","owner":"n3d1117","description":"A simple book manager, built using test driven development (TDD) with Java and Maven.","archived":false,"fork":false,"pushed_at":"2020-11-16T07:42:00.000Z","size":325,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T03:45:44.794Z","etag":null,"topics":["continuous-integration","github-actions","java","maven","sonarqube","test-driven-development"],"latest_commit_sha":null,"homepage":"https://edoardo.fyi/blog/2020/10/book-manager/","language":"Java","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/n3d1117.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}},"created_at":"2020-08-26T13:07:14.000Z","updated_at":"2024-08-12T20:05:09.000Z","dependencies_parsed_at":"2022-08-15T16:10:50.561Z","dependency_job_id":null,"html_url":"https://github.com/n3d1117/book-manager","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/n3d1117/book-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fbook-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fbook-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fbook-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fbook-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n3d1117","download_url":"https://codeload.github.com/n3d1117/book-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fbook-manager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259368018,"owners_count":22846822,"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":["continuous-integration","github-actions","java","maven","sonarqube","test-driven-development"],"created_at":"2024-10-09T19:24:10.942Z","updated_at":"2026-05-06T08:34:34.170Z","avatar_url":"https://github.com/n3d1117.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Book Manager\n\n![Build on CI with Maven](https://github.com/n3d1117/book-manager/workflows/Build%20on%20CI%20with%20Maven/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/n3d1117/book-manager/badge.svg)](https://coveralls.io/github/n3d1117/book-manager)\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=n3d1117_book-manager\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=n3d1117_book-manager)\n\nA simple book manager, built using test driven development (TDD) with Java and Maven.\n\n![Screenshot](https://user-images.githubusercontent.com/11541888/94684440-5e43aa00-0328-11eb-9f79-75986361e5fd.png)\n\n## Requirements\n* Java 8\n* Maven \n* Docker\n\n## Run Tests\nTo test the app, clone this repository somewhere on your machine and run the following command:\n```bash\nmvn clean verify\n```\n\n### Code Coverage\nYou can enable 100% code coverage checks with [JaCoCo](https://www.eclemma.org/jacoco/) by adding the `jacoco-check` profile to the previous command:\n```bash\nmvn clean verify -P jacoco-check\n```\n\n### Mutation Testing\nSimilarly, you can enable mutation testing with [PIT](https://pitest.org) by adding the `mutation-testing` profile:\n```bash\nmvn clean verify -P mutation-testing\n```\n\n## Run the app\n* Build the fat Jar file using Maven:\n```bash\nmvn -DskipTests=true clean package\n```\nThis will create a file called `book-manager-1.0-SNAPSHOT-jar-with-dependencies.jar` inside `target` folder. Alternatively, you can download a precompiled fat `.jar` from the [releases page](https://github.com/n3d1117/book-manager/releases).\n\n* A MongoDB replica set is required for MongoDB transactions, as stated in [documentation](https://docs.mongodb.com/manual/core/transactions/). This project includes a `Dockerfile` that automatically deploys a single node replica set. You can build the image with:\n```bash\ndocker build -t book-manager-db .\n```\n* Once done, run the image (specifying the port) and wait a few seconds:\n```bash\ndocker run -p 27017:27017 --rm book-manager-db\n```\n* Finally, start the app:\n```bash\njava -jar target/book-manager-1.0-SNAPSHOT-jar-with-dependencies.jar [options]\n```\n\n### Available Options\n| Option | Description |\n|-|-|\n| `--mongo-replica-set-url` | The URL of the MongoDB replica set. Defaults to `mongodb://localhost:27017` |\n| `--db-name` | The database name. Defaults to `bookmanager` |\n| `--db-author-collection` | Name of the authors collection in database. Defaults to `authors` |\n| `--db-book-collection` | Name of the books collection in database. Defaults to `books` |\n\n### Coveralls Integration\nTo enable [Coveralls](https://coveralls.io) integration, enable the `jacoco-report` profile to generate the JaCoCo report, and then add the `coveralls:report` goal:\n```bash\nmvn clean verify -P jacoco-report coveralls:report -D repoToken=YOUR_COVERALLS_TOKEN\n```\n*Note:* replace `YOUR_COVERALLS_TOKEN` with your Coveralls token.\n\n### SonarQube Integration\nTo test the project locally with [SonarQube](https://www.sonarqube.org), a Docker Compose file is included in the `sonarqube` folder. Run the following commands to start the local analysis:\n```bash\n$ cd sonarqube\n$ docker-compose up\n$ cd ..\n$ mvn clean verify sonar:sonar\n```\nSee [sonarqube folder](sonarqube) for more information.\n\n### SonarCloud Integration\nTo enable [SonarCloud](https://sonarcloud.io) code analysis, enable the `sonar:sonar` goal when testing:\n```bash\nmvn clean verify sonar:sonar \\\n-D sonar.host.url=SONAR_URL \\\n-D sonar.organization=SONAR_ORGANIZATION \\\n-D sonar.projectKey=SONAR_PROJECT\n```\n*Note:* replace `SONAR_URL`, `SONAR_ORGANIZATION` and `SONAR_PROJECT` with your values. You'll find them in the SonarCloud dashboard once you set up the project. You will also need to specify an environment variable `SONAR_TOKEN` with your own SonarCloud token.\n\n## Continuous Integration\nThis repository uses [Github Actions](https://github.com/features/actions) to build, test, and deploy the app right from GitHub. Check out the `.github/workflows` folder for more information.\nTo increase reliability, all tests on CI servers are executed on a secondary desktop with [TightVNC](https://www.tightvnc.com), using the `execute-on-vnc.sh` script included in this project, as recommended in the [official AssertJ Swing documentation](https://joel-costigliola.github.io/assertj/assertj-swing-running.html).\n\n## Project Report\nFull project report is available [here](project-report.md).  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3d1117%2Fbook-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn3d1117%2Fbook-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3d1117%2Fbook-manager/lists"}