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
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
- Login - Home Page
- URL List - By Users
- Edit URL
Overview video
Here's a short video that explains the project and how it uses Redis:
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}
.
Also generate index "FT.CREATE" "Urls"
…
Additional Resources / Info
Screenshots
- Didn't Login - Anonymous User
- Authenticated User
- Authenticated User - URL List
- Authenticated User - Edit link
Collaborators
- Check out Redis OM, client libraries for working with Redis as a multi-model database.
- Use RedisInsight to visualize your data in Redis.
- Sign up for a free Redis database.
Top comments (0)