Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jarne/toohga

🗄 The smart URL shortener
https://github.com/jarne/toohga

algorithm short shortener simple url

Last synced: 15 days ago
JSON representation

🗄 The smart URL shortener

Awesome Lists containing this project

README

        


Toohga app logo

Toohga


The smart URL shortener




Release version


Build status


License

##

[Description](#-description) | [Usage](#-usage) | [Contribution](#-contribution) | [License](#%EF%B8%8F-license)

## 📙 Description

Toohga is your smart private URL shortener with very short URL's.
It uses a custom algorithm to generate short codes that stay as short as possible, using combinations of numbers and letters.
The application can be operated both open to the public or secured by PIN codes required to create new URL's.
An admin panel provides features to perform administrative tasks, such as managing users and listing or deleting URL's.

### Screenshots

Screenshot of Toogha web app

Screenshot of Toogha admin interface

## 🖥 Usage

### Setup & requirements

The application needs a modern version of PHP, a MySQL database and a Redis server.

The following environment variables need to be set:

| Env variable | Description |
| ---------------- | ------------------------------------------------------------ |
| `MYSQL_HOST` | Hostname of MySQL server |
| `MYSQL_USER` | Database user |
| `MYSQL_PASSWORD` | Password of the database user |
| `MYSQL_DATABASE` | Name of the MySQL database |
| `REDIS_HOST` | Hostname of the Redis server |
| `ADMIN_KEY` | Secure secret for accessing the admin panel |
| `JWT_SECRET` | Randomly generated secret for encrypting admin access tokens |

Additionally, the following _optional_ environment variables can be set:

| Env variable | Description |
| ------------------------ | ----------------------------------------------------------------------------------------------- |
| `TGA_AUTH_REQUIRED` | Requires a user authentication PIN when creating URL's (set to true/false, default to false) |
| `DELETE_AFTER_DAYS` | Delete URL's after x days (default is 14 days) |
| `TGA_CONTACT_EMAIL` | Display a contact e-mail address on the front page |
| `TGA_THEME` | Visual color theme of the application (possible values are: `pink`, `orange`, `blue` (default)) |
| `TGA_PRIVACY_URL` | Display a link to an external privacy page on the front page |
| `TGA_ANALYTICS_SCRIPT` | Embed HTML code for an analytics script |
| `TGA_API_ENDPOINT` | Specify general API endpoint for front-end to use |
| `TGA_ADMIN_API_ENDPOINT` | Specify admin API endpoint for front-end |

> All environment variables beginning with `TGA_` are exposed to the front-end and therefore are publically accessible. They should not contain sensitive information!

### Docker image

The recommended way to deploy Toohga is using its [Docker](./Dockerfile) image.

The image can be pulled from the
[GitHub Packages registry](https://github.com/users/jarne/packages/container/package/toohga)
using: `docker pull ghcr.io/jarne/toohga:latest`.

## 🙋‍ Contribution

Contributions are always very welcome! It's completely equal if you're a beginner or a more experienced developer.

Thanks for your interest 🎉👍!

## 👨‍⚖️ License

[MIT](https://github.com/jarne/Toohga/blob/master/LICENSE)