{"id":15495011,"url":"https://github.com/chnapy/test-driveco","last_synced_at":"2025-07-28T21:08:53.440Z","repository":{"id":223939712,"uuid":"760669996","full_name":"Chnapy/test-driveco","owner":"Chnapy","description":"Hiring challenge from the company Driveco","archived":false,"fork":false,"pushed_at":"2024-02-27T10:48:16.000Z","size":1472,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T11:43:59.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Chnapy.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":"2024-02-20T18:07:42.000Z","updated_at":"2024-02-22T19:34:53.000Z","dependencies_parsed_at":"2024-11-06T15:51:28.879Z","dependency_job_id":null,"html_url":"https://github.com/Chnapy/test-driveco","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"e1655a376da4939497180973d9ea69be64b5ad70"},"previous_names":["chnapy/test-driveco"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Chnapy/test-driveco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2Ftest-driveco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2Ftest-driveco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2Ftest-driveco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2Ftest-driveco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chnapy","download_url":"https://codeload.github.com/Chnapy/test-driveco/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2Ftest-driveco/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267585737,"owners_count":24111576,"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-07-28T02:00:09.689Z","response_time":68,"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-10-02T08:15:47.268Z","updated_at":"2025-07-28T21:08:53.407Z","avatar_url":"https://github.com/Chnapy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Driveco test - Charge-boxes listing\n\nThis app aims to list given charge-boxes with location \u0026 details.\n\n**Checkout detailed specs in [specifications doc](./docs/specifications.md).**\n\nFocus is made on frontend-related code, development environment \u0026 tooling.\n\nRepository is made in monorepo with frontend, backend and shared packages.\nMocked backend can be found in backend package.\n\n## Install requirements\n\n### Node version\n\n`nvm` is used to get the correct node version.\n\n```\nnvm install\nnvm use\n```\n\n### pnpm as package manager\n\nYou should use pnpm only.\nCheckout https://pnpm.io/installation\n\n### Dependencies\n\n```\npnpm install\n```\n\n## Dev\n\n```\n# first build shared package\npnpm -F=./shared build\n\n# run all dev once\npnpm dev\n\n# or a single package only\npnpm -F=./frontend dev\n```\n\n\u003e Frontend package depends on backend to work.\n\n\u003e Shared package should be built before any dev\n\n## Build\n\n```\n# run all build once\npnpm build\n\n# or a single package only\npnpm -F=./frontend build\n```\n\nYou can also preview your build.\n\n```\n# frontend only\npnpm -F=./frontend preview\n```\n\n## Checks\n\nEach \"check\" command begins with `c:`:\n\n- `pnpm c:type` - Check Typescript typing;\n- `pnpm c:lint` - Check linter with ESLint, with auto-fix variant `c:lint:fix`\n- `pnpm c:format` - Check format using Prettier, with auto-fix variant `c:format:fix`\n- `pnpm c:spell` - Check spelling using CSpell;\n- `pnpm c:test` - Check tests using Jest;\n\n## What remains to do\n\nBecause of time concerns no big efforts were done on some parts.\n\n### Tests\n\nSome test examples were done using dependency injections (hooks \u0026 component).\nCheckout files:\n\n- `frontend/src/components/charge-box-card/hooks/use-charge-box-distance.test.ts`\n- `frontend/src/components/charge-box-card/hooks/use-charge-box-gmaps-href.test.ts`\n- `frontend/src/components/charge-box-card/items/charge-box-map-button.test.tsx`\n\nMore tests can be done, following these examples.\nAlso storybook can be used more deeply to enforce testing.\n\n### Docker \u0026 environments\n\nA lot remains to do here:\n\n- use of devcontainers (https://containers.dev/) instead of `nvm`;\n- use of Docker images for each environments (dev, stage, production for example);\n- use of the same images in CI/CD process;\n\nYou can still see an example in one of my personal project: https://github.com/Chnapy/bloup\n\n### Data mocking\n\nFrontend should be testable without any backend, mocking its data using for example `msw`.\n\n### Renaming\n\n\"frontend/backend/shared\" are too generic \u0026 should be renamed, for example \"web/api-chargebox/api-chargebox-sdk\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchnapy%2Ftest-driveco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchnapy%2Ftest-driveco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchnapy%2Ftest-driveco/lists"}