{"id":16696771,"url":"https://github.com/atry/appointment-scheduler","last_synced_at":"2025-09-10T13:39:48.223Z","repository":{"id":142737942,"uuid":"590683351","full_name":"Atry/appointment-scheduler","owner":"Atry","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-21T01:44:01.000Z","size":422,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T03:11:46.636Z","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/Atry.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-01-19T00:31:29.000Z","updated_at":"2024-08-03T23:08:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"0158e490-c9a0-4c4f-81c4-4bb772179c6c","html_url":"https://github.com/Atry/appointment-scheduler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"ryansonshine/typescript-npm-package-template","purl":"pkg:github/Atry/appointment-scheduler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fappointment-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fappointment-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fappointment-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fappointment-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atry","download_url":"https://codeload.github.com/Atry/appointment-scheduler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fappointment-scheduler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274471061,"owners_count":25291613,"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-09-10T02:00:12.551Z","response_time":83,"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-12T17:44:46.081Z","updated_at":"2025-09-10T13:39:48.176Z","avatar_url":"https://github.com/Atry.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Appointment Scheduler\n\nA simple toy project of a GraphQL API for scheduling appointments with doctors.\n\n## Tech Stack\n\nThis project is based on [Nexus Example With Prisma](https://github.com/graphql-nexus/nexus/tree/main/examples/with-prisma). In addition to the template project, the following libraries are introduced:\n\n- [graphql-scalars](https://github.com/Urigo/graphql-scalars) is used to validate duration types in GraphQL;\n- [date-fns](https://date-fns.org/) is used to manipulate UTC timestamps;\n- [moment-timezone](https://momentjs.com/timezone/) is used to handle date time in a certain timezone;\n- [nexus-prisma](https://github.com/graphql-nexus/nexus-prisma) is used to generate GraphQL fields from Prisma schema;\n- [fluent-iterable](https://github.com/codibre/fluent-iterable) is used to incrementally perform asynchronous operations;\n- [jest](https://jestjs.io/) and [ts-jest](https://github.com/kulshekhar/ts-jest) are used to run tests.\n\nNote that multiple time libraries are introduced, because:\n\n- ECMAScript's `Date` is used because it's the only date time type supported by Nexus and Prisma.\n- `date-fns` is the most light-weight solution to manipulate `Date`.\n- We need a library to handle timezone, because a doctor might in a timezone different from the server's timezone. However, `date-fns` does not support timezone well.\n  - `date-fns`'s sibling, `date-fns-tz`, is buggy for handling daylight saving time.\n  - `moment-timezone` is good for timezone handling, but the drawback is that we have to use a different API for manipulating local time and UTC time, respectively.\n\n## Directory layout\n\n- `api` includes the source code for the GraphQL server, including GraphQL types and resolvers\n  - `utils` includes the helper function to find available time slot for scheduling an appointment.\n- `prisma` includes O/R mapping schema, migration scripts, and seeding data.\n- `test` includes the test suite for the GraphQL API\n## Available scripts\n\n### Set up the development environment\n\n```\nnodenv install \u0026\u0026 npm install --global yarn \u0026\u0026 yarn install\n```\n\nIt will set up a Sqlite database for development purpose.\n\n### Start the GraphQL server in development mode\n\n```\nyarn dev\n```\n\nThen you can open http://localhost:4000 to explore the GraphQL API.\n\n### Build\n\n```\nyarn build\n```\n\n### Test\n\n```\nyarn test\n```\n\nThen check out `dist` directory for the compiled JavaScript files.\n\n### Start the GraphQL server in production mode\n\n```\nyarn start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatry%2Fappointment-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatry%2Fappointment-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatry%2Fappointment-scheduler/lists"}