{"id":19044081,"url":"https://github.com/himanshub16/outbound-go","last_synced_at":"2025-04-23T23:26:41.028Z","repository":{"id":57576626,"uuid":"135068297","full_name":"himanshub16/outbound-go","owner":"himanshub16","description":"URL shortener and Redirection As A Service","archived":false,"fork":false,"pushed_at":"2018-11-10T06:32:31.000Z","size":1602,"stargazers_count":23,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T07:51:58.065Z","etag":null,"topics":["docker","gin","go","golang","outbound","redirection","tracking","url-shortener"],"latest_commit_sha":null,"homepage":"https://outbound-go.herokuapp.com/","language":"Go","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/himanshub16.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}},"created_at":"2018-05-27T17:40:55.000Z","updated_at":"2025-01-12T11:18:46.000Z","dependencies_parsed_at":"2022-08-28T21:12:34.520Z","dependency_job_id":null,"html_url":"https://github.com/himanshub16/outbound-go","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Foutbound-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Foutbound-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Foutbound-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Foutbound-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/himanshub16","download_url":"https://codeload.github.com/himanshub16/outbound-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250530748,"owners_count":21445849,"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":["docker","gin","go","golang","outbound","redirection","tracking","url-shortener"],"created_at":"2024-11-08T22:44:47.599Z","updated_at":"2025-04-23T23:26:41.003Z","avatar_url":"https://github.com/himanshub16.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Outbound\n\nURL shortener and click counter. Best suited if you are looking to host your own.\n\n---\n\nTable of Contents\n\n* [What does outbound mean?](#what-does-outbound-mean)\n* [Features](#features)\n* [Installation](#installation)\n* [Using docker](#using-docker)\n* [Configuration](#configuration)\n* [Usage](#usage)\n\n## Features\n* Written in Go - just a binary with 0 dependencies and yeah, it's fast.\n* Supports both MongoDB and PostgreSQL.\n* Redirect your preferred way - [**client-side**](https://www.w3.org/TR/WCAG20-TECHS/H76.html) or [**server-side**](https://www.w3.org/TR/WCAG20-TECHS/SVR1.html).\n* Shorten URLs to reduce usage.\n* Count clicks on each shortened URL.\n\n## Installation\nDownload the latest binary for Linux [here](https://github.com/himanshub16/outbound-go/releases/latest).\nConfigure and just run the binary.\n\n### Using docker\n1. Clone the repo \n2. Docker compose \n  ```\n  docker-compose up --build\n  ```\n3. To change configurations update `docker.env`\n\n## Configuration\n`.env.postgresql.json`, `.env.mongodb.json` or `environment variables` is what you are looking for.\n\nIt first checks `CONFIG_FILE` environment variable for required file, and if not found fetches each environment variable.\nThe variables are described as under:\n\n| Field           | Description                                                     | Example                     |\n| ------          | -----------                                                     | -------                     |\n| DBTYPE          | string : one of `postgresql` or `mongodb`                       | `mongodb`                   |\n| DB_URL          | URL of database instance (mongodb/postgresql)                   | `mongodb://localhost:27017` |\n| LINKS_COLL      | The collection which stores the links                           | `links`                     |\n| COUNTER_COLL    | The collection which stores the counter                         | `counter`                   |\n|                 |                                                                 |                             |\n| PORT            |                                                                 | 9000                        |\n| REDIRECT_METHOD | Default redirect method, one of `client-side` and `server-side` | `client-side`               |\n\n\n## Usage\n* Create a new entry\n\nMake a  post request to `/new` with `access_token` (_if required_) and `url`.\nThe result will be a new **Link** object with the `short_id` of the shortened URL.\n\n* Redirect a shortened URL (`short_id`)\n  - **Client side** : `/c/:short_id`\n  - **Server side** : `/s/:short_id`\n  - **Default** : `/r/:short_id`\n\n\n## What does outbound mean?\n* Outbound refers to traffic outside your domain/website.\n* Websites log clicks to other domains for analytical purpose. Example, Facebook uses lm.facebook.com, Slack uses slack-redir.net, Twitter has t.co, etc.\n\nThis is similar to https://git.io\n\n\n---\nLiked this? Star this repo, or [Grab me a coffee.](https://github.com/himanshub16/outbound-go/raw/master/static/paytm.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanshub16%2Foutbound-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimanshub16%2Foutbound-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanshub16%2Foutbound-go/lists"}