Skip to content
forked from nownabe/golink

Note: we're only using an extensions from this repo. I'm forking to hardcode our trotto instance url

License

Notifications You must be signed in to change notification settings

qedsoftware/golink

 
 

Repository files navigation

Golink (go/link)

A URL shortener for creating concise, memorable short links, suitable for organization-scoped use, such as in companies or schools.

golink-demo.mp4

Alternatives

Considering other options? Here are some similar platforms:

Golinks has the following advantages compared to these alternatives:

  • Self-hosted: You have full control of Golink backend.
  • Fully-managed: Golink can be built on fully-managed infrastructure.
  • Easy to deploy: You can complete to deploy Golink in just three simple steps.
  • Cost-effective: You can get started with Golink at no cost.
  • No DNS configuration: Redirect through the Golink Chrome extension.
  • Chrome extension with Manifest V3: Manifest V3 is more secure than V2 and V2 will be end-of-life.

Golink Origin

Golink originated from Google's internal short links. If you are curious about history of go/, dive into the stories on these websites:

Usage

For General Users

  1. Install the Golink Chrome Extension.
  2. Right-click the extension icon and select Options.
  3. Input your Golink URL and then click the Save button.

Setup for Administrators

Prerequisites

Additionally, you need to execute the following command:

gcloud auth login

Configure Your Project

Set your project ID:

gcloud config set project <YOUR-PROJECT-ID>

Deploy Applications

Clone this repository:

git clone https://github.com/nownabe/golink
cd golink

Run the deploy script. Replace <REGION> with one of App Engine regions.

./deploy.sh <REGION>

For instance:

./deploy.sh us-central1

Configure Identity-Aware Proxy

Begin by accessing the Google Cloud Console to set up the OAuth consent screen.

  1. Choose User Type.
    • Opt for a user type based on your needs. For exclusive access to members of your organization, select Internal. Note: choosing External doesn't mean open access. Users can't access your Golink unless you grant explicit permission.
  2. Enter App information
    • App name: Golink
    • User support email: Your email or a Google Group
    • Developer contact information: Your email or alternate contact emails
    • Finish by clicking SAVE AND CONTINUE
  3. You don't have to configure scopes.

Proceed to Identity-Aware Proxy. Turn on IAP for the App Engine app. If you encounter an error status before enabling, you can safely disregard it at this time.

Add Users

To make Golink accessible to all members of your organization, execute:

gcloud iap web add-iam-policy-binding \
  --role roles/iap.httpsResourceAccessor \
  --member domain:<YOUR-COMPANY-DOMAIN>

If you prefer to grant access on an individual basis:

gcloud iap web add-iam-policy-binding \
  --role roles/iap.httpsResourceAccessor \
  --member user:<EMAIL>

You have the option to specify Google Groups too:

gcloud iap web add-iam-policy-binding \
  --role roles/iap.httpsResourceAccessor \
  --member group:<EMAIL>

Examples:

gcloud iap web add-iam-policy-binding \
  --role roles/iap.httpsResourceAccessor \
  --member domain:your-company.example.com

gcloud iap web add-iam-policy-binding \
  --role roles/iap.httpsResourceAccessor \
  --member user:[email protected]

gcloud iap web add-iam-policy-binding \
  --role roles/iap.httpsResourceAccessor \
  --member group:[email protected]

Retrieve Your Golink URL

Determine your Golink URL with:

echo "https://$(gcloud app describe --format "get(defaultHostname)")"

Then notify your team members to enter this URL in Golink Chrome Extension Options. Enjoy using golinks!

Distribute Golink extension to your organization

You can enforce Golink Chrome extension to be installed in your organization members' browsers.

  1. Open https://admin.google.com and navigate to Devices > Chrome > Apps & extensions > Users & browsers.
  2. Click the yellow plus button at the bottom right and then click "add from Chrome Web Store".
  3. Enter clecngohjeflemkblbfdfbjkjnigbjok in the "View app by ID" textbox and click the "Select" button.
  4. Set "Permissions and URL access" to "Allow all permissions".

About

Note: we're only using an extensions from this repo. I'm forking to hardcode our trotto instance url

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.8%
  • Go 38.3%
  • HTML 2.8%
  • Other 1.1%