{"id":21769657,"url":"https://github.com/haiilo/analytics-coding-challenge","last_synced_at":"2026-04-19T19:05:24.601Z","repository":{"id":232780811,"uuid":"785175415","full_name":"haiilo/analytics-coding-challenge","owner":"haiilo","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-11T11:21:36.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-26T03:07:36.147Z","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/haiilo.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}},"created_at":"2024-04-11T10:55:59.000Z","updated_at":"2024-04-11T11:21:40.000Z","dependencies_parsed_at":"2024-04-11T12:31:31.744Z","dependency_job_id":"53d19c1a-e5af-48c9-897d-2f3bce07602b","html_url":"https://github.com/haiilo/analytics-coding-challenge","commit_stats":null,"previous_names":["haiilo/analytics-coding-challenge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haiilo%2Fanalytics-coding-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haiilo%2Fanalytics-coding-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haiilo%2Fanalytics-coding-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haiilo%2Fanalytics-coding-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haiilo","download_url":"https://codeload.github.com/haiilo/analytics-coding-challenge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745751,"owners_count":20503050,"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-26T14:09:28.975Z","updated_at":"2026-04-19T19:05:19.558Z","avatar_url":"https://github.com/haiilo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Analytics Coding Challenge\n\nThe interview task is to implement some data transformations and a simple backend service that fetches data from a Postgres database and returns it in a JSON format. The data is fetched based on a request object that is sent to the backend service. The request object contains a key performance indicator (KPI) and some filters. The backend service should return the data based on the KPI and the filters.\n\n## Prerequisites\nPlease install the following tools locally before starting the interview and make sure they are working:\n- Any IDE of your choice (VSCode, IntelliJ, vim, etc.)\n- Docker / Docker Compose\n- Node.js\n- npm or yarn\n- Any Postgres client (pgAdmin, DBeaver, psql, etc.)\n- Any tool to make HTTP requests (Postman, Insomnia, bruno, curl, etc.)\n\n## Start Postgres locally\n``` bash\ncd postgres\ndocker compose up -d\n```\nUsing any Postgres client execute the two SQL scripts `schema.sql` and `demo_events.sql` in the `resources` folder to create the database and the raw events table and to insert some data.\nThe data is some example data for the interview task. It consists of different kinds of events generated within the Haiilo Intranet platform.\n\n## Start the backend\n``` bash\ncd backend\nnpm install\nnpm start\n```\n\n## Fetch data from the backend\n``` bash\ncurl --header \"Content-Type: application/json\" \\\n     --request POST \\\n     --data '{\"kpi\":\"user_activity_by_day\",\"filters\":{\"start\":\"2024-03-01\",\"end\":\"2024-04-01\"}}' \\\n     http://localhost:3001\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaiilo%2Fanalytics-coding-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaiilo%2Fanalytics-coding-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaiilo%2Fanalytics-coding-challenge/lists"}