https://github.com/ajarmoszuk/krtk
krtk.ee is an easy-to-use url shortener written in go
https://github.com/ajarmoszuk/krtk
Last synced: 8 months ago
JSON representation
krtk.ee is an easy-to-use url shortener written in go
- Host: GitHub
- URL: https://github.com/ajarmoszuk/krtk
- Owner: ajarmoszuk
- License: wtfpl
- Created: 2025-03-04T04:10:26.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-02T15:41:37.000Z (11 months ago)
- Last Synced: 2025-04-02T16:33:16.595Z (11 months ago)
- Language: HTML
- Size: 43 KB
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-repositories - ajarmoszuk/krtk - krtk.ee is an easy-to-use url shortener written in go (HTML)
README
# krtk.ee - Simple URL Shortener
krtk.ee (/ˈkrut.kʲɛ/) or KROOT-kyeh was created because I didn't see any easy-to-use or easy-to-deploy URL shorteners, so I made my own.
[](https://github.com/ajarmoszuk/krtk/actions/workflows/go.yml)
## Live Demo
Try it out: [https://krtk.ee/](https://krtk.ee/)
## Features
- **Shorten URLs** – Quickly generate short links.
- **CAPTCHA Protection** – Prevents automated abuse.
- **SQLite Database** – Lightweight and easy to deploy.
- **Minimalist Web UI** – Simple and functional interface.
## Screenshot

## Installation
### Prerequisites
- Go (latest version recommended)
- SQLite3
### Setup
```
git clone https://github.com/ajarmoszuk/krtk.git
cd krtk
```
Build and run:
```
go get
go build -o krtk
./krtk
```
The server runs on port `:2137` by default. Open `http://localhost:2137/` in your browser.
## API Endpoints
### Shorten a URL
```
POST /shorten
```
**Request Body:**
```
{
"original": "https://example.com",
"captcha_id": "captcha_id",
"captcha": "captcha_text"
}
```
**Response:**
```
{
"short": "/go/abc12"
}
```
### Redirect to the Original URL
```
GET /go/{short}
```
### Generate a New CAPTCHA
```
GET /captcha
```
**Response:**
```
{
"captcha_id": "abc123"
}
```
### Retrieve a CAPTCHA Image
```
GET /captcha/{id}
```
**Response:** CAPTCHA image
## License
This project is open-source under the WTFPL License.