All Projects → alexbrazier → go-url

alexbrazier / go-url

Licence: MIT license
Url Shortener for use inside organisation

Programming Languages

go
31211 projects - #10 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects
HTML
75241 projects
shell
77523 projects
CSS
56736 projects

Projects that are alternatives of or similar to go-url

Joonasw.ManagedIdentityDemos
Example uses of Azure Managed Identities
Stars: ✭ 24 (+33.33%)
Mutual labels:  azure-active-directory
delta
A modern file uploader + URL shortner written in node for your private cloud. low memory overhead + secure
Stars: ✭ 103 (+472.22%)
Mutual labels:  url-shortener
yaus
Deprecated URL shortener
Stars: ✭ 26 (+44.44%)
Mutual labels:  url-shortener
miniurl
A production-ready URL shortener microservice.
Stars: ✭ 20 (+11.11%)
Mutual labels:  url-shortener
1y
A template project to build a short URL manager with Eleventy
Stars: ✭ 68 (+277.78%)
Mutual labels:  url-shortener
dwarf
A O(1) URL shortener microservice backed by redis and gRPC communication.
Stars: ✭ 33 (+83.33%)
Mutual labels:  url-shortener
Becoditive-API
The official API of beCoditive with many endpoints like memes, animals, image manipulation, url shortner, etc.
Stars: ✭ 14 (-22.22%)
Mutual labels:  url-shortener
mpngin
A simple and fast URL shortener with built in stats.
Stars: ✭ 31 (+72.22%)
Mutual labels:  url-shortener
fastapi-azure-auth
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 B2C, single- and multi-tenant support.
Stars: ✭ 174 (+866.67%)
Mutual labels:  azure-active-directory
workos-node
Official Node SDK for interacting with the WorkOS API
Stars: ✭ 42 (+133.33%)
Mutual labels:  azure-active-directory
zinc
ZincSearch. A lightweight alternative to elasticsearch that requires minimal resources, written in Go.
Stars: ✭ 9,936 (+55100%)
Mutual labels:  opensearch
FireShort
A URL Shortener made using React.JS and Google Firestore
Stars: ✭ 29 (+61.11%)
Mutual labels:  url-shortener
laravel-url-shortener
URL shortener for Laravel
Stars: ✭ 26 (+44.44%)
Mutual labels:  url-shortener
tiny0
Custom URL shortener in Flask.
Stars: ✭ 60 (+233.33%)
Mutual labels:  url-shortener
throw-me
A url shortener made with nextjs and postgresql database operated with Prisma
Stars: ✭ 34 (+88.89%)
Mutual labels:  url-shortener
security-dashboards-plugin
🔐 Manage your internal users, roles, access control, and audit logs from OpenSearch Dashboards
Stars: ✭ 38 (+111.11%)
Mutual labels:  opensearch
ali-opensearch-sdk
阿里云开放搜索 laravel SDK
Stars: ✭ 36 (+100%)
Mutual labels:  opensearch
gow
URL shortener for evlfctry.pro
Stars: ✭ 29 (+61.11%)
Mutual labels:  url-shortener
zone
A URL shortener / note sharing service.
Stars: ✭ 18 (+0%)
Mutual labels:  url-shortener
react-native-azure-ad
React Native module implements Azure AD authentication flow in pure js
Stars: ✭ 83 (+361.11%)
Mutual labels:  azure-active-directory

Go URL

CircleCI Cypress Dashboard dependencies

A simple URL shortener written in Go with a React frontend and Postgres database.

Features

  • Shorten urls based on a user defined key
  • Alias a key to point to another short url
  • Open multiple pages at once by separating keys with a comma
  • Alias a key to point to multiple other keys
  • Use variables in URLs
  • Opensearch integration to provide suggestions directly to browser
  • Frontend to view most popular searches and search to find existing links
  • Frontend to allow anyone to add and edit links
  • Optional authentication using Azure AD or Okta
  • Slack / command integration
  • Slackbot integration

Demo

Getting Started

The recommended way to test and deploy is using Docker. You will need to run both the go-url app, and the Postgres DB.

Start Postgres

docker run -d -P --name db -e POSTGRES_PASSWORD=password -e POSTGRES_DB=go -e POSTGRES_ADDR=db:5432 postgres:11.3-alpine

Start App

docker run -p 1323:1323 -e HOSTS=localhost -e APP_URI=http://localhost:1323 --link db alexbrazier/go-url

Alteratively use the docker-compose file and run:

docker-compose up

Development

Open http://localhost:8080/go

Run Postgres manually or with Docker

docker-compose up postgres

Install node (via nvm), yarn & go

brew install nvm yarn go
nvm install

Start frontend

cd frontend
yarn
yarn start

Start API

cd api
dep ensure
POSTGRES_PASS=password HOSTS=localhost APP_URI=http://localhost:3000 go run server.go

Enviroment Configuration

Env Var Required Default Example Description
HOSTS yes go.domain.com,go2.domain.com List of comma separated hosts that the server will be able to be accessed from
BLOCKED_HOSTS go.domain.com,go2.domain.com List of hosts you want to block from being linked - HOSTS are already included to stop recursive calls
APP_URI yes https://go.domain.com Default URI of app - used to link back to app
PORT 1323 Port the app will run on
DEBUG false Enable more logging
JSON_LOGS false Use JSON logs where possible
POSTGRES_ADDR localhost:5432 Postgres db address
POSTGRES_DATABASE go Postgres db name
POSTGRES_USER postgres Postgres user
POSTGRES_PASS password Postgres password
SLACK_TOKEN xoxb-xxxxxxxxx-xxxxxxxx-xxxx Slack OAuth token to enable slackbot
SENTRY_API_DSN Sentry DSN for go API
SENTRY_FRONTEND_DSN Sentry DSN for react frontend
SLACK_SIGNING_SECRET xxxxxxxxxxx Slack signing secret to enable Slack /go command
SLACK_TEAM_ID Txxxxxxxx Slack team id to restrict slash command responses to single team
ENABLE_AUTH false Enable Azure auth or not - if enabled, all other fields must be filled in
AUTH_EXPIRY_SECONDS 2592000 Auth cookie expiry (default 30 days)
SECURE_COOKIES true Use secure https only cookies
AD_TENANT_ID Azure AD tenant ID
AD_CLIENT_ID Azure AD client ID
AD_CLIENT_SECRET Azure AD client secret
OKTA_CLIENT_ID Okta client ID
OKTA_CLIENT_SECRET Okta client secret
OKTA_ISSUER https://dev-123.oktapreview.com/oauth2/default Okta issuer url
SESSION_TOKEN Secret session token to store the user sessions
ALLOWED_IPS 110.1.10.2,1.1.22.0/24 IP addresses or CIDRs that are always allowed access, even with auth enabled
ALLOW_FORWARDED_FOR false Retrieve origin IP from X-Forwarded-For header. Only enable if source is trusted, e.g. via Cloudfront
FORWARDED_FOR_TRUST_LEVEL 1 Number of levels to trust X-Forwarded-For header - should map to number of proxies used

FAQ

Slackbot is posting multiple replies messages to a single message

When enabled, the Slackbot will be running on every node in a load balanced system. Either disable load balancing, or run a separate instance just for the Slackbot.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].