This repo contains the source code for our Kutt instance on rtapp.tk, based on Kutt.it source code by friends at The Devs Network.
While our Kutt instance is used internally for our social posts and placing links with spoilers under an link shortener in Recap Time newsletter issues, you can register for an account and create links.
- Instance Information
- Key Features
- Stack
- Setup
- Browser Extensions
- API
- Integrations
- 3rd Party Packages
- Donate
- Contributing
- Instance domains: https://dev.rtapp.tk (dev branch), https://rtapp.tk (stable)
- Hosting Provider and type: Railway - PaaS (Dockerized containers)
- Plan: Free (managed on our shared account, soon to be moved to paid team)
- DNS and CDN provider: Cloudflare, as usual
- Contact email: [email protected]
- Abuse Team contacts: [email protected] and https://reportabuse.rtapp.tk (soon)
- Adminstration contacts:
- ToS: https://legal.madebythepins.tk/link-shortener/tos/legalese
- Privacy info:
- Full text: https://legal.madebythepins.tk/404.html (TK)
- Third-party services we use in website:
- Google APIs: Safe Browsing API
- hCaptcha (will implemented soon)
- Free and open source.
- Custom domain support.
- Custom URLs for shortened links
- Set password for links.
- Set description for links.
- Expiration time for links.
- Private statistics for shortened URLs.
- View, edit, delete and manage your links.
- Admin account to view, delete and ban links.
- Ability to disable registration and anonymous link creation for private use.
- RESTful API.
- Node (Web server)
- Express (Web server framework)
- Passport (Authentication)
- React (UI library)
- Next (Universal/server-side rendered React)
- Easy Peasy (State management)
- styled-components (CSS styling solution library)
- Recharts (Chart library)
- PostgreSQL (database)
- Redis (Cache layer)
- Docker (containerization for deploying to Railway, and formerly on Divio)
You need to have Node.js, PostgreSQL and Redis installed.
- Clone this repository with
git clone git://github.com/MadeByThePinsHub/rtappdotio
. - Copy
.example.env
to.env
and fill it properly (see below). - Install dependencies:
npm install
. - To run in dev mode, run
./start-rtappdotio dev
ornpm run dev
Otherwise, run./start-rtappdotio prod
ornpm start
- Postgres database migrations aren't included when using
npm start
ornpm run dev
, so please use thestart-rtappdotio
script or donpm run migrate
first
Download the docker-compose.yml
and the .docker.env
file from the repository, duplicate it as .env
and configure the .docker.env
(see below).
To execute Kutt you simply have to run docker-compose up -d
command and then the app should be ready on port "3000".
The docker-compose.yml
configuration uses our own Kutt image available on GitHub Container Registry, with mirrors on Red Hat Quay Registry and Docker Hub
- Pull the Docker image first into your machine. Use the same command if you need to update.
# latest tag is same as develop, so please use the stable tag instead
# if Docker Hub is down or want to use other registries, prefix
# either quay.io/ or ghcr.io/ to the image name.
docker pull MadeByThePinsHub/rtappdotio:latest
- Then repeat step 2 in manual setup for configuring the instance.
- And then, run
npm run docker:prod
(uses the remote image withstable
tag from GHCR) ornpm run docker:dev
(uses thedevelop
. - If you prefer to build the image, do
npm run docker:build
thennpm run docker:start
(production mode will br used by default)
TODO
For the minimal configuration the following settings have to be changed in the .env
-file:
- DEFAULT_DOMAIN: The domain of your rtappdotio instance
- DB_: The DB credentials (when you use docker-compose you can skip these)
- ADMIN_EMAILS: A comma-separated list of the administrator-accounts
- RECAPTCHA_: Get your reCaptcha v3 API keys or delete this setting if you don't want to use it. We're working on adding hCaptcha soon.
- MAIL_: Enter the SMTP server's credentials (The experience shows SSL works better than STARTTLS; The mail config is required to easily verify new accounts and change email address in the UI, see this comment in the upstream how it can be done manually)
- REPORT_EMAIL: Kutt offers a form to report malicious links which are sent to this mail-address
To change the embedded form on the report page, edit lines TODO in client/.tsx
, and replace it with the following templates, replacing FORM-URL
into your form's URL.
- Google Forms
// WIP
- Yandex.Forms
// WIP
Download the official Kutt extension for web browsers via below links. You can also find the source code on kutt-extension.
After installing the extension, you need to point into our instance at either rtapp.tk
(rtapp.io
soon) for the production branch (stable
) or dev.rtapp.tk
(dev.rtapp.io
soon) for the development branch (develop
)
Visit API v2 documentation here.
You can use Kutt as your default URL shortener in ShareX. If you host your custom instance of Kutt, refer to ShareX documentation in the upstream project on how to setup.
Download Kutt's official workflow for Alfred app from alfred-kutt repository.
Language | Link | Description |
---|---|---|
C# (.NET) | KuttSharp | .NET package for Kutt.it url shortener |
Python | kutt-cli | Command-line client for Kutt written in Python |
Ruby | kutt.rb | Kutt library written in Ruby |
Rust | urlshortener | URL shortener library written in Rust |
Rust | kutt-rs | Command line tool written in Rust |
Node.js | node-kutt | Node.js client for Kutt.it url shortener |
JavaScript | kutt-vscode | Visual Studio Code extention for Kutt |
Java | kutt-desktop | A Cross platform Java desktop application for Kutt |
Go | kutt-go | Go client for Kutt.it url shortener |
BASH | GitHub Gist | Simple BASH function to access the API |
BASH | url-shortener | Simple BASH script with GUI |
Support us to help us maintain projects like these and keep developers motivated and happy.
An portion of donations we receive from one-time and recurring support from you will be used to keep the upstream project's instance online and support The Devs Network's team members in general, as an way of giving back to open-source projects we use and love.
If you prefer to donate directly, their BTC wallet is 1P89WxNTinKxxDQ4FmC4jis3KUdfA9fLJB
`
Pull requests are welcome. You'll probably find lots of improvements to be made.
Open issues for feedback, requesting features, reporting bugs or discussing ideas
Any issues or PRs related to the main instance (<kutt.it>) or the upstream will be closed and asked to submit there.
Special thanks to Pouria, Thomas and Muthu for maintaining Kutt.