izachok / UrlShortenerTask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UrlShortener

This application allows user to create short links. It stores links in the in-memory DB. It initializes with some values during application start.

How to start?

Just build and run application

Key assumptions

Because there is no detail requirements for logging I used standart logging for requests.

Future Ideas

If there is enough time:

  • It's possible to add some 3rd-party logger to log information to file or other place. Customize requests logs
  • Add more tests, test controller
  • Validation improvement
  • Collect information about link creation time, clicks on link.

Task Description

Build a URL shortening service like TinyURL. This service will provide short aliases redirecting to long URLs.

Why do we use Url shortening?

URL shortening is used to create shorter aliases for long URLs. We call these shortened aliases “short links.” Users are redirected to the original URL when they hit these short links. Short links save a lot of space when displayed, printed, messaged, or tweeted. Additionally, users are less likely to mistype shorter URLs.

For example, if we shorten the following URL: https://www.some-website.io/realy/long-url-with-some-random-string/m2ygV4E81AR

We would get something like this: https://short.url/xer23

URL shortening is used to optimize links across devices, track individual links to analyze audience, measure ad campaigns’ performance, or hide affiliated original URLs.

URL shortening application should have:

  • A page where a new URL can be entered and a shortened link is generated. You can use Home page.
  • A page that will show a list of all the shortened URL’s.

Functional Requirements:

  • Given a URL, our service should generate a shorter and unique alias of it. This is called a short link. This link should be short enough to be easily copied and pasted into applications.
  • When users access a short link, our service should redirect them to the original link.
  • Application should store logs information about requests.

Non-Functional Requirements:

  • URL redirection should happen in real-time with minimal latency.
  • Please add small project description to Readme.md file.

During implementation please pay attention to:

  • Application is runnable out of box. If some setup is needed please provide details on ReadMe file.
  • Project structure and code smells.
  • Design Principles and application testability.
  • Main focus should be on backend functionality, not UI.
  • Input parameter validation.
  • Please, don't use any library or service that implements the core functionality of this test.

Other recommendation:

  • You may change UI technology to any other you are most familiar with.
  • You can use InMemory data storage.
  • You can use the Internet.

May the force be with you {username}!

About


Languages

Language:C# 67.5%Language:HTML 25.5%Language:CSS 5.8%Language:JavaScript 1.2%