Skip to content

recaptime-dev/rtappdotio

Repository files navigation

Source code for rtapp-link-shortener service (rtapp.tk/rtapp.io)

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.

Contributions GitHub license

Table of Contents

Instance Information

Key Features

  • 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.

Stack

  • 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)

Setup

Manual

You need to have Node.js, PostgreSQL and Redis installed.

  1. Clone this repository with git clone git://github.com/MadeByThePinsHub/rtappdotio.
  2. Copy .example.env to .env and fill it properly (see below).
  3. Install dependencies: npm install.
  4. To run in dev mode, run ./start-rtappdotio dev or npm run dev Otherwise, run ./start-rtappdotio prod or npm start
  • Postgres database migrations aren't included when using npm start or npm run dev, so please use the start-rtappdotio script or do npm run migrate first

Docker

With Compose

Download the docker-compose.yml and the .docker.envfile 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

With vanila Docker

  • 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 with stable tag from GHCR) or npm run docker:dev (uses the develop.
  • If you prefer to build the image, do npm run docker:build then npm run docker:start (production mode will br used by default)

With Railway

TODO

Configuration

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

Advanced Configuration

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

Browser Extensions

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)

API

Visit API v2 documentation here.

Integrations

ShareX

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.

Alfred Workflow

Download Kutt's official workflow for Alfred app from alfred-kutt repository.

3rd Party packages

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

Donate/Support

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 `

Contributing

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.

About

Source code for the Kutt instance at rtapp.tk, in-sync with the upstream.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published