{"id":29671359,"url":"https://github.com/tinybirdco/vercel-log-drains-template","last_synced_at":"2025-08-08T06:11:18.183Z","repository":{"id":287181161,"uuid":"963875615","full_name":"tinybirdco/vercel-log-drains-template","owner":"tinybirdco","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-27T09:04:01.000Z","size":757,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-19T07:43:45.677Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/tinybirdco.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}},"created_at":"2025-04-10T10:49:04.000Z","updated_at":"2025-06-27T09:04:05.000Z","dependencies_parsed_at":"2025-04-10T11:46:43.510Z","dependency_job_id":"a8d770b9-340e-4bf3-b52b-c21acb584d0f","html_url":"https://github.com/tinybirdco/vercel-log-drains-template","commit_stats":null,"previous_names":["tinybirdco/vercel-log-drains-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tinybirdco/vercel-log-drains-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fvercel-log-drains-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fvercel-log-drains-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fvercel-log-drains-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fvercel-log-drains-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinybirdco","download_url":"https://codeload.github.com/tinybirdco/vercel-log-drains-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fvercel-log-drains-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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-07-22T20:07:40.528Z","updated_at":"2025-07-22T20:07:41.089Z","avatar_url":"https://github.com/tinybirdco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vercel Log Drains Explorer Template\n\nThis is a template for a Vercel Log Drains Explorer web application. It is built with Next.js and [Tinybird](https://tinybird.co).\n\nThis is a fork of the [Logs Explorer Template](https://github.com/tinybirdco/logs-explorer-template) with some modifications to make it work with Vercel Log Drains.\n\nFork it and make it your own!\n\n[Watch Demo Video](https://youtu.be/3aIaeuCGQ-E)\n\n## Set up the project\n\nFork the GitHub repository and deploy the data project to Tinybird.\n\n```bash\n# select or create a new workspace\ntb login\n\n# deploy the template\ntb --cloud deploy --template https://github.com/tinybirdco/vercel-log-drains-template/tree/main/tinybird\n\n# copy the dashboard token\ntb --cloud token copy read_pipes\n```\n\nDeploy the project to [Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Ftinybirdco%2Fvercel-log-drains-template\u0026project-name=vercel-log-drains-template\u0026repository-name=vercel-log-drains-template\u0026demo-description=Custom%20logs%20explorer%20for%20your%20application%20logs%20using%20Tinybird\u0026demo-url=http%3A%2F%2Flogs.tinybird.app\u0026demo-image=//github.com/tinybirdco/vercel-log-drains-template/blob/main/dashboard/log-analyzer/public/banner.png?raw=true\u0026root-directory=dashboard/log-analyzer) to get started quickly.\n\nConfigure these Environment Variables in your Vercel project and you are ready to go:\n\n```bash\nNEXT_PUBLIC_TINYBIRD_API_KEY=\u003cYOUR_TINYBIRD_READ_PIPES_TOKEN\u003e\nNEXT_PUBLIC_TINYBIRD_API_URL=\u003cYOUR_TINYBIRD_REGION_HOST\u003e\n```\n\nGet your Tinybird `read_pipes` token and region host from the [Tinybird dashboard](https://cloud.tinybird.co/tokens).\n\n## Instrumenting your Vercel Log Drains\n\nGo to Vercel Dashboard and configure your Log Drains:\n\n- Choose your team scope on the dashboard, and go to **Team Settings \u003e Log Drains**.\n- Select the **Projects** to send logs to Tinybird.\n- Select **Sources** you want to send logs to Tinybird.\n- Select **NDJSON** as Delivery Format.\n- Select **Environments** and **Sampling Rate**.\n- Set this URL `\u003cYOUR_TINYBIRD_REGION_HOST\u003e/v0/events?name=logs\u0026x-vercel-verify=\u003cyour-x-vercel-verify-token\u003e`\n- Select **Custom Headers**, add `Authorization` with the value `Bearer \u003cYOUR_TINYBIRD_ADMIN_TOKEN\u003e` and select **Add**.\n- Select **Verify** and create the Log Drain.\n\n## Local Development\n\nGet started by forking the [GitHub repository](https://github.com/tinybirdco/vercel-log-drains-template) and then customizing it to your needs.\n\nStart Tinybird locally:\n\n```bash\ncurl -LsSf https://tbrd.co/fwd | sh\ncd tinybird\ntb local start\ntb login\ntb dev\ntoken ls  # copy an admin token\n```\n\nConfigure the Next.js application:\n\n```bash\ncd dashboard/log-analyzer\ncp .env.example .env\n```\n\nEdit the `.env` file with your Tinybird API key and other configuration.\n\n```bash\nNEXT_PUBLIC_TINYBIRD_API_KEY=\u003cYOUR_TINYBIRD_LOCAL_ADMIN_TOKEN\u003e\nNEXT_PUBLIC_TINYBIRD_API_URL=http://localhost:7181\n```\n\nStart the Next.js application:\n\n```bash\ncd dashboard/log-analyzer\nnpm install\nnpm run dev\n```\n\nOpen the application in your browser:\n\n```bash\nhttp://localhost:3000\n```\n\nRead the [dashboard/log-analyzer/README.md](./dashboard/log-analyzer/README.md) file for more information on how to use the application and [tinybird/README.md](./tinybird/README.md) for more information on how to customize the template.\n\n## Deployment\n\nDeploy the Tinybird project to the cloud:\n\n```bash\ncd tinybird\ntb --cloud deploy\n```\n\nOnce deployed copy your Tinybird cloud host and `read_pipes` token, [deploy the Next.js application to Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Ftinybirdco%2Fvercel-log-drains-template\u0026project-name=vercel-log-drains-template\u0026repository-name=vercel-log-drains-template\u0026demo-description=Custom%20logs%20explorer%20for%20your%20application%20logs%20using%20Tinybird\u0026demo-url=http%3A%2F%2Flogs.tinybird.app\u0026demo-image=//github.com/tinybirdco/vercel-log-drains-template/blob/main/dashboard/log-analyzer/public/banner.png?raw=true\u0026root-directory=dashboard/log-analyzer) and configure the environment variables.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fvercel-log-drains-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinybirdco%2Fvercel-log-drains-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fvercel-log-drains-template/lists"}