All Projects → go-awesome → shortlink

go-awesome / shortlink

Licence: Apache-2.0 license
High-Performance Shortlink ( Short URL ) app creator in Golang. For privacy reasons, you may prefer to host your own short URL app and this is the one to use.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to shortlink

golang-gqlgen-reactjs-subscription-demo
GraphQL Subscription with Golang/React JS & React Apollo Client Subscription
Stars: ✭ 29 (-77.69%)
Mutual labels:  golang-examples, golang-application
eventsourcing-go
Event Sourcing + CQRS using Golang Tutorial
Stars: ✭ 75 (-42.31%)
Mutual labels:  golang-examples, golang-application
htmlhost
hostHTML.live is downright the fastest way of hosting your single page HTML!
Stars: ✭ 21 (-83.85%)
Mutual labels:  golang-application
jacobin
A more than minimal JVM written in Go and capable of running Java 17 classes.
Stars: ✭ 59 (-54.62%)
Mutual labels:  golang-application
procedural
Procedural generation as a service
Stars: ✭ 81 (-37.69%)
Mutual labels:  golang-application
rss2hook
POST to webhook(s) when new feed-items appear.
Stars: ✭ 33 (-74.62%)
Mutual labels:  golang-application
jsonfiddle
JSON Fiddling
Stars: ✭ 14 (-89.23%)
Mutual labels:  golang-application
pheromones
实现长/短链接方式的p2p网络
Stars: ✭ 18 (-86.15%)
Mutual labels:  shortlink
mail2most
watch emails and send them to mattermost
Stars: ✭ 54 (-58.46%)
Mutual labels:  golang-application
loli
A pretty CLI to find animes passing images 👉😳👈
Stars: ✭ 17 (-86.92%)
Mutual labels:  golang-application
go-notebook
Go-Notebook is inspired by Jupyter Project (link) in order to document Golang code.
Stars: ✭ 33 (-74.62%)
Mutual labels:  golang-examples
gh
Control GitHub from your Terminal
Stars: ✭ 28 (-78.46%)
Mutual labels:  golang-application
pirrigo
Full-featured Raspberry Pi based irrigation controller and web application for scheduling.
Stars: ✭ 18 (-86.15%)
Mutual labels:  golang-application
ToRat client
This is the ToRat client, a part of the ToRat Project.
Stars: ✭ 29 (-77.69%)
Mutual labels:  golang-application
samples-go
Temporal Go SDK samples
Stars: ✭ 269 (+106.92%)
Mutual labels:  golang-examples
golangschool
原生golang语言开发的web网站
Stars: ✭ 98 (-24.62%)
Mutual labels:  golang-examples
ShortLink
𝓢𝓱𝓸𝓻𝓽𝓛𝓲𝓷𝓴 is a simple (yet powerful) URL Shortening script 🔥💥⚡
Stars: ✭ 25 (-80.77%)
Mutual labels:  shortlink
nssh
An easy way to manage SSH connections and sshconfig records
Stars: ✭ 25 (-80.77%)
Mutual labels:  golang-application
go-proj-starter
Golang project starter
Stars: ✭ 13 (-90%)
Mutual labels:  golang-examples
go-api-basic
A Go RESTful API template
Stars: ✭ 313 (+140.77%)
Mutual labels:  golang-examples

About The Project

Shortlink App in Golang

  • Multiple Node based Architecture to create and scale at ease
  • Highly performant key-value storage system
  • Centralized Storage option when multiple node created - requires tweaking.
  • API auth system not built. Left for using it for your own use case like JWT or paseto. Self Implement.

Please see the architecture file in the repository on option you can use the app. For some minor tweaking may be required.

Built With

List of Library and Framework used in building the app:

Getting Started

Just download and run go run main.go and you are ready to go. To deploy to server, prefer DigitalOcean

Steps

Common Steps to Launch:

go mod tidy
go mod vendor
go run main.go OR go build -ldflags "-s -w" main.go && ./main

Must Changeable Variables in constant.go:

Production      = 2 // Please set to 1 if in production.
Domain          = "https://lin.ks/"
CookieName      = "lin.ks"
NodeID          = "N1|" // Increase per node by value as "N2|", "N3|"... for multiple node
DBFolder        = "/home/ubuntu/go/src/shortlink/db/"
AddFromToken    = 3 // firt N character to get from token and use it in ShortID
ShortIDToken    = 7 // Further added from 1st N char of AddFromToken+NodeID: total=12
APITokenLength  = 32
Click here to see Rest API Example:
  1. Short URL redirector: /:short_code_here
  2. API Routes:
  • /api/create [Post]
Takes `{"url": "https://github.com"}` with `Authorization: Bearer {token}` from Header
  • /api/update [Post]
Takes `{"old": "https://github.com", "new": "https://bitbucket.com", "short": "shortcode"}` with `Authorization: Bearer {token}` from Header
  • /api/delete [Post]
Takes `{ "long": "https://bitbucket.com", "short": "shortcode"}` with `Authorization: Bearer {token}` from Header
  • /api/fetch [GET]
 Takes `Authorization: Bearer {token}` from Header
  • /api/fetch/:short_code_here [GET]
 {short_code_here} in the URL and Takes `Authorization: Bearer {token}` from Header

Note: Remember to implement Auth system of your own and Replace APITokenLength check with your own function.

Please see the rest.http file to understand the request type in live details.

Feature request?

Share your feature request via issue tracker.

Feel like helping out:

  • Via Code Contribution (if any / new feature)
  • BTC: 1Hp24RtL3o86boapSAD3DtyqF5jdq1rfpM
  • Star the repository and watch out for new updates and features.

Do not Forget [ Shortlink App Plan ]

Following Use cases:

  • Self-Hosted URL tracking.
  • Your URL tracking insights is in-house and not hosted or shared with third party.

License

Distributed under the Apache License 2.0. See LICENSE for more information.

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].