This is a Ktor project to build your own Url shortener

Overview

Ktor URL Shortner

Twitter

This project is a implementation for creating Short URL using Ktor + Kotlin + MongoDB

alt text

Usage

It contains two routes if you want to implement it in Client side.

POST - /v1/url

This takes the request,


{
    "url":"your_long_url"
}

GET - /{url}

This will take the short URL as path param and will redirect you to the main original URL

Frontend

It also has a frontend module built using kotlin.html and you can find it in frontendRouting

Points

  • By passing a valid URL we can create a short URL of 6 alpha-numerics.
  • If validates the URL before creating the short URL
  • If the provided URL is present in the Database, it will return back the initial Short URL created in place of creating a new one.
  • When the GET short URL is called, we also update the hit count to that short URL.

How to run the project?

  • Clone the project.
  • Make sure MongoDB is installed.
  • Start the MongoDB
  • Play around with the project.

To read more about it

You might also like...
Project build to understand the concepts of Git and GitHub

Project build to understand the concepts of Git and GitHub. Summarizing the concepts learnt. Created a project in Android Studio Before installing And

A starter project to build command-line tools in Kotlin Multiplatform
A starter project to build command-line tools in Kotlin Multiplatform

A starter project to build command-line tools in Kotlin Multiplatform Contains a re-implementation of a real world CLI tool: git-standup Installation

A project to show the best way to build an Android app on 2022 (by me).
A project to show the best way to build an Android app on 2022 (by me).

Hello Architecture I create this project to show what's for me the best way to build an Android app on 2022. Architecture I use this diagram as and id

It is a repository containing backend structure for Ktor.
It is a repository containing backend structure for Ktor.

Backend Architecture with Ktor + KMongo This project contains, Authentication using Jwt Database Layer (KMongo - Orm for MongoDB) Routing Advanced Rou

Kotlin backend based on the Clean Architecture principles. Ktor, JWT, Exposed, Flyway, KGraphQL/GraphQL generated endpoints, Gradle.
Kotlin backend based on the Clean Architecture principles. Ktor, JWT, Exposed, Flyway, KGraphQL/GraphQL generated endpoints, Gradle.

Kotlin Clean Architecture Backend Kotlin backend based on the Clean Architecture principles. The application is separated into three modules: Domain,

Ktor OpenAPI Spec Generator

Kompendium What is Kompendium Kompendium is intended to be a minimally invasive OpenApi Specification generator for Ktor. Minimally invasive meaning t

sharex image uploader using ktor

ktor-sharex-uploader uploader zdjec napisany w kotlinie przy uzyciu ktor pobierak gotowa jarka jest do pobrania tutaj config apki konfiguracje apki ma

SSU u-saint parser with Kotlin-Multiplatform and Ktor.

kusaint Soongsil University(SSU) u-Saint Parser with Kotlin Multiplatform. Prerequisites JVM !!IMPORTANT!! To run kusaint as a library in JVM environm

Owner
Himanshu Singh
Android Engineer @roomiapp and Google Developer Expert for Android
Himanshu Singh
Integration Testing Kotlin Multiplatform Kata for Kotlin Developers. The main goal is to practice integration testing using Ktor and Ktor Client Mock

This kata is a Kotlin multiplatform version of the kata KataTODOApiClientKotlin of Karumi. We are here to practice integration testing using HTTP stub

Jorge Sánchez Fernández 29 Oct 3, 2022
KTor-Client---Android - The essence of KTor Client for network calls

KTor Client - Android This project encompasses the essence of KTor Client for ne

Mansoor Nisar 2 Jan 18, 2022
My own approach to what I think an Android MVVM project with Clean Architecture should look like with Dagger-Hilt as Dependency Injector engine

MVVM Project Hilt Introducción Este proyecto es mi visión particular, ni mejor ni peor (sólo una más) que cualquier otra aproximación a lo que yo enti

Antonio Fdez. Alabarce 7 Dec 16, 2022
sample project that shows you how you can use Ktor to creat a server for real Project.

Ktor-Sample This is a sample project that shows you how you can use Ktor to creat a server for real Project. What is done Save data to database (Get a

Mohamed Emad 4 Dec 23, 2022
A forkable starter for building your own recipes and deploying them on the Moderne SaaS

Rewrite recipe starter This repository serves as a template for building your own recipe JARs and publishing them to a repository where they can be ap

Moderne, Inc. 6 Oct 7, 2022
Launch Spring projects by github url

Ktor application made for quickly demonstrating Spring projects on our Java lessons. Spring launcher: Starts a fresh Postgres container Builds the pro

Vladislav 10 Jun 3, 2022
Accessibility-Service - Filter url from browser by using accessibility service

Accessibility Service example Filter url from browser by using accessibility ser

AmirMohammad Yazdanmanesh 8 Nov 29, 2022
An Android template you can use to build your project with gradle kotlin dsl

Android Gradle KTS An Android template you can use to build your project with gradle kotlin dsl Build.gradle.kts You can use your project's build.grad

Deep 17 Sep 12, 2022
Allowing server admins to backdoor their own server!

DiscordBackdoorBot Allowing server admins to backdoor their own server! What does Discord Backdoor Bot do? Discord Backdoor bot allows the bot owner t

Awesomemoder316 1 Jun 8, 2022
SkyFlight - Let players fly with their own flight energy

Building Gradle - Dependency Management The GradleWrapper in included in this pr

你今天没跑图 0 Jan 17, 2022