{"id":24581322,"url":"https://github.com/bitwise-01/mindex","last_synced_at":"2025-08-15T17:11:19.140Z","repository":{"id":111674482,"uuid":"535920765","full_name":"Bitwise-01/Mindex","owner":"Bitwise-01","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-13T16:05:49.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T01:39:28.831Z","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/Bitwise-01.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,"zenodo":null}},"created_at":"2022-09-13T02:00:22.000Z","updated_at":"2022-09-13T16:08:22.000Z","dependencies_parsed_at":"2023-05-25T13:00:17.380Z","dependency_job_id":null,"html_url":"https://github.com/Bitwise-01/Mindex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bitwise-01/Mindex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bitwise-01%2FMindex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bitwise-01%2FMindex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bitwise-01%2FMindex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bitwise-01%2FMindex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bitwise-01","download_url":"https://codeload.github.com/Bitwise-01/Mindex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bitwise-01%2FMindex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270602456,"owners_count":24614260,"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-08-15T02:00:12.559Z","response_time":110,"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":[],"created_at":"2025-01-24T02:56:01.570Z","updated_at":"2025-08-15T17:11:19.132Z","avatar_url":"https://github.com/Bitwise-01.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coding Challenge\n\n## What's Provided\n\nA simple [Spring Boot](https://projects.spring.io/spring-boot/) web application has been created and bootstrapped\nwith data. The application contains information about all employees at a company. On application start-up, an in-memory\nMongo database is bootstrapped with a serialized snapshot of the database. While the application runs, the data may be\naccessed and mutated in the database without impacting the snapshot.\n\n### How to Run\n\nThe application may be executed by running `./gradlew bootRun`.\n\n### How to Use\n\nThe following endpoints are available to use:\n\n```\n* CREATE\n    * HTTP Method: POST\n    * URL: localhost:8080/employee\n    * PAYLOAD: Employee\n    * RESPONSE: Employee\n* READ\n    * HTTP Method: GET\n    * URL: localhost:8080/employee/{id}\n    * RESPONSE: Employee\n* UPDATE\n    * HTTP Method: PUT\n    * URL: localhost:8080/employee/{id}\n    * PAYLOAD: Employee\n    * RESPONSE: Employee\n```\n\nThe Employee has a JSON schema of:\n\n```json\n{\n  \"type\": \"Employee\",\n  \"properties\": {\n    \"employeeId\": {\n      \"type\": \"string\"\n    },\n    \"firstName\": {\n      \"type\": \"string\"\n    },\n    \"lastName\": {\n      \"type\": \"string\"\n    },\n    \"position\": {\n      \"type\": \"string\"\n    },\n    \"department\": {\n      \"type\": \"string\"\n    },\n    \"directReports\": {\n      \"type\": \"array\",\n      \"items\": \"string\"\n    }\n  }\n}\n```\n\nFor all endpoints that require an \"id\" in the URL, this is the \"employeeId\" field.\n\n## What to Implement\n\nClone or download the repository, do not fork it.\n\n### Task 1\n\nCreate a new type, ReportingStructure, that has two properties: employee and numberOfReports.\n\nFor the field \"numberOfReports\", this should equal the total number of reports under a given employee. The number of\nreports is determined to be the number of directReports for an employee and all of their distinct reports. For example,\ngiven the following employee structure:\n\n```\n                    John Lennon\n                /               \\\n         Paul McCartney         Ringo Starr\n                               /        \\\n                          Pete Best     George Harrison\n```\n\nThe numberOfReports for employee John Lennon (employeeId: 16a596ae-edd3-4847-99fe-c4518e82c86f) would be equal to 4.\n\nThis new type should have a new REST endpoint created for it. This new endpoint should accept an employeeId and return\nthe fully filled out ReportingStructure for the specified employeeId. The values should be computed on the fly and will\nnot be persisted.\n\n### Task 2\n\nCreate a new type, Compensation. A Compensation has the following fields: employee, salary, and effectiveDate. Create\ntwo new Compensation REST endpoints. One to create and one to read by employeeId. These should persist and query the\nCompensation from the persistence layer.\n\n## Delivery\n\nPlease upload your results to a publicly accessible Git repo. Free ones are provided by Github and Bitbucket.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwise-01%2Fmindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitwise-01%2Fmindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwise-01%2Fmindex/lists"}