{"id":24087941,"url":"https://github.com/tinybirdco/demo-interactive-leaderboard","last_synced_at":"2025-08-17T01:34:28.873Z","repository":{"id":249695402,"uuid":"831078479","full_name":"tinybirdco/demo-interactive-leaderboard","owner":"tinybirdco","description":"Example interactive leaderboard for webinar featuring JWTs","archived":false,"fork":false,"pushed_at":"2024-07-22T20:25:29.000Z","size":538,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T05:24:36.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://demo-interactive-leaderboard.vercel.app","language":"JavaScript","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/tinybirdco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-07-19T15:55:21.000Z","updated_at":"2024-07-22T20:25:33.000Z","dependencies_parsed_at":"2024-07-22T20:33:27.553Z","dependency_job_id":null,"html_url":"https://github.com/tinybirdco/demo-interactive-leaderboard","commit_stats":null,"previous_names":["tinybirdco/demo-interactive-leaderboard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tinybirdco/demo-interactive-leaderboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fdemo-interactive-leaderboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fdemo-interactive-leaderboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fdemo-interactive-leaderboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fdemo-interactive-leaderboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinybirdco","download_url":"https://codeload.github.com/tinybirdco/demo-interactive-leaderboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fdemo-interactive-leaderboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270796217,"owners_count":24647319,"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-16T02:00:11.002Z","response_time":91,"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-10T03:56:21.246Z","updated_at":"2025-08-17T01:34:28.846Z","avatar_url":"https://github.com/tinybirdco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build an interactive leaderboard with React and Tinybird\n\nLearn how to build a React app that emits game events data to Tinybird using HTTP streaming, and then utilizes Tinybird to query data and publish APIs which are integrated back into the React app for to provide motivational interactive leaderboards.\n\n![Gif of the final game](/img/game-gif.gif)\n\n### Prerequisites\n\n- Python 3.8 (only if you use the data generator)\n- Node.js\n\n## Instructions\n\nFollow these instructions to deploy the working version of this application.\n\n### 0. Create a free Tinybird Workspace\n\nFirst, create a [free Tinybird account](https://www.tinybird.co/signup). Then create a new Workspace when prompted. You can name it whatever you want.\n\n### 1. Clone the repository\n\n```sh\ngit clone https://github.com/tinybirdco/demo-interactive-leaderboard.git\ncd demo-interactive-leaderboard\n```\n\n### 2. Install app dependencies\n\n```sh\ncd app\nnpm install\n```\n\n### 3. Install the Tinybird CLI\n\n```sh\ncd tinybird\npython -m venv .venv\nsource .venv/bin/activate\npip install tinybird-cli\n```\n\n### 4. Authenticate to Tinybird\n\nCopy your User Admin Token from the Tinybird UI. Your user admin token is the token with the format admin \u003cyour email address\u003e.\n\nFrom the `/tinybird` directory, run the following command:\n\n```sh\ntb auth --token \u003cyour user admin token\u003e\n```\n\n\u003e :warning: Your token and workspace details will be stored in a .tinyb file. If you intend to push this to a public repository, add the `.tinyb` to your `.gitignore`.\n\n### 5. Push the resources to Tinybird\n\nRun the following command to push Tinybird resources to the Tinybird server.\n\n```sh\ncd tinybird\ntb push --force\n```\n\n### 6. Create local Environment Variables.\n\nCreate an `.env.local` and add the following:\n\n```\nTB_HOST=\u003cyour tinybird host\u003e\u003e\nTB_TOKEN=\u003cyour user admin token OR create datasource token\u003e\nTB_WS_ID=\u003cthe id of your Tinybird workspace. Used for JWT creation.\u003e\nTB_SIGNING_KEY=\u003cyour workspace admin token. Used to sign JWTs.\u003e\n```\n\nNote you can copy the any token from the Tinybird CLI with `tb token copy \u003ctoken name\u003e`.\n\n### 7. Run the \"backend\"\" server\n\nThis app uses an Express app to proxy as a backend server to store Tinybird tokens and host an API route to generate a JWT. Run the backend server from the `/services` directory:\n\n```sh\ncd services\nnode server.js\n```\n\nIf you visit `http://localhost:3001` you'll see a message that the server is running.\n\n### 8. Run the app!\n\nRun the application!\n\n```sh\nnpm run dev\n```\n\nOpen it at `http://localhost:3000` and play the game. Have fun, and try to beat your record!\n\n## Contributing\n\nIf you find any issues or have suggestions for improvements, please submit an issue or a [pull request](https://github.com/tinybirdco/demo-interactive-leaderboard/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc).\n\n## License\n\nThis code is available under the MIT license. See the [LICENSE](https://github.com/tinybirdco/demo-interactive-leaderboard/blob/main/LICENSE.txt) file for more details.\n\n## Need help?\n\n\u0026bull; [Community Slack](https://www.tinybird.co/community) \u0026bull; [Tinybird Docs](https://www.tinybird.co/docs) \u0026bull;\n\n## Authors\n\n- [Cameron Archer](https://github.com/tb-peregrine)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fdemo-interactive-leaderboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinybirdco%2Fdemo-interactive-leaderboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fdemo-interactive-leaderboard/lists"}