{"id":19982230,"url":"https://github.com/patrick-rush/mindex-dot-net","last_synced_at":"2025-08-17T13:41:35.659Z","repository":{"id":214528455,"uuid":"736112635","full_name":"patrick-rush/mindex-dot-net","owner":"patrick-rush","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-28T18:27:58.000Z","size":4705,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T20:11:41.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/patrick-rush.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}},"created_at":"2023-12-27T02:53:56.000Z","updated_at":"2023-12-28T18:15:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"e93f4bc2-3629-48c1-8765-892454305ca1","html_url":"https://github.com/patrick-rush/mindex-dot-net","commit_stats":null,"previous_names":["patrick-rush/mindex-dot-net"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patrick-rush/mindex-dot-net","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-rush%2Fmindex-dot-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-rush%2Fmindex-dot-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-rush%2Fmindex-dot-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-rush%2Fmindex-dot-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrick-rush","download_url":"https://codeload.github.com/patrick-rush/mindex-dot-net/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-rush%2Fmindex-dot-net/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856567,"owners_count":24657690,"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-17T02:00:09.016Z","response_time":129,"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":"2024-11-13T04:09:42.203Z","updated_at":"2025-08-17T13:41:35.599Z","avatar_url":"https://github.com/patrick-rush.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mindex Coding Challenge\r\n\r\n## Patrick's Notes:\r\nNew endpoints:\r\n```\r\n* READ\r\n    * HTTP Method: GET \r\n    * URL: localhost:8080/api/reporting-structure/{employeeId}\r\n    * RESPONSE: ReportingStructure\r\n* CREATE\r\n    * HTTP Method: POST \r\n    * URL: localhost:8080/api/compensation\r\n    * PAYLOAD: Compensation\r\n    * RESPONSE: Compensation\r\n* READ\r\n    * HTTP Method: GET \r\n    * URL: localhost:8080/api/compensation/{employeeId}\r\n    * RESPONSE: Compensation\r\n```\r\n\r\nNew Tests:\r\n* New Unit Tests with coverage for CompensationController create and ReportingStructure read\r\n\r\n---\r\n\r\n## What's Provided\r\nA simple [.Net 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) web application has been created and bootstrapped \r\nwith data. The application contains information about all employees at a company. On application start-up, an in-memory \r\ndatabase is bootstrapped with a serialized snapshot of the database. While the application runs, the data may be\r\naccessed and mutated in the database without impacting the snapshot.\r\n\r\n### How to Run\r\nYou can run this by executing `dotnet run` on the command line or in [Visual Studio Community Edition](https://www.visualstudio.com/downloads/).\r\n\r\n\r\n### How to Use\r\nThe following endpoints are available to use:\r\n```\r\n* CREATE\r\n    * HTTP Method: POST \r\n    * URL: localhost:8080/api/employee\r\n    * PAYLOAD: Employee\r\n    * RESPONSE: Employee\r\n* READ\r\n    * HTTP Method: GET \r\n    * URL: localhost:8080/api/employee/{id}\r\n    * RESPONSE: Employee\r\n* UPDATE\r\n    * HTTP Method: PUT \r\n    * URL: localhost:8080/api/employee/{id}\r\n    * PAYLOAD: Employee\r\n    * RESPONSE: Employee\r\n```\r\nThe Employee has a JSON schema of:\r\n```json\r\n{\r\n  \"type\":\"Employee\",\r\n  \"properties\": {\r\n    \"employeeId\": {\r\n      \"type\": \"string\"\r\n    },\r\n    \"firstName\": {\r\n      \"type\": \"string\"\r\n    },\r\n    \"lastName\": {\r\n          \"type\": \"string\"\r\n    },\r\n    \"position\": {\r\n          \"type\": \"string\"\r\n    },\r\n    \"department\": {\r\n          \"type\": \"string\"\r\n    },\r\n    \"directReports\": {\r\n      \"type\": \"array\",\r\n      \"items\" : \"string\"\r\n    }\r\n  }\r\n}\r\n```\r\nFor all endpoints that require an \"id\" in the URL, this is the \"employeeId\" field.\r\n\r\n## What to Implement\r\nClone or download the repository, do not fork it.\r\n\r\n### Task 1\r\nCreate a new type, ReportingStructure, that has two properties: employee and numberOfReports.\r\n\r\nFor the field \"numberOfReports\", this should equal the total number of reports under a given employee. The number of \r\nreports is determined to be the number of directReports for an employee and all of their direct reports. For example, \r\ngiven the following employee structure:\r\n```\r\n                    John Lennon\r\n                /               \\\r\n         Paul McCartney         Ringo Starr\r\n                               /        \\\r\n                          Pete Best     George Harrison\r\n```\r\nThe numberOfReports for employee John Lennon (employeeId: 16a596ae-edd3-4847-99fe-c4518e82c86f) would be equal to 4. \r\n\r\nThis new type should have a new REST endpoint created for it. This new endpoint should accept an employeeId and return \r\nthe fully filled out ReportingStructure for the specified employeeId. The values should be computed on the fly and will \r\nnot be persisted.\r\n\r\n### Task 2\r\nCreate a new type, Compensation. A Compensation has the following fields: employee, salary, and effectiveDate. Create \r\ntwo new Compensation REST endpoints. One to create and one to read by employeeId. These should persist and query the \r\nCompensation from the persistence layer.\r\n\r\n## Delivery\r\nPlease upload your results to a publicly accessible Git repo. Free ones are provided by Github and Bitbucket.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrick-rush%2Fmindex-dot-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrick-rush%2Fmindex-dot-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrick-rush%2Fmindex-dot-net/lists"}