{"id":31666022,"url":"https://github.com/amankharwar575/book-review-api-designed","last_synced_at":"2026-04-07T07:46:54.751Z","repository":{"id":318382578,"uuid":"1071063604","full_name":"amankharwar575/book-review-api-designed","owner":"amankharwar575","description":"Book Review API — Express + MongoDB REST API with JWT auth and Swagger docs","archived":false,"fork":false,"pushed_at":"2025-10-06T20:21:52.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-07T07:46:52.631Z","etag":null,"topics":["authentication","authentication-backend","express","jwt","mongodb","mongoose","nodejs","rest-api","reviews","swagger"],"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/amankharwar575.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T20:16:41.000Z","updated_at":"2025-10-06T20:25:26.000Z","dependencies_parsed_at":"2025-10-06T22:36:16.351Z","dependency_job_id":null,"html_url":"https://github.com/amankharwar575/book-review-api-designed","commit_stats":null,"previous_names":["amankharwar575/book-review-api-designed"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amankharwar575/book-review-api-designed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amankharwar575%2Fbook-review-api-designed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amankharwar575%2Fbook-review-api-designed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amankharwar575%2Fbook-review-api-designed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amankharwar575%2Fbook-review-api-designed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amankharwar575","download_url":"https://codeload.github.com/amankharwar575/book-review-api-designed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amankharwar575%2Fbook-review-api-designed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"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":["authentication","authentication-backend","express","jwt","mongodb","mongoose","nodejs","rest-api","reviews","swagger"],"created_at":"2025-10-07T22:55:39.867Z","updated_at":"2026-04-07T07:46:54.743Z","avatar_url":"https://github.com/amankharwar575.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Book Review API\r\n\r\nSmall Express + MongoDB API for book reviews with Swagger docs.\r\n\r\n## Requirements\r\n- Node.js 18+\r\n- npm\r\n- MongoDB (Atlas or local)\r\n- Windows PowerShell (for commands below)\r\n\r\n## Setup\r\n1. Install deps:\r\n```powershell\r\nnpm install\r\n```\r\n\r\n2. Create `.env` in project root (see `.env.example`) and set:\r\n- MONGO_URI (URL-encode special characters in password)\r\n- PORT (optional, default 4000)\r\n- JWT_SECRET\r\n\r\nExample `.env.example` already in repo.\r\n\r\n## Run\r\n- Dev (nodemon):\r\n```powershell\r\nnpm run dev\r\n```\r\n- Prod:\r\n```powershell\r\nnpm start\r\n```\r\n- Inline env for current session:\r\n```powershell\r\n$env:MONGO_URI=\"your_encoded_uri\"; $env:PORT=\"4000\"; npm run dev\r\n```\r\n\r\n## API\r\n- Swagger UI: http://localhost:4000/api/v1/docs\r\n- Health: GET /health\r\n- Auth: POST /api/v1/users/register, POST /api/v1/users/login\r\n- Books: mounted at /api/v1/books\r\n\r\nExample PowerShell register:\r\n```powershell\r\nInvoke-RestMethod -Uri http://localhost:4000/api/v1/users/register -Method Post -Body (@{ name='Test'; email='test@example.com'; password='pass123' } | ConvertTo-Json) -ContentType 'application/json'\r\n```\r\n\r\n## Tests\r\nRun Jest:\r\n```powershell\r\nnpm test\r\n```\r\n\r\n## Git / Hackathon\r\n- Add remote and push:\r\n```powershell\r\ngit remote add origin https://github.com/\u003cuser\u003e/\u003crepo\u003e.git\r\ngit push -u origin HEAD\r\n```\r\n- Ensure `.env` is not committed (`.gitignore` includes `.env`).\r\n\r\n## Troubleshooting\r\n- \"Cannot GET /\": root redirects to docs; open `/api/v1/docs`.\r\n- Mongo ENOTFOUND: URL-encode password (e.g. @ -\u003e %40, # -\u003e %23).\r\n- If server not running, check logs, kill stuck process:\r\n```powershell\r\nC:\\Windows\\System32\\netstat.exe -ano | Select-String ':4000'\r\n# then Stop-Process -Id \u003cPID\u003e -Force\r\n```\r\n\r\n## Quick hackathon checklist\r\n- Confirm MONGO_URI works and server shows \"MongoDB connected\".\r\n- Prepare sample requests (curl/PowerShell/Postman).\r\n- Add README, .env.example, .gitignore (done).\r\n- Commit and push changes.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famankharwar575%2Fbook-review-api-designed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famankharwar575%2Fbook-review-api-designed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famankharwar575%2Fbook-review-api-designed/lists"}