Skip to content

tinyurl/tinyurl

Repository files navigation

TinyURL - Make Personal URL Shortening Service Easy

Build Status Go Report Card GoDoc


Live Demo

a url shorten web service written by Golang, Vue and Gin.

Requisites

  • Golang(1.12+)
  • MySQL/Sqlite3
  • make
  • Docker

Quick Start

  1. clone project to GOPATH
git clone https://github.com/tinyurl/tinyurl.git $GOPATH/src/github.com/tinyurl/tinyurl
  1. build binary
make
  1. change config in default.properties
  2. run binary
./tinyurl -config default.properties
  1. open index.html in frontend/ with broswer
  2. default Swagger API url is http://0.0.0.0:8877/swagger/index.html

TODOs

  • validate input url format
  • improve random generate string algorithm
    • use math/rand.Read instead math/rand.Intn func
  • use logrus replace golang log lib
  • reserch wrk
  • add test case
  • Backend
    • data type support multi database(index in sender)
    • adjust short path generating algorithm
    • Swagger for api management
    • custom short url
    • API rate
    • Admin account?
    • count each url parse time (high concurrent situation)
  • Frontend
    • qrcode support

Reference