Link-converter - A web service that converts links between web url and deeplink for mobile and web applications

Overview

Deep Link Converter

Linkleri, mobil ve web uygulamaları için web url ile deeplink arasında dönüştüren bir web servistir.

Technologies

  • JDK 11
  • Java 11
  • Kotlin 1.4.32
  • Kotlinx Serialization 1.1.0
  • Spring Boot 2.4.5
  • Maven 3.6.3
  • Mysql 8.0
  • Docker Compose

Architecture

  • Hexagonal Architecture

Design Pattern

  • Strategy Design Pattern

Algorithm

  • Linkleri web url ile deeplink arasında dönüştürülme işlemi belirli kurallara bağlı şekilde yapılmaktadır. Bu kurallar bir şema haline getirilerek standart geliştirildi. Link, bu şemadaki hangi kural ile eşleşiyor ise dinamik olarak veriler ile değiştirilerek istenilen tipteki linke dönüştürülür. Şemada, “Path”, “Query” ve “Default” koşul tipleri ile sayısına, sıralamasına ve Regex patternına göre yeni kural tanımlaması yapılabilir.

Build and run project with Docker Compose

  • “app” ve “db” isminde iki service üzerine kurgulanmıştır. “app” servisi 8080 portundan, “db” servisi 3306 portundan çalışmaktadır. Bu portlar kullanılıyor ise uygun port ile “docker-compose.yml” ve “application.properties” dosyalarında değişiklik yapılması.

Build

  • Dependency indirilmesi ve projenin build edilmesi.
mvn clean install -DskipTests
  • Projenin docker image haline getirilmesi.
docker build --tag=link-converter:latest .

Run

  • Docker compose ile “app” ve “db” servislerinin çalıştırılması.
docker-compose up

Mysql Database Info

  • “link_conversion” veritabanı altında ve conversions tablosu oluşturulduğunun kontrol edilmesi.

DATASOURCE_URL: “127.0.0.1:3306”

MYSQL_DATABASE: “link_conversion”

MYSQL_USER: “med”

MYSQL_PASSWORD: “password”

TABLE_NAME: ”conversions”

Stop Service

  • Servislerin durdurulması ve kalıntıların temizlenmesi.
docker-compose down -v
  • Not: Mysql servisi çalışırken oluşturulan veritabanı ve tabloda değişiklik yapılır ise yeni değişikliğin geçerliliği için kalıntıların temizlenmesi önemlidir.

Web Url to Deeplink Endpoint

Request Type: GET

Request Url: http://127.0.0.1:8080/link/convert/webURL/to/deeplink

Request Param: webUrl: String

Request Sample: http://127.0.0.1:8080/link/convert/webURL/to/deeplink?webUrl=https://www.med.com/koton/kadin-gomlek-p-1925869

Deeplink to Web Url Endpoint

Request Type: GET

Request Url: http://127.0.0.1:8080/link/convert/deeplink/to/webURL

Request Param: deeplink: String

Request Sample: http://127.0.0.1:8080/link/convert/deeplink/to/webURL?deeplink=ty://?Page=Search%26Query=ütü

Run Unit Tests With Docker Compose

  • Database bağlantısı gereksinimi olduğundan servisler çalışır durumdayken test edilmesi gerekmektedir.

  • Teminal komutu ile test edilmesi

mvn test
  • Doğrudan IntelliJ IDEA üzerinden de testler çalıştırılabilir.

Run Unit Tests Without Docker Compose

  • Diğer bir yöntem olarak var olan bir Mysql server bilgilerini “application.properties” dosyasında değiştirerek yapılabilir.
mvn test

Teşekkürler :)

You might also like...
🚀Optimizer for mobile applications
🚀Optimizer for mobile applications

Overview | 概览 Booster is an easy-to-use, lightweight, powerful and extensible quality optimization toolkit designed specially for mobile applications.

NewsAppKt is an Android app designed for searching news using TheGuardianOpenPlatform public web service.
NewsAppKt is an Android app designed for searching news using TheGuardianOpenPlatform public web service.

NewsAppKt is an updated version of NewsApp. It is written entirely in Kotlin and uses MVVM with Clean Architecture practices. The UI implementation uses Jetpack Compose.

