{"id":29029420,"url":"https://github.com/upstash/claps","last_synced_at":"2025-06-26T08:06:57.868Z","repository":{"id":48412153,"uuid":"511123784","full_name":"upstash/claps","owner":"upstash","description":"Adds clap button (like medium) to any page for your Next.js apps.","archived":false,"fork":false,"pushed_at":"2025-01-30T06:33:41.000Z","size":139,"stargazers_count":118,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T06:53:29.795Z","etag":null,"topics":["nextjs","react","redis"],"latest_commit_sha":null,"homepage":"https://upstash-claps.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/upstash.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-06T12:14:55.000Z","updated_at":"2025-05-13T09:52:54.000Z","dependencies_parsed_at":"2024-06-21T14:12:59.802Z","dependency_job_id":"18d97aae-a20c-4888-a717-63ec91806006","html_url":"https://github.com/upstash/claps","commit_stats":{"total_commits":45,"total_committers":2,"mean_commits":22.5,"dds":0.0888888888888889,"last_synced_commit":"2593a79606dacd1c42d20f59cb9cc25fd6a61f24"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/upstash/claps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upstash%2Fclaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upstash%2Fclaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upstash%2Fclaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upstash%2Fclaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upstash","download_url":"https://codeload.github.com/upstash/claps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upstash%2Fclaps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260748146,"owners_count":23056518,"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":["nextjs","react","redis"],"created_at":"2025-06-26T08:06:57.045Z","updated_at":"2025-06-26T08:06:57.862Z","avatar_url":"https://github.com/upstash.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @upstash/claps\n\n\u003e [!NOTE]  \n\u003e **This project is a Community Project.**\n\u003e\n\u003e The project is maintained and supported by the community. Upstash may contribute but does not officially support or assume responsibility for it.\n\nAdd a claps button (like medium) to any page for your Next.js apps.\n\nNothing to maintain, it is completely serverless 💯\n\nCheck out [the demo](https://upstash-claps.vercel.app).\n\n\u003ca href=\"https://twitter.com/ademilter/status/1550595499048198144\"\u003e\n\u003cimg width=\"600\" src=\"public/ss.jpeg\" /\u003e\n\u003c/a\u003e\n\n### 1. Create Database\n\nCreate a free Redis database at [Upstash Console](https://console.upstash.com)\n\n\u003e We will use [Upstash Redis](https://upstash.com) to keep the data as well as\n\u003e messaging (Redis pub/sub).\n\n### 2. Environment Variables\n\nCopy the `.env.local.example` file to `.env.local` (which will be ignored by\nGit):\n\n```bash\ncp .env.local.example .env.local\n```\n\n\u003e `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` can be found at the\n\u003e database details page in Upstash Console.\n\n### 3. Install Package\n\n```bash\nyarn add @upstash/claps\n```\n\n### 4. Import CSS\n\n```jsx\n// pages/_app.js\nimport \"@upstash/claps/style.css\";\n\nexport default function MyApp({ Component, pageProps }) {\n  return \u003cComponent {...pageProps} /\u003e;\n}\n```\n\n### 4. Import Components\n\n```jsx\n// pages/example.js\nimport Claps from \"@upstash/claps\";\n\nexport default function Example() {\n  return (\n    \u003cdiv\u003e\n        \u003cClaps fixed=\"left\"\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\nThe options can be passed as React props\n\n| key           | type                        | default      |\n| ------------- | --------------------------- | ------------ |\n| `key?`        | `string`                    |              |\n| `fixed?`      | `\"left\", \"center\", \"right\"` |              |\n| `replyUrl?`   | `string`                    |              |\n| `replyCount?` | `string`                    |              |\n| `apiPath?`    | `string`                    | `/api/claps` |\n| `iconClap?`   | `null, React.ReactElement`  |              |\n| `iconReply?`  | `null, React.ReactElement`  |              |\n\n\u003e Url of the page is being used as the key/identity to keep the claps count. You\n\u003e can override this giving the `key` attribute.\n\n### 5. Create API\n\n```js\n// pages/api/claps.js\nimport createClapsAPI from \"@upstash/claps/api\";\n\nconst ClapsAPI = createClapsAPI({\n // maxClaps: 10\n});\nexport default ClapsAPI;\n```\n\n### Support\n\nUse [Upstash Discord](https://upstash.com/discord) channel to get support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupstash%2Fclaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupstash%2Fclaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupstash%2Fclaps/lists"}