{"id":24779447,"url":"https://github.com/ryanvu/6c30912c","last_synced_at":"2025-03-24T03:44:54.359Z","repository":{"id":271141701,"uuid":"911800037","full_name":"ryanvu/6c30912c","owner":"ryanvu","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-05T19:22:39.000Z","size":5654,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T09:49:58.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ryanvu.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":"2025-01-03T22:06:39.000Z","updated_at":"2025-01-05T19:22:42.000Z","dependencies_parsed_at":"2025-01-05T20:33:58.987Z","dependency_job_id":null,"html_url":"https://github.com/ryanvu/6c30912c","commit_stats":null,"previous_names":["ryanvu/6c30912c"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanvu%2F6c30912c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanvu%2F6c30912c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanvu%2F6c30912c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanvu%2F6c30912c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanvu","download_url":"https://codeload.github.com/ryanvu/6c30912c/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245206519,"owners_count":20577581,"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":"2025-01-29T09:50:00.265Z","updated_at":"2025-03-24T03:44:54.330Z","avatar_url":"https://github.com/ryanvu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Decisions and Implementation\n\n\u003e Code Organization\n- Using a single file for all of the logic (`contexts/CallsContext.js`)\n- API calls are made in `services/calls.service.js`\n- Utils are in `utils.js` mostly for data formatting and interpretation\n- Modals are in `Modal/Modals.jsx` making use of portals\n- hooks to allow the Modals to be used in multiple places with different contexts\n- `config.js` to house constants and mimic some TypeScript functionality\n- Notice some enums are created for specific parts of the app, exporting only if the values are really reusable\n\n\u003e Not using a Router\n- Wanted to keep the app as simple as possible\n- Router similuation in `App.jsx` with tabs and views\n\n\u003e Tailwind CSS\n- Using Tailwind CSS for styling and speed\n\n\u003e Framer Motion\n- Maybe a waste of space in the bundle, but it's a nice library for animations and fun\n\n\u003e Lucide React (Icons)\n- Using Lucide React for icons\n- Icons are imported from Lucide React and used in `utils/icons.js`\n  - For one source of truth and importing from Lucide only in one place\n\n\u003e Context API\n- Using the Context API to manage the state of the app\n- Wanted to just have one source of truth for all of the activity data\n\n\u003e `utils.js`\n\u003e Call Status Logic (determineCallStatus)\n\n\u003e Voicemail\n\u003e - Marked as \"missed\" but has `duration \u003e 0`\n\u003e - Indicates caller reached voicemail system and likely left a message\n\u003e - Yellow status to indicate action needed\n\n\u003e Forwarded Calls\n\u003e - Call was \"answered\" and routed through different number (`via ≠ from`)\n\u003e - Duration unreliable as call was handled on different system\n\u003e - Blue status to indicate successful transfer\n\n\u003e Completed Calls\n\u003e - Call was \"answered\" with `duration \u003e 0`\n\u003e - Indicates successful connection and conversation\n\u003e - Green status for successful completion\n\n\u003e Connection Failed\n\u003e - Call was \"answered\" but `duration = 0`\n\u003e - Only applies to non-forwarded calls\n\u003e - Could indicate technical issues or immediate disconnection\n\u003e - Yellow status to indicate potential system issue\n\n\u003e Missed Calls\n\u003e - Simple missed call with `no duration`\n\u003e - No voicemail left\n\u003e - Red status to indicate missed opportunity\n\n\u003e Unknown States\n\u003e - Fallback for unrecognized call types\n\u003e - Gray status indicates indeterminate state\n\n## Features\n\n\u003e Call simulation\n- Clicking on an `ActivityItem` will open a confirmation modal asking if you want to call the person \n- If the call connects or not depends on the `randomAnswerOrDeclined` function\n- `hooks/useCallState.js` and `contexts/CallsContext.js` are used to manage the state of the call\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanvu%2F6c30912c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanvu%2F6c30912c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanvu%2F6c30912c/lists"}