{"id":34353645,"url":"https://github.com/techdev-solutions/trackr-backend","last_synced_at":"2025-12-18T01:58:06.033Z","repository":{"id":18847762,"uuid":"22063870","full_name":"techdev-solutions/trackr-backend","owner":"techdev-solutions","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-08T13:02:51.000Z","size":1143,"stargazers_count":197,"open_issues_count":25,"forks_count":99,"subscribers_count":39,"default_branch":"development","last_synced_at":"2024-04-17T16:16:54.613Z","etag":null,"topics":["java","spring-boot"],"latest_commit_sha":null,"homepage":"http://blog.techdev.de","language":"Java","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/techdev-solutions.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}},"created_at":"2014-07-21T12:44:01.000Z","updated_at":"2023-05-20T19:04:47.000Z","dependencies_parsed_at":"2022-09-09T10:00:48.515Z","dependency_job_id":null,"html_url":"https://github.com/techdev-solutions/trackr-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techdev-solutions/trackr-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techdev-solutions%2Ftrackr-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techdev-solutions%2Ftrackr-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techdev-solutions%2Ftrackr-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techdev-solutions%2Ftrackr-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techdev-solutions","download_url":"https://codeload.github.com/techdev-solutions/trackr-backend/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techdev-solutions%2Ftrackr-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27789342,"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","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"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":["java","spring-boot"],"created_at":"2025-12-18T01:58:05.308Z","updated_at":"2025-12-18T01:58:06.028Z","avatar_url":"https://github.com/techdev-solutions.png","language":"Java","readme":"trackr backend\n==============\n\nWhat is it?\n-------------\ntrackr is an application to track petty much everything that is going on in your company.\nKeep track of vacations, sick days, invoices and many more.\n\ntrackr comes with a Java-based backend and a [frontend](https://github.com/techdev-solutions/trackr-frontend) written in AngularJS. This project is the Java/Spring based\nbackend, a stateless REST API with either OAuth2 or basic authentication.\n\nYou can read all about trackr in our developer blog:\n\n* [Architecture and Backend](http://blog.techdev.de/trackr-an-angularjs-app-with-a-java-8-backend-part-i/)\n* [Testing](http://blog.techdev.de/testing-a-secured-spring-data-rest-service-with-java-8-and-mockmvc/)\n* [Mail Approvals with Spring Integration](http://blog.techdev.de/mail-approvals-with-spring-integration/)\n* [Frontend](http://blog.techdev.de/trackr-an-angularjs-app-with-a-java-8-backend-part-ii/)\n* [File Downloads with AngularJS](http://blog.techdev.de/an-angularjs-directive-to-download-pdf-files/)\n* [Processes and Tools](http://blog.techdev.de/trackr-an-angularjs-app-with-a-java-8-backend-part-iii/)\n\nFor the API documentation just go [here](http://techdev-solutions.github.io/trackr-api-documentation/getting_started.html).\nThere is also a [Vagrant](https://www.vagrantup.com/) project building the whole application over [here](https://github.com/techdev-solutions/trackr-vagrant).\n\nHow to start\n------------\nIf you just want to mess around with the API a bit the default configuration is very sensible and has no external dependencies (well, except Java).\n\nIf you have gradle, just run\n\n    gradle run\n\nIf you don't have gradle and want to use the wrapper run\n\n    ./gradlew run\n    # or\n    gradlew.bat run\n\nIf you want to start from your IDE, i.e. for debugging open the class `Trackr` and start the main method.\n\nTo verify it works you can use curl. The users don't have a password in this configuration, so just press enter when curl asks for one. If you don't like the usernames\nchange them in import.sql.\n\n    curl --user moritz.schulze@techdev.de localhost:8080\n\nThe default config uses port 8080, if that is used on your system you can add\n\n    server:\n        port: $port\n\nto the top of the application.yaml and choose a port that you want for `$port`.\n\nProfiles\n--------\ntrackr has a lot of Spring profiles to add/switch features.\n\n| profile            | description                                                | notes                                                            |\n|--------------------|------------------------------------------------------------|------------------------------------------------------------------|\n| in-memory-database | uses a H2 database, creates the schema with hibernate      | excluse with real-database                                       |\n| real-database      | uses a configurable database, executes flyway              | exclusive with in-memory-database                                |\n| http-basic         | protects the API with HTTP basic authentication            | exclusive with oauth                                             |\n| oauth              | protects the API as a OAuth2 resource server               | exclusive with http-basic. Database for OAuth2 tokens needed.    |\n| granular-security  | roles and per endpoint security                            |                                                                  |\n| gmail              | sends mail with Gmail and enables mail receiving           | when off, does not receive mails and uses a logging mail sender. |\n| dev                | initialize the database with data.sql                      |                                                                  |\n| prod               | Just some different settings for our production env        |                                                                  |\n\nTake a look in the application.yaml to see what properties these profiles need.\n\nThe default profiles are `in-memory-database,dev,granular-security,http-basic`. If you want to use other profiles, there are several possible ways.\n1. You can change the `spring.profiles.active` value in application.yaml\n2. If you use `gradle run` you can prepend (example) `SPRING_PROFILES_ACTIVE=dev,gmail,real-database`. You can also use this to overwrite e.g. the port with `SERVER_PORT=8000`.\n3. If you run from your IDE, you can add `--spring.profiles.active=dev,gmail,real-database` as program arguments to the run configuration.\n\nPlease refer to the [Spring Boot Reference](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/) for more information.\n\n### The oauth profile\nThe oauth profile marks the trackr backend as a OAuth2 resource server, that means access is only possible with a valid access token issued by an authorization server. We use a\nJDBC token store, so valid tokens need to be put there. Please take a look at our (soon to be open sourced) techdev portal to see how we do this.\n\n\n### The granular-security profile\nWhen this is not selected, to access the API the user needs to be authenticated. With granular security the access to some endpoints depend on the role of the user or even the\nid of the user. In trackr, the id of a user is the email address of the belonging employee.\n\nWhen the oauth profile is switched off, all users have the role ROLE_ADMIN. When oauth is on, the roles must be stored in the access token.\n\nTake a look at the `@PreAuthorize` and `@PostAuthorize` annotations in the code to see what this will activate.\n\nHow to build\n------------\nJust run\n\n    gradle build\n\n(or use the wrapper if you don't have gradle installed). The JAR file will be in `build/libs` and can just be run with `java -jar`. The application.yaml file has to be in the\nworking directory where the `java` command was issued.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechdev-solutions%2Ftrackr-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechdev-solutions%2Ftrackr-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechdev-solutions%2Ftrackr-backend/lists"}