{"id":21338671,"url":"https://github.com/ajshovon/dash","last_synced_at":"2025-04-15T02:41:20.557Z","repository":{"id":264042090,"uuid":"892180113","full_name":"ajshovon/dash","owner":"ajshovon","description":"DASH (Distributed Address Shortening Hub) is a decentralized application designed to shorten URLs. It leverages Cloudflare network to ensure fast and reliable short links.","archived":false,"fork":false,"pushed_at":"2024-12-04T09:23:52.000Z","size":3355,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T14:22:56.892Z","etag":null,"topics":["cloudflare","cloudflare-pages","cloudflare-workers","drizzle-orm","hono","link-shortener","neondb","nextjs","self-hosted"],"latest_commit_sha":null,"homepage":"https://dash.shovon.me","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajshovon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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-11-21T16:39:04.000Z","updated_at":"2025-01-12T18:32:09.000Z","dependencies_parsed_at":"2024-11-21T22:08:47.707Z","dependency_job_id":null,"html_url":"https://github.com/ajshovon/dash","commit_stats":null,"previous_names":["ajshovon/dash"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajshovon%2Fdash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajshovon%2Fdash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajshovon%2Fdash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajshovon%2Fdash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajshovon","download_url":"https://codeload.github.com/ajshovon/dash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248996795,"owners_count":21195785,"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":["cloudflare","cloudflare-pages","cloudflare-workers","drizzle-orm","hono","link-shortener","neondb","nextjs","self-hosted"],"created_at":"2024-11-22T00:34:29.427Z","updated_at":"2025-04-15T02:41:20.534Z","avatar_url":"https://github.com/ajshovon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DASH\n\n## Distributed Address Shortening Hub\n\n\n![Demo Build](https://github.com/ajshovon/dash/actions/workflows/deploy.yml/badge.svg?branch=demo) \n\n## [Live Dashboard Demo ⚡](https://dash-demo.shovon.me/login)\n\nUsername: `admin`\n\nPassword: `admin`\n\n\u003e NB: Performing post, put, delete methods in the demo will not reflect in the database.\n\n## Overview\n\nDASH - Distributed Address Shortening Hub is a decentralized application designed to shorten URLs. It leverages Cloudflare network to ensure fast and reliable short links.\n\n## Features\n\n- **Decentralized**: Utilizes cloudflare and it's vast network for fast serving.\n- **Secure**: Self hosted, so you manage your data.\n- **User-Friendly**: Simple and intuitive interface for easy URL shortening.\n\n## Deploy\n\n### Requirements\n\n1. Login to cloudflare, create a worker project named `dash-api` and create another pages project named `dash-web`\n\n2. Generate a Cloudflare api token following this link: \u003chttps://link.shovon.me/wrangler-token\u003e\n\n3. Create a KV in cloudflare and copy the id. Follow this for more info: \u003chttps://link.shovon.me/kv-id\u003e\n\n4. Crate an account on NeonDB and get the connection string. Follow this guide if needed: \u003chttps://link.shovon.me/neon-string\u003e\n\n5. Create a JWT secret from here (length 32): \u003chttps://link.shovon.me/gen-jwt\u003e or run this in terminal `node -e \"console.log(require('crypto').randomBytes(32).toString('hex'))\"`\n\n### Deploy With GitHub Actions\n\n1. Create a new repo using this template\n\n2. Goto the repo Settings -\u003e Secrets and variables -\u003e Actions. On Repository secrets section add these secrets\n\n| Name                 | Value                                    | Requirement |\n| -------------------- | ---------------------------------------- | ----------- |\n| CLOUDFLARE_API_TOKEN | Token generated from requirements step 2 | Required    |\n| CLOUDFLARE_KV_ID     | KV ID from requirements step 3           | Required    |\n| NEON_DATABASE_URL    | DB URL string from requirements step 4   | Required    |\n| JWT_SECRET           | JWT secret from requirements step 5      | Required    |\n| DEFAULT_USER         | Default username for login               | Required    |\n| DEFAULT_PASSWORD     | Default password for login               | Required    |\n| API_CUSTOM_DOMAIN    | Custom domain for the short link         | Optional    |\n\n3. Goto the `Actions` tab on the repo, select `Deploy API and Web` action, select `Run workflow`, branch main, `Run workflow`\n\n### Manual Deployment\n\n1. Clone this repo locally and run `pnpm install`\n\n2. Open `apps/api/wrangler.toml`, replace the `{{KV_ID}}` from with KV ID from requirements step 3. If you are going to use a custom domain for the short link, uncomment line 4 and replace `{{CUSTOM_DOMAIN}}` with your custom domain.\n\n3. Create a `.env` file in `apps/api/` and fill in NEON_DATABASE_URL, DEFAULT_USER and DEFAULT_PASSWORD\n\n4. Put the Neon database string on worker secret using: `pnpm db:set`\n\n5. Put the JWT secret on worker using: `pnpm jwt:secret:set`\n\n6. Run `pnpm worker:deploy:api` to deploy the api\n\n7. Create a `.env` file in `apps/web/` and fill in NEXT_PUBLIC_WORKER with the custom domain or the worker url got from previous command\n\n8. Run `pnpm pages:deploy:web` to deploy the web client\n\n### Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch:\n\n```sh\ngit checkout -b feature-branch\n```\n\n3. Make your changes and commit them:\n\n```sh\ngit commit -m \"Description of changes\"\n```\n\n4. Push to the branch:\n\n```sh\ngit push origin feature-branch\n```\n\n5. Create a pull request.\n\n### License\n\nThis project is licensed under the GPL 3.0 License. See the [COPYING](COPYING) file for details.\n\n### Contact\n\nFor any questions or feedback, please open an issue\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajshovon%2Fdash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajshovon%2Fdash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajshovon%2Fdash/lists"}