{"id":20428876,"url":"https://github.com/mhashim6/federated-quran","last_synced_at":"2026-04-08T20:03:04.535Z","repository":{"id":237465075,"uuid":"618620647","full_name":"mhashim6/federated-quran","owner":"mhashim6","description":" POC microservice-based federated GrapghQL API for Quran metadata with user Authentication and Authorisation","archived":false,"fork":false,"pushed_at":"2023-03-25T01:25:33.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-16T13:47:07.016Z","etag":null,"topics":["apollographql","bcrypt","docker","docker-compose","federation","graphql","jest","jwt","microservices","postgresql"],"latest_commit_sha":null,"homepage":"","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/mhashim6.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-03-24T22:01:11.000Z","updated_at":"2025-08-18T14:41:10.000Z","dependencies_parsed_at":"2024-05-02T04:19:31.360Z","dependency_job_id":"78b182b1-7467-41fe-9cf7-185ec02373e7","html_url":"https://github.com/mhashim6/federated-quran","commit_stats":null,"previous_names":["mhashim6/federated-quran"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mhashim6/federated-quran","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhashim6%2Ffederated-quran","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhashim6%2Ffederated-quran/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhashim6%2Ffederated-quran/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhashim6%2Ffederated-quran/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhashim6","download_url":"https://codeload.github.com/mhashim6/federated-quran/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhashim6%2Ffederated-quran/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["apollographql","bcrypt","docker","docker-compose","federation","graphql","jest","jwt","microservices","postgresql"],"created_at":"2024-11-15T07:29:11.127Z","updated_at":"2026-04-08T20:03:04.494Z","avatar_url":"https://github.com/mhashim6.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# federated-quran\nPOC microservice-based federated GrapghQL API for Quran metadata with user Authentication and Authorisation. _(all the buzz words in one sentence, but it's actually true ¯\\\\_(ツ)_/¯)_\n\n## Architecture\nThis is a POC, it exposes a GQL api to retrive quran metadata like \"Juz'\" and \"Surah\". We can also use the `users` service to create and auth users.\n![image](https://user-images.githubusercontent.com/4984041/227655113-1e777cc7-61c9-48a1-8425-be3b28397e89.png)\n\n## API\nHere I'll discuss the overall api specs. For details regarding other services, you can read their docs here:\n- [users](https://github.com/mhashim6/federated-quran/tree/master/users#readme)\n- [juz](https://github.com/mhashim6/federated-quran/tree/master/juz#readme)\n- [surah](https://github.com/mhashim6/federated-quran/tree/master/surah#readme)\n- [gateway](https://github.com/mhashim6/federated-quran/tree/master/gateway#readme)\n\n### Juz\n``` graphql\ntype Juz {\n  number: Int!\n  surahIndex: Int!\n  ayah: Int!\n}\n```\n\n### Surah\n``` graphql\ntype Surah {\n  index: Int!\n  name: String!\n  numberOfAyahs: Int!\n  revelationType: String!\n}\n```\n\n### Federation\nIn `Juz`, we can fetch the entire `surah` instead of its index. This is one benifit of federation\n``` graphql\n  extend type Surah @key(fields: \"index\") {\n    index: Int!\n  }\n\n  type Juz {\n    number: Int!\n    surahIndex: Int!\n    surah: Surah!\n    ayah: Int!\n  }\n```\n\nThis allows us to write such query normally to get a \"Juz'\" and the full \"Surah\" details of it\n``` graphql\nquery getJuzStartSurah {\n  getJuz (index: 3){\n    number\n    ayah\n    surah {\n      name\n      revelationType\n    }\n  }\n}\n\n```\nOutput:\n``` json\n{\n  \"number\": 3,\n  \"ayah\": 253,\n  \"surah\": {\n    \"name\": \"Al-Baqara\",\n    \"revelationType\": \"Medinan\"\n  }\n}\n```\n\n## Installation\n``` shell\ngit clone https://github.com/mhashim6/federated-quran.git \u0026\u0026 cd federated-quran\n```\n\n## Run\n``` shell\ndocker compose up -d\n```\n\nThen head to `http://localhost` and go to the Apollo Sandbox to play with the API\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhashim6%2Ffederated-quran","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhashim6%2Ffederated-quran","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhashim6%2Ffederated-quran/lists"}