Simple Shorten URL using Redis and Auth0

Bervianto Leo Pratama - Aug 28 '22 - - Dev Community

Overview of My Submission

I've built Simple URL Shorten-er. It's pretty simple and uses a simple data structure. I use URL Shorten-er quite often and want to try building the simple one! I tried to extract the small requirement for the shortener and design the database structure. I implemented using .NET which is the programing language that is familiar to me. I was using RedisInsight and Redis Stack to help me during the development phase. It's awesome experience when building an app using Redis!

Submission Category:

Wack Wildcards

Video Explainer of My Project

Language Used

C#/ASP.NET Core

Link to Code

GitHub logo bervProject / shorten-url

Shorten URL App using Redis as Primary Databases

Simple Shorten URL using Redis and Auth0

Simple App for Shorten your URL and using Redis as the main databases.

Screenshots

  • Non Login - Home Page

non login - home page

  • Login - Home Page

login - home page

  • URL List - By Users

url list

  • Edit URL

edit

Overview video

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

short video

How it works

How the data is stored:

The data is stored as JSON values and only has a single structure.

  • Each JSON values have properties:

    • Id : Generated id, used for the key too.
    • ShortenUrl: The shorten URL, will be used to find the original URL. (Indexed)
    • OriginalUrl: The original URL, will be used to redirect the pages.
    • CreatedBy: To know the creator, will allow editing for entries that are created by authenticated users. (Indexed)
    • VisitedCounter: To know how many "clicks" or visited the shortened url.

The key is generated ShortenUrl.Models.Urls:{urlId}.

keys

Also generate index "FT.CREATE" "Urls"

Additional Resources / Info

Screenshots

  • Didn't Login - Anonymous User

Anon user

  • Authenticated User

Auth User

  • Authenticated User - URL List

URL List

  • Authenticated User - Edit link

Edit link

Collaborators

berviantoleo


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player