{"id":22156214,"url":"https://github.com/andy489/dropbookmarks","last_synced_at":"2025-03-24T14:33:10.761Z","repository":{"id":233569694,"uuid":"614291045","full_name":"andy489/DropBookmarks","owner":"andy489","description":"Dropwizard 4.0.0 project exposing REST API to store bookmarks.","archived":false,"fork":false,"pushed_at":"2023-03-27T06:57:23.000Z","size":638,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T19:24:56.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/andy489.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}},"created_at":"2023-03-15T09:41:59.000Z","updated_at":"2023-03-15T17:35:58.000Z","dependencies_parsed_at":"2024-04-16T19:56:30.727Z","dependency_job_id":"7316f1e8-28a1-4094-9c9c-c99fe0dbf271","html_url":"https://github.com/andy489/DropBookmarks","commit_stats":null,"previous_names":["andy489/dropbookmarks"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy489%2FDropBookmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy489%2FDropBookmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy489%2FDropBookmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy489%2FDropBookmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andy489","download_url":"https://codeload.github.com/andy489/DropBookmarks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245289586,"owners_count":20591099,"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-02T02:38:41.446Z","updated_at":"2025-03-24T14:33:10.739Z","avatar_url":"https://github.com/andy489.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DropBookmarks\n\nA Dropwizard 4.0.0 project exposing REST API to store bookmarks. The \napplication is using Maven build management, MSSQL Server as a DBMS and database migrations with liquibase.\n\nDatabase settings are in the local_properties.yml file. To switch to another RDBMS one \nshould modify the driver and connection URL. By default it is necessary to create \nDropBookmarks database and populate it using migrations. The liquibase settings are in the\nliquibase.properties file, they should also be changed if database is changed.\n  \n## How to start the DropBookmarks application\n\n0. Check out project using `git clone https://github.com/andy489/DropBookmarks.git`\n1. Create a key store in the project's folder using Java 8 *keytool* \n`keytool -genkeypair -keyalg RSA -dname \"CN=localhost\" -keystore dropbookmarks.keystore  -keypass 123456 -storepass 123456`\n2. Run `mvn clean package` to build the application. Database will be populated automatically.\n3. Run application with arguments `server .\\src\\main\\resources\\local_properties.yml`:\n\n    `java -jar target/DropBookmarks-1.0-SNAPSHOT.jar server .\\src\\main\\resources\\local_properties.yml`\n5. To check that your application is running, enter URL `http://localhost:8081` in the browser \n\n## How to try the DropBookmarks application\n  \nThe API is secured with Basic Authentication. One can find a user *pesho*\nwhose password is *1234* (all users have the same password, other populated users are: maria, gosho, andy and foo) \nalong with several bookmarks in the database after executing the migrations.\n\nTo get the list of all bookmarks stored by *pesho* enter\n\n~~~~bash\ncurl.exe -k https://localhost:8443/bookmark/my  -u pesho:1234\n~~~~\n\nTo all bookmarks of *pesho*, which contain the infix *okta* in their name\n\n~~~~bash\ncurl.exe -w \"\\n\" -k https://localhost:8443/bookmark/search?infix=okta -u pesho:1234\n~~~~\n\nTo add a bookmark it is necessary to key in \n\n~~~~bash\ncurl.exe -X POST -w \"\\n\" -k https://localhost:8443/bookmark -u pesho:1234 -H \"Content-Type: application/json\" --data '{\\\"name\\\":\\\"Git\\\", \\\"url\\\":\\\"http://github.com\\\", \\\"description\\\":\\\"A lot of great projects\\\"}'\n~~~~\n\nTo modify a bookmark the API offers PUT method\n\n~~~~bash\ncurl.exe -X PUT -w \"\\n\" -k https://localhost:8443/bookmark/2 -u pesho:1234 -H \"Content-Type: application/json\" -d '{\\\"url\\\":\\\"https://github.com/andy489/Linux_Shell\\\"}'\n~~~~\n\nTo delete a bookmark use \n\n~~~~bash\ncurl.exe -X DELETE -w \"\\n\" -k https://localhost:8443/bookmark/1 -u pesho:1234\n~~~~\n\nTo register userr\n~~~~bash\ncurl.exe -X POST -w \"\\n\" -k http://localhost:8080/user -H \"Content-Type: application/json\" -d'{\\\"username\\\" : \\\"newuser\\\",\\\"fullName\\\" : \\\"New User\\\",\\\"email\\\": \\\"new@gmail.com\\\",\\\"password\\\": \\\"1234\\\",\\\"confirmPassword\\\": \\\"1234\\\"}'\n~~~~\n\nOther functionalities are exposed in the Postman exported collection.\n\nAll endpoints\n```\n    GET     /bookmark/ (com.pros.bookmarks.resources.BookmarkResource)\n    POST    /bookmark/ (com.pros.bookmarks.resources.BookmarkResource)\n    GET     /bookmark/my (com.pros.bookmarks.resources.BookmarkResource)\n    GET     /bookmark/search (com.pros.bookmarks.resources.BookmarkResource)\n    DELETE  /bookmark/{id} (com.pros.bookmarks.resources.BookmarkResource)\n    PUT     /bookmark/{id} (com.pros.bookmarks.resources.BookmarkResource)\n    GET     /user/ (com.pros.bookmarks.resources.UserResource)\n    POST    /user/ (com.pros.bookmarks.resources.UserResource)\n    GET     /user/email (com.pros.bookmarks.resources.UserResource)\n    GET     /user/username/{username} (com.pros.bookmarks.resources.UserResource)\n    DELETE  /user/{id} (com.pros.bookmarks.resources.UserResource)\n    GET     /user/{id} (com.pros.bookmarks.resources.UserResource)\n    PUT     /user/{id} (com.pros.bookmarks.resources.UserResource)\n```\n\nProject src tree\n```\n.\n├───src\n│   ├───main\n│   │   ├───java\n│   │   │   └───com\n│   │   │       └───pros\n│   │   │           └───bookmarks\n│   │   │               │   DropBookmarksApplication.java\n│   │   │               ├───auth\n│   │   │               │       DBAuthenticator.java\n│   │   │               ├───configuration\n│   │   │               │       DropBookmarksConfiguration.java\n│   │   │               ├───dao\n│   │   │               │       BookmarkEntityDAO.java\n│   │   │               │       UserEntityDAO.java\n│   │   │               ├───model\n│   │   │               │   ├───dto\n│   │   │               │   │       BookmarkDto.java\n│   │   │               │   │       UserDto.java\n│   │   │               │   ├───entity\n│   │   │               │   │       BaseEntity.java\n│   │   │               │   │       BookmarkEntity.java\n│   │   │               │   │       UserEntity.java\n│   │   │               │   ├───mapper\n│   │   │               │   │       MapStructMapper.java\n│   │   │               │   ├───validation\n│   │   │               │   │       FieldMatch.java\n│   │   │               │   │       FieldMatchValidator.java\n│   │   │               │   │       UniqueEmail.java\n│   │   │               │   │       UniqueEmailValidator.java\n│   │   │               │   │       UniqueUsername.java\n│   │   │               │   │       UniqueUsernameValidator.java\n│   │   │               │   └───view\n│   │   │               │           BookmarkFullView.java\n│   │   │               │           BookmarkView.java\n│   │   │               │           UserView.java\n│   │   │               ├───resources\n│   │   │               │       BookmarkResource.java\n│   │   │               │       UserResource.java\n│   │   │               └───service\n│   │   │                       BookmarkService.java\n│   │   │                       UserService.java\n│   │   └───resources\n│   │       │   liquibase.properties\n│   │       │   local_properties.yml\n│   │       │   migrations.xml\n│   │       └───db.changelog\n│   │               change-log-1.0.xml\n│   │               change-log-1.1.xml\n│   │               change-log-1.2.xml\n│   └───test\n└───target\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy489%2Fdropbookmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandy489%2Fdropbookmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy489%2Fdropbookmarks/lists"}