Code Monkey home page Code Monkey logo

gow's Introduction

gow

Simple URL shortener with simple analytics.

gow

Motivation

This program is powering our internal url shortener (evlfctry.pro) which is to track link distribution without tracking any personal data.

Technologies

  • Go
  • SQLite
  • Reason React (Web)

Goals

  • Minimal dependencies
  • Minimal memory footprint
  • No personal data tracking

Development

Make sure you have Go & SQLite installed (and its dependencies), if not, you know what's next.

  • Build the application: make
  • Run the server: TOKEN=<token> ./gow

If you want to develop the web as well, you need to open a new terminal session and run npm run dev in web directory.

Environment variables

  • TOKEN - Used for creating via REST_API, default: (empty)
  • HOST - Helpful when you are using reverse proxy, default: localhost
  • PORT - Helpful in case you don't use container technology, default: 3030
  • SLACK_WEBHOOK - (Optional) Slack Webhook URL to send incoming request to Slack, default: (empty)

For now (v0.2.0), authorization is done in Layer 7 (Load Balancer), but I will fix this.

Deployment

There are 2 ways to run this program in Production.

Quick way

  • Pull the image: docker pull evilfactorylabs/gow:<version>
  • Run it: docker run -d -e TOKEN="<token>" -v ~/data:/app/data evilfactorylabs/gow:<version>

As Binary

  • Clone repo
  • Build code: make
  • Run program: TOKEN=<token> ./gow

As Docker Container

  • Build image: docker build -t . evilfactorylabs/gow:latest
  • Run image: docker run -d -e TOKEN="<token>" -v ~/data:/app/data evilfactorylabs/gow:<version>

Roadmap

  • v1.0.0 — stable basic functionality [api, web]
  • v1.1.0 — show total hits on index & stats page [api, web]
  • v1.2.0 — functionality to delete existing slug [api]
  • v1.3.0 — authentication functionality, not rely on token (like now) [api, db]
  • v1.4.0 — make migration easier and more reliable [db]
  • v1.5.0 — fancy chart! [web]

Maintainer(s)

License

(c) 2020 evilfactorylabs, under MIT License.

gow's People

Contributors

r17x avatar mhaidarhanif avatar beumsk avatar zakybilfagih avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.