DEV Community

Cover image for Url Shortener
Anshul Negi
Anshul Negi

Posted on

Url Shortener

Overview of My Submission

It's an imitation of Url Shortener Service.

Only functional requirements are considered while developing this project i.e to generate short url and redirect short url to original url.

In case url got expired/moved to other domain/not responsding, a 404 error page is shown.

Redis is used as primary as well as caching database here.

Some analytics and expression values(like,star,thumbs up etc...) are permanently stored in database while urls are short lived.
Home Page
404 Page
Analytics
Mobile Design

Submission Category:

MEAN/MERN Mavericks

Language Used:

NodeJs & React

Link to Code

Frontend:

Url Shortener Application

It's an imitation of Url Shortener Service.

Only functional requirements are considered while developing this project i.e to generate short url and redirect short url to original url.

In case url got expired/moved to other domain/not responsding, a 404 error page is shown.

Redis is used as primary as well as caching database here.

Some analytics and expression values(like,star,thumbs up etc...) are permanently stored in database while urls are short lived.

Application Architecture. Application-Architrecture

Desktop View. Img-1

404 Page. Img-2

Analytics. Img-4

Mobile View. Img-3

Overview video

Here's a short video that explains the project and how it uses Redis:

Url Shortener

How it works

How the data is stored:

  • Urls
    • It maps the long_url with short_url.
    • short_url is base62 value of counter and is indexed.
    • Expiration of 30 mins is set.
    • Data is stored as
class Url extends Entity { }
const urlSchema = new Schema(Url, {
    long_url: { type: 'string' }
    short_url:

Backend:

Url Shortener Application

It's an imitation of Url Shortener Service.

Only functional requirements are considered while developing this project i.e to generate short url and redirect short url to original url.

In case url got expired/moved to other domain/not responsding, a 404 error page is shown.

Redis is used as primary as well as caching database here.

Some analytics and expression values(like,star,thumbs up etc...) are permanently stored in database while urls are short lived.

Application Architecture. Application-Architrecture

Desktop View. Img-1

404 Page. Img-2

Analytics. Img-4

Mobile View. Img-3

Overview video

Here's a short video that explains the project and how it uses Redis:

Url Shortener

How it works

How the data is stored:

  • Urls
    • It maps the long_url with short_url.
    • short_url is base62 value of counter and is indexed.
    • Expiration of 30 mins is set.
    • Data is stored as
class Url extends Entity { }
const urlSchema = new Schema(Url, {
    long_url: { type: 'string' }
    short_url:

Top comments (0)