{"id":18336630,"url":"https://github.com/mmintel/shops-review-code-challenge","last_synced_at":"2025-04-09T19:56:04.306Z","repository":{"id":92632711,"uuid":"288159904","full_name":"mmintel/shops-review-code-challenge","owner":"mmintel","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-17T11:17:21.000Z","size":225,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T12:20:35.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/mmintel.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":"2020-08-17T11:16:54.000Z","updated_at":"2020-08-17T11:17:24.000Z","dependencies_parsed_at":"2023-05-05T09:33:35.000Z","dependency_job_id":null,"html_url":"https://github.com/mmintel/shops-review-code-challenge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmintel%2Fshops-review-code-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmintel%2Fshops-review-code-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmintel%2Fshops-review-code-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmintel%2Fshops-review-code-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmintel","download_url":"https://codeload.github.com/mmintel/shops-review-code-challenge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103911,"owners_count":21048245,"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-11-05T20:08:26.241Z","updated_at":"2025-04-09T19:56:04.282Z","avatar_url":"https://github.com/mmintel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend-Challenge Solution\n\n## Tasks\n\n### Setup\n\n- [x] Setup a project environment using your preferred SPA framework (e.g. Angular, React, Vue)\n\n### Reviews\n\n- [x] Call the Reviews API and display the list of reviews in any way you like. Use the shop id (tsId) `X6A4AACCD2C75E430381B2E1C4CLASSIC`. Please display: `mark`, `comment`, `creationDate`\n- [x] Sort the page of reviews by `creationDate` descending\n- [x] Add a different style to every second review e.g. change text color or background color\n- [x] Add a control to toggle the highlighting - highlight odd reviews instead of even reviews on toggle\n\n#### Relevance Score\n\n- [x] Introduce a review relevance score\n- [x] Allow the user to switch from \"Order by Mark descending\" to \"Order by relevance score descending\"\n\n##### Calculate a review relevance score based on the following rules\n\n- [x] 1 Point is added per character of the review, excluding spaces, tab and line breaks – up to 100 points\n- [x] 50 Points for a full user profile (`firstname` and `lastname` are existing) - e.g. \"Hermann Meier\"\n- [x] 25 Points (instead of 50) for a partial profile. `firstname` or `lastname` are one alphabetical character only, e.g. \"Hermann M\" or \"H. M.\"\n\n### Search Page\n\n- [x] Create a search page, users should be able to search for a shop. The results are provided by the Shop Search API. Display `name` and `overallMark`\n- [x] Add three review texts (found in comment) provided by the Reviews API for each search result - use the most relevant ones if you can\n- [x] Allow the user to view the list of reviews for a specific shop\n- [ ] Implement pagination of search results, relevant metadata can be found in the Shop Search API response\n\n### Mark\n\n- [ ] Display mark and overallMark by using stars (0 - 5 full stars)\n- [ ] Use the provided Star Images and design spec\n- [ ] Extend the star display to also show \"half filled stars\"\n\n## Possible Improvements\n\n- add logging and capture exceptions (e.g. with Sentry)\n- don't use inline styles (prefer CSS-in-JS)\n- break down components even more\n- add more unit tests (I only added some for the most critical parts considering time)\n- add e2e tests (cypress)\n- create `Mark` with a class to ensure consistent formatting (used in multiple places)\n- move hardcoded API URLs to env variables\n- save state of search in URL bar\n\n## Technical Information\n\n### Requirements\n\n- `yarn` (\u003e 1.22.0)\n- `node` (\u003e 13.9.0)\n\n### Installation\n\n- `yarn` to install dependencies\n\n### Available Scripts\n\nIn the project directory, you can run:\n\n#### `yarn start`\n\nRuns the app in the development mode.\u003cbr /\u003e\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\u003cbr /\u003e\nYou will also see any lint errors in the console.\n\n#### `yarn test`\n\nLaunches the test runner in the interactive watch mode.\u003cbr /\u003e\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n#### `yarn build`\n\nBuilds the app for production to the `build` folder.\u003cbr /\u003e\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\u003cbr /\u003e\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmintel%2Fshops-review-code-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmintel%2Fshops-review-code-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmintel%2Fshops-review-code-challenge/lists"}