Kotlin Multiplatform Mobile + Mobile Declarative UI Framework (Jetpack Compose and SwiftUI)

Kotlin Multiplatform Mobile + Mobile Declarative UI Framework (Jetpack Compose and SwiftUI)

Crunch-Mobile - A Food Delivery Mobile App which uses Modern App Architecture Pattern, Firebase And a Simple Restful Api
Crunch-Mobile - A Food Delivery Mobile App which uses Modern App Architecture Pattern, Firebase And a Simple Restful Api

Crunch-Mobile This is a Food Delivery Mobile App which uses Modern App Architect

KMM RSS Reader: an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile.
KMM RSS Reader: an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile.

KMM RSS Reader This is an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile. It's a simple RSS reader, and you ca

Runtime Mobile Security (RMS) 📱🔥  - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime
Runtime Mobile Security (RMS) 📱🔥 - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime

Runtime Mobile Security (RMS) 📱 🔥 by @mobilesecurity_ Runtime Mobile Security (RMS), powered by FRIDA, is a powerful web interface that helps you to

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Codename One - Cross Platform Native Apps with Java or Kotlin Codename One is a mobile first cross platform environment for Java and Kotlin developers

Demonstrating Micronaut 3.1.3 conflict between caches in application.yml and MicronautCaffeineCacheMetrics.monitor

This application illustrates an issue with using a caches section in application.yml in conjunction with MicronautCaffeineCacheMetrics.monitor. The co

A simple project that describes the relationship between the view and it's viewmodel in android development
A simple project that describes the relationship between the view and it's viewmodel in android development

View-ViewModel-Communication A simple project that describes the relationship between the view and it's viewmodel in android development In MVVM archi

Owner
Muhammed Eren DURSUN
--- Software Developer --- Kotlin | Java
Muhammed Eren DURSUN
Speech-Text Converter is a simple task that enable the user to convert the speech to text or convert text to speech (by Mic)

Speech-Text Converter About Speech-Text Converter is a simple task that enable the user to convert the speech to text or convert text to speech (by Mi

Kareem Saeed 1 Oct 21, 2021
An example of a test task for creating a simple currency converter application for the Android platform. The app is developed using Kotlin, MVI, Dagger Hilt, Retrofit, Jetpack Compose.

Simple Currency Converter Simple Currency Converter Android App by Isaev Semyon An example of a test task for creating a simple currency converter app

Semyon Isaev 1 Nov 8, 2021
Crypto-candlestick-service - Crypto candlestick service Coding Challenge

Coding Challenge Your task is to build a system that enables users to view price

Moses Thomas 0 Feb 6, 2022
Location Service Manager for Kotlin Multiplatform Mobile iOS and android

Location Service Manager for Kotlin Multiplatform Mobile iOS and android Features Provides simple permission settings Dramatically reduce the amount o

LINE 55 Dec 10, 2022
A lightweight and simple Kotlin library for deep link handling on Android 🔗.

A lightweight and simple Kotlin library for deep link handling on Android ??.

Jeziel Lago 101 Aug 14, 2022
🤝 Link your Fabric server and Discord with ease!

Fabric2Discord Link your Fabric server and Discord with ease! ?? Getting Started I wrote few helpful articles about this mod, so if you need help you

Igor Ryzhenkov 10 Oct 25, 2022
Backing property explained - youtube video link in documnetation

backing property => Kotlin => Getter Setter and Backing Property Screenshot Inside android studio open a file press Alt+Shift+A and search for kotlin

Vishnu Sunilkumar 0 Nov 3, 2021
base url not included, rxJava, Retrofit

NewsFeed NewsFeed is an android sample application built using kotlin, androidx artifacts, kotlin-extensions in MVP pattern. Libraries Used Dagger 2 D

Sagar Raval 0 Dec 29, 2021
base url not included, rxJava, Retrofit

NewsFeed NewsFeed is an android sample application built using kotlin, androidx artifacts, kotlin-extensions in MVP pattern. Libraries Used Dagger 2 D

Sagar Raval 0 Dec 29, 2021
Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Chris Russell 1 Feb 11, 2022