{"id":20750522,"url":"https://github.com/augustodossantosti/baseapp","last_synced_at":"2026-04-28T05:36:45.299Z","repository":{"id":42536648,"uuid":"158086997","full_name":"augustodossantosti/baseapp","owner":"augustodossantosti","description":"This repository includes a base application for other Java/Spring projects.","archived":false,"fork":false,"pushed_at":"2025-07-12T01:10:34.000Z","size":271,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T16:51:23.044Z","etag":null,"topics":["h2-database","jwt-authentication","oracle-database","spring-boot","spring-data-rest","spring-security"],"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/augustodossantosti.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":"2018-11-18T13:32:14.000Z","updated_at":"2022-03-16T21:55:02.000Z","dependencies_parsed_at":"2022-09-08T06:50:37.715Z","dependency_job_id":null,"html_url":"https://github.com/augustodossantosti/baseapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/augustodossantosti/baseapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustodossantosti%2Fbaseapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustodossantosti%2Fbaseapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustodossantosti%2Fbaseapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustodossantosti%2Fbaseapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/augustodossantosti","download_url":"https://codeload.github.com/augustodossantosti/baseapp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustodossantosti%2Fbaseapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32368533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["h2-database","jwt-authentication","oracle-database","spring-boot","spring-data-rest","spring-security"],"created_at":"2024-11-17T08:27:45.661Z","updated_at":"2026-04-28T05:36:45.262Z","avatar_url":"https://github.com/augustodossantosti.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository includes a base application for other Java/Spring projects that has REST as their Architectural style, Oracle database and user authentication process performed with a JWT (Json Web Token).\n\nThis project also offers API documentation with swagger and exposes their entities with Spring Data Rest.\n\nRunning Application:\n\nBy default the application offers three profiles: dev, test and prod.\nTest profile uses embedded database H2 and others use Oracle.\n\nThere is also support for MongoDB. For that use the \u003ci\u003emongodb\u003c/i\u003e branch instead.\n\nTo run the app via terminal: mvn spring-boot:run -P[profile]\n\nIf a profile is not specified the test profile is used.\n\nBased on application.properties app will use the following values: port = 8081, context = /app and servlet path = /web\n\nThe complete path will be localhost:8081/app/web/\n  \n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/14075325/159719731-76393c49-4cc4-4ed0-adfa-aed783a2f89e.png\"\u003e\u003c/p\u003e\n  \nDocumentation:\n  \nSwagger will be available for any existing or new controller at localhost:8081/app/web/swagger-ui\n  \n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/14075325/159719863-c5abedd1-f30e-4d3f-82f1-f4b620f9db62.png\"\u003e\u003c/p\u003e\n\nSecurity:\n\nAll Spring Security related configuration is present in the \u003ca href=\"https://github.com/augustodossantosti/baseapp/blob/master/src/main/java/com/development/baseapp/configuration/WebAppSecurityConfiguration.java\"\u003eWebAppSecurityConfiguration\u003c/a\u003e class.\n\nThis app has two authentication filters, one of them dedicated to login proccess and other related to perform authentication via JWT on every request for protected resources. The user information is stored in a database and retrieved during login process.\n\nLogin filter handles request to the URL /login (POST) that must present two parameters to this filter: a username and password and gives to the client app a valid JWT after a successful authentication on response header Authorization.\n  \n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/14075325/159722804-42c6c135-502e-4976-bd61-599de8ba87d7.png\"\u003e\u003c/p\u003e\n  \nA valid JWT is created by class \u003ca href=\"https://github.com/augustodossantosti/baseapp/blob/master/src/main/java/com/development/baseapp/security/login/JwtWriterListener.java\"\u003eJwtWriterListener\u003c/a\u003e.\n\nJWT filter hadles request for any protected resouces, that must present a valid JWT in the Authotization header (Bearer Token).\n  \n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/14075325/159722858-bb09fd11-f237-419c-bdc9-7238d0f5a14d.png\"\u003e\u003c/p\u003e\n\nAll resources defined as permitAll and anonymous in WebAppSecurityConfiguration are processed by Anonymous filter provided by Spring.\n  \nThe postman collection and environment are availabe at \u003ci\u003e/postman\u003c/i\u003e folder on source code.\n\nModel:\n\nAs the goal of this project is to be used as basis for other applications there is only one Entity that is exposed via Spring Data Rest.\nSome operations are allowed only for authenticated users with USER role and others for users with ADMIN role. This protection is provided by using @PreAuthorize annotation with hasRole value.\n  \nAll domain objects exposed with Spring Data Rest are available at localhost:8081/app/web/api/[domain-name]\n\nDatabase:\n\nThis projects already defined to work with oracle database for dev and prod environment and to work with H2 for tests.\n\nException Handling and Error Messages:\n\nAll exceptions are processed by WebAppErrorHandler, domain erros are based on AbstractWebAppException and the class WebAppErrorResponse constains useful data about the error itself.\nBy default all implementations of AbstractWebAppExceptions should have @ResponseStatus annotation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustodossantosti%2Fbaseapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugustodossantosti%2Fbaseapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustodossantosti%2Fbaseapp/lists"}