Blink logo

Blink

  •  0 ratings
In category: URL Shorteners

About Blink

Easy-to-host, SSO-integrated, CDN-powered link shortener (+decoupled analytics) for teams.

  •   501  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: 1,403  
  •   153  
  •   15  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about Blink

Welcome to Blink 👋

CircleCI Prettier code style Deploy to Heroku

Modern, lightweight, planet-scale link shortener for teams 🎉

Easy to setup, connect with your org's SSO, hook up analytics, and extend!

See the documentation for more information about the project itself (including screenshots)

Development

Prerequisites

You need the following components to develop and run Blink locally:

  • mkcert
  • docker & docker-compose (note that on Linux, docker & docker-compose are two separate deps)
  • an x86-based machine (unfortunately, Keycloak - even in its latest version - does not work with ARM-based devices)

Before you start

  1. Run make cert to generate the SSL certs required for HTTPS local development

  2. Run make up to stand up the containers

And once you're done with development, you can run make down to shut down and cleanup all the containers that spun up.

NOTE: that you actually do not have to run the cleanup every time you npm start; you can shut down the npm start server/frontend combo and re-boot it as many times as you'd like without needing to make up every time - the migrations and the build process will run fine even with existing data(!)

Starting Blink

Run make dev to stand up the development environment (i.e. it will run the actual container in which Blink will be run in "dev mode", which is fancy term for NODE_ENV=development). Then, run npm start to run Blink, which consists of a backend express server and a frontend react "live-loader". You can access the app at https://localhost/app! Both the frontend and the backend will live-reload as you make changes. You can login as the user specified at the end of config/keycloak.json (username: user, password: Password1).

Behind the scenes, the frontend (a create-react-app app) is running at http://localhost:4000/app and is being reverse proxied from https://localhost/app, and everything else in https://localhost gets proxied to the backend at http://localhost:3000. Yes, there are two processes running in the container pretending to be one "site", but this kind of routing (thanks Traefik!) allows us to not have horrible routing issues (stemming from the fact that even though they're both http://localhost, the different port means they're effectively two different sites and leads to a whole host of routing, CORS, and other integration issues), and allows testing of features that are only available for HTTPS in order to simulate real-world usage as much as possible.

Troubleshooting

If you can't reach any service or if you suspect the routing is messed up, first check https://traefik.localhost to make sure that everything is configured correctly.

Note that for performance/security reasons, the app container is built end-to-end with alpine-based images, so you won't have access to anything fancy like, say, bash.

Run tests

make test COMMAND='npm test'

# or, for interactive testing:
make test
$ npm run test:watch

Deployment with Docker Compose

Under the /Deploy/Docker-Compose/ directory in this repo is a base docker-compose.yml and .env files that you can use to deploy this with no building necessary. Just ensure the database details are entered correctly (strongly advise using a different password for the database than is currently specified) and that you've added relevent OIDC/OAUTH/SESSION config to the .env file and you should be good to go.

Simply download both files, and run:

docker compose up -d

Author

👤 Jane Jeon

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Jane Jeon.
This project is AGPL-3.0 licensed.

TL;DR: you are free to use this application "as-is" in your code or on its own, without needing to make your code source-available or to license it under the same license as this application; however, if you do change this application and you distribute it (which includes using it to provide a public service over the network), please do contribute back any improvements for this application.


This project is based off of Express-Objection-Template, and heavily uses objection-authorize and objection-hashid to drive much of "hidden" logic and make isomorphism possible.

Comments (0)

Please login to join the discussion on this project.

Blink Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

Dashboard

in Personal Dashboards
 6k    0    0    0  

Audiobookshelf

in Audio Streaming
 6k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

ReducePy logo
ReducePy cover

ReducePy

URL shortener service using Tornado and Redis runs on Docke…

liteshort logo
liteshort cover

liteshort

User-friendly, actually lightweight, and configurable URL s…

goshorly logo
goshorly cover

goshorly

An easy self-hosted Link shortener in Golang with Redis <3.