{"id":24688443,"url":"https://github.com/octabytes/hadith-api","last_synced_at":"2026-04-19T06:35:39.722Z","repository":{"id":108853978,"uuid":"342132857","full_name":"octabytes/hadith-api","owner":"octabytes","description":"NodeJS Hadith APIs","archived":false,"fork":false,"pushed_at":"2021-03-18T05:39:16.000Z","size":26753,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T23:46:36.964Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octabytes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-02-25T05:25:50.000Z","updated_at":"2021-03-17T06:55:41.000Z","dependencies_parsed_at":"2023-04-28T03:36:55.587Z","dependency_job_id":null,"html_url":"https://github.com/octabytes/hadith-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/octabytes/hadith-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octabytes%2Fhadith-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octabytes%2Fhadith-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octabytes%2Fhadith-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octabytes%2Fhadith-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octabytes","download_url":"https://codeload.github.com/octabytes/hadith-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octabytes%2Fhadith-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272971410,"owners_count":25024093,"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-08-31T02:00:09.071Z","response_time":79,"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":"2025-01-26T17:17:17.244Z","updated_at":"2026-04-19T06:35:39.689Z","avatar_url":"https://github.com/octabytes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hadith-api\n\nNodeJS Hadith APIs\n\n# Run Local\n\nFirst of all you should have to install the Firebase CLI\n\n`npm install -g firebase-tools`\n\nClone repository\n\n`git clone https://github.com/octabytes/hadith-api.git`\n\nInstall require packages\n\n`npm install`\n\nMove into firebase dir\n\n`cd hadith-api/firebase`\n\nRun local Firestore\n\n`firebase emulators:start --only firestore --import=./cache`\n\nYour emulators start running on [http://localhost:4000/firestore](http://localhost:4000/firestore)\n\nRun API\n\n`export FIRESTORE_EMULATOR_HOST=\"localhost:8080\"`\n\n`npm start` or watch `npm run watch`\n\nOpen in browser\n\n[http://localhost:5000/v1/welcome](http://localhost:5000/v1/welcome)\n\n# Documentation\n\n### Get Hadith by id\n\n`http://localhost:5000/v1/:collection/:id`\n\n### Get Hadith books\n\n`http://localhost:5000/v1/books/:collection`\n\n### Get all Book Hadiths\n\n`http://localhost:5000/v1/:collection/book/:book_number`\n\n#### Paginate result\n\n`http://localhost:5000/v1/:collection/book/:book_number?offset=:number`\n\n#### Limit the result\n\n`http://localhost:5000/v1/:collection/book/:book_number?limit=:number`\n\n# Import local data to remote Firestore\n\n`gsutil -m cp -r ./cache gs://islamicnet.appspot.com`\n\n```json\n{\n  \"serve\": \"yarn build \u0026\u0026 firebase emulators:start --only functions,firestore --import=./firestore_export\",\n  \"db:update-local-from-remote\": \"yarn db:backup-remote \u0026\u0026 gsutil -m cp -r gs://my-firebase-bucket.appspot.com/firestore_export .\",\n  \"db:update-remote-from-local\": \"yarn db:backup-local \u0026\u0026 yarn db:backup-remote \u0026\u0026 gsutil -m cp -r ./firestore_export gs://my-firebase-bucket.appspot.com \u0026\u0026 yarn run db:import-remote\",\n  \"db:import-remote\": \"gcloud firestore import gs://my-firebase-bucket.appspot.com/firestore_export\",\n  \"db:backup-local\": \"firebase emulators:export --force .\",\n  \"db:rename-remote-backup-folder\": \"gsutil mv gs://my-firebase-bucket.appspot.com/firestore_export gs://my-firebase-bucket.appspot.com/firestore_export_$(date +%d-%m-%Y-%H-%M)\",\n  \"db:backup-remote\": \"yarn db:rename-remote-backup-folder \u0026\u0026 gcloud firestore export gs://my-firebase-bucket.appspot.com/firestore_export\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctabytes%2Fhadith-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctabytes%2Fhadith-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctabytes%2Fhadith-api/lists"}