{"id":16136869,"url":"https://github.com/jarne/toohga","last_synced_at":"2026-01-24T18:02:23.369Z","repository":{"id":139796341,"uuid":"179957187","full_name":"jarne/Toohga","owner":"jarne","description":"🗄 The smart URL shortener","archived":false,"fork":false,"pushed_at":"2026-01-19T18:58:13.000Z","size":21747,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-20T00:54:05.350Z","etag":null,"topics":["algorithm","javascript","php","shortener","url","url-shortener","vue"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jarne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-07T11:36:23.000Z","updated_at":"2026-01-17T04:56:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"1db50453-328b-4e58-8a8a-8a7610c377fb","html_url":"https://github.com/jarne/Toohga","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jarne/Toohga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FToohga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FToohga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FToohga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FToohga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarne","download_url":"https://codeload.github.com/jarne/Toohga/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FToohga/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28733311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T17:51:25.893Z","status":"ssl_error","status_checked_at":"2026-01-24T17:50:48.377Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","javascript","php","shortener","url","url-shortener","vue"],"created_at":"2024-10-09T23:24:33.744Z","updated_at":"2026-01-24T18:02:23.346Z","avatar_url":"https://github.com/jarne.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/.media/logo.png\" width=\"120\" height=\"120\" alt=\"Toohga app logo\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eToohga\u003c/h1\u003e\n\u003cp align=\"center\"\u003eThe smart URL shortener\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/users/jarne/packages/container/package/toohga\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/tag/jarne/Toohga?label=release\" alt=\"Release version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://circleci.com/gh/jarne/Toohga\"\u003e\n        \u003cimg src=\"https://circleci.com/gh/jarne/Toohga.svg?style=shield\" alt=\"Build status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/jarne/Toohga/blob/master/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/jarne/Toohga.svg\" alt=\"License\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## 📙 Description\n\nToohga is your smart private URL shortener with very short URL's.\nIt uses a custom algorithm to generate short codes that stay as short as possible, using combinations of numbers and letters.\nThe application can be operated both open to the public or secured by PIN codes required to create new URL's.\nAn admin panel provides features to perform administrative tasks, such as managing users and listing or deleting URL's.\n\n### Screenshots\n\n\u003cimg src=\".github/.media/screenshot_web.png\" alt=\"Screenshot of Toogha web app\"\u003e\n\n\u003cimg src=\".github/.media/screenshot_admin.png\" alt=\"Screenshot of Toogha admin interface\"\u003e\n\n## 🖥 Usage\n\n### Docker Compose\n\nThe recommended way to deploy Toohga is using Docker. There is a ready-to-use\nexample [Docker Compose file](./docker-compose.yml) available in this repository.\n\nWith [Docker installed](https://docs.docker.com/engine/install/), you can use the following\ncommands to clone the repository and run Toohga using Docker Compose.\n\nFirst, clone the repository.\n\n```sh\ngit clone https://github.com/jarne/Toohga.git\ncd Toohga\n```\n\nThen copy the `.env` file template for Docker and replace the secret values in this file.\n\n```sh\ncp .env.docker.example .env\n```\n\nStart the services using Docker Compose.\n\n```sh\nsudo docker compose up\n```\n\n### Manual deployment\n\nThe application needs a modern version of PHP, a MySQL database and a Redis server.\n\nAlternative deployment methos are to use the [Docker](./Dockerfile) image or deploy the\nPHP application on a web server such as Apache HTTP (see the following [config file](./000-default.conf) for this).\n\nWhen deploying without the Docker file, keep in mind to install required dependencies using Composer\nand Yarn:\n\n```\ncomposer install\n\ncd client\nyarn install\nyarn run build\n```\n\n### Environment variables\n\nThe following environment variables need to be set:\n\n| Env variable     | Description                                                  |\n| ---------------- | ------------------------------------------------------------ |\n| `MYSQL_HOST`     | Hostname of MySQL server                                     |\n| `MYSQL_USER`     | Database user                                                |\n| `MYSQL_PASSWORD` | Password of the database user                                |\n| `MYSQL_DATABASE` | Name of the MySQL database                                   |\n| `REDIS_HOST`     | Hostname of the Redis server                                 |\n| `ADMIN_KEY`      | Secure secret for accessing the admin panel                  |\n| `JWT_SECRET`     | Randomly generated secret for encrypting admin access tokens |\n\nAdditionally, the following _optional_ environment variables can be set:\n\n| Env variable             | Description                                                                                     |\n| ------------------------ | ----------------------------------------------------------------------------------------------- |\n| `TGA_AUTH_REQUIRED`      | Requires a user authentication PIN when creating URL's (set to true/false, default to false)    |\n| `DELETE_AFTER_DAYS`      | Delete URL's after x days (default is 14 days)                                                  |\n| `TGA_CONTACT_EMAIL`      | Display a contact e-mail address on the front page                                              |\n| `TGA_THEME`              | Visual color theme of the application (possible values are: `pink`, `orange`, `blue` (default)) |\n| `TGA_PRIVACY_URL`        | Display a link to an external privacy page on the front page                                    |\n| `TGA_ANALYTICS_SCRIPT`   | Embed HTML code for an analytics script                                                         |\n| `TGA_API_ENDPOINT`       | Specify general API endpoint for front-end to use                                               |\n| `TGA_ADMIN_API_ENDPOINT` | Specify admin API endpoint for front-end                                                        |\n\n\u003e All environment variables beginning with `TGA_` are exposed to the front-end and therefore are publically accessible. They should not contain sensitive information!\n\n## ⌨️ Development\n\nToohga is based on a back-end and front-end part.\n\n### Back-end\n\nThe back-end inside the main folder is developed in PHP and uses the Slim framework. It stores its data in a MySQL\ndatabase and uses a Redis server for caching. Dependencies are managed using Composer.\n\nA basic server for development can be launched as PHP web server inside the `public` folder,\nwith the `index.php` file as a router script (e.g. using `php -S 0.0.0.0:8080 -t . index.php`).\n\nUnit tests inside the [tests](./tests) folder are based on the PHPUnit framework.\nThe following checks should be run before commiting code:\n\n```sh\ncomposer run test\ncomposer run code-analyze\ncomposer run check-format\ncomposer run fix-format\n```\n\n### Front-end\n\nThe front-end inside the `client` folder is written in JavaScript and is based on Vue.js, Vite and Bootstrap for styles.\n\nRun development server: `yarn run dev`  \nCreate build: `yarn run build`  \nFormat code style: `yarn run format`\n\n## 🙋‍ Contribution\n\nContributions are always very welcome! It's completely equal if you're a beginner or a more experienced developer.\n\nThanks for your interest 🎉👍!\n\n## 👨‍⚖️ License\n\n[MIT](https://github.com/jarne/Toohga/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarne%2Ftoohga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarne%2Ftoohga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarne%2Ftoohga/lists"}