Explore Developer Center's New Chatbot! MongoDB AI Chatbot can be accessed at the top of your navigation to answer all your MongoDB questions.

MongoDB Developer
Python
plus
Sign in to follow topics
MongoDB Developer Centerchevron-right
Developer Topicschevron-right
Languageschevron-right
Pythonchevron-right

MergeURL - Python Example App

3 min read • Published May 24, 2022 • Updated Jul 07, 2022
FlaskAtlasPython
FULL APPLICATION
Facebook Icontwitter iconlinkedin icon
Rate this code example
star-empty
star-empty
star-empty
star-empty
star-empty
Try it

Creators

Mehant Kammakomati and Sai Vittal B contributed this project.

About the project

MergeURL is an instant URL shortening and merging service that lets you merge multiple URLs into a single short URL. You can merge up to 5 URLs within no time and share one single shortened URL. MergeURL lifts off the barriers of user registration and authentication, making it instant to use. It also provides two separate URLs to view the URLs' list and open all the browser URLs.
MergeURL is ranked #2 product of the day on ProductHunt. It is used by people across the world, with large numbers coming from the United States and India.

Inspiration

We had this problem of sharing multiple URLs in a message or an email or via Twitter. We wanted to create a trustworthy service that can merge all those URLs in a single short one. We tried finding out if there were already solutions to this problem, and most of the solutions we found, required an account creation or to put my credentials. We wanted to have something secure, trustworthy, but that doesn’t require user authentication. Sai Vittal worked mostly on the front end of the application, and I (Mehant) worked on the back end and the MongoDB database. It was a small problem that we encountered that led us to build MergeURL.
We added our product to ProductHunt last August, and we became number #2 for a while; this gave us the kickstart to reach a wider audience. We currently have around 181.000 users and around 252.000 page views. The number of users motivates us to work a lot on updates and add more security layers to it.

Why MongoDB?

For MergeURL, MongoDB plays a crucial role in our URL shortening and merging algorithm, contributing to higher security and reducing data redundancy. MongoDB Atlas lifts off the burden to host and maintain databases that made our initial development of MergeURL 10X faster, and further maintaining and monitoring has become relatively easy.
Firstly we discussed whether to go for a SQL or NoSQL database. According to the algorithms, our primary approach is that going with a NoSQL database would be the better option. MongoDB is at the top of the chart; it is the one that comes to mind when you think about NoSQL databases. Client libraries like PyMongo make it so much easier to connect and use MongoDB. We use MongoDB Atlas itself because it’s already hosted. It made it much easier for us to work with it. We’ve been using the credits that we received from the GitHub Student Developer Pack offer.

How it works

The frontend is written using React, and it’s compiled into the optimal static assets. As we know, the material is a relatively simple service; we don’t need a lot of complicated stuff in the back end. Therefore we used a microservice; we used Flask to write the backend server. And we use MongoDB. We have specific algorithms that work on the URLs, and MongoDB played a vital role in implementing those algorithms and taking control of the redundancy.
It works relatively smoothly. You go to our website; you fill out the URLs you want to shorten, and it will give you a short URL that includes all the URLs.

Challenges and lessons learned

One of the challenges lies in our experience. We both didn’t have any experience launching a product and getting it to users. Launching MergeURL was the first time we did this, and it went very well.
MongoDB specific, we didn’t have any problems. Specifically (Mehant), I struggled a lot with SQL databases in my freshman and sophomore years. I’m pleased that I found MongoDB; it saves a lot of stress and frustration. Everything is relatively easy. Besides that, the documents are quite flexible; it’s not restricted as with SQL. We can create many more challenges with MongoDB.
I’ve learned a lot about the process. Converting ideas into actual implementation was the most important thing. One can have many ideas, but turning them into life is essential.
At the moment, the project merges the URLs. We are thinking of maybe adding a premium plan where people can get user-specific extensions. We use a counter variable to give those IDs to the shortened URL, but we would like to implement adding user specific extensions.
And we would like to add analytics. How many users are clicking on your shortened URL? Where is the traffic coming from?
We are thrilled with the product as it is, but there are plenty of future ideas.

Facebook Icontwitter iconlinkedin icon
Rate this code example
star-empty
star-empty
star-empty
star-empty
star-empty
Related
Tutorial

Testing and Packaging a Python Library


Aug 14, 2024 | 8 min read
Tutorial

Building a Real-Time, Dynamic Seller Dashboard on MongoDB


Aug 05, 2024 | 7 min read
Tutorial

Written in the Stars: Predict Your Future With Tensorflow and MongoDB Charts


Aug 21, 2024 | 15 min read
Tutorial

Smart Filtering: A Guide to Generating Pre-filters for Semantic Search


Oct 02, 2024 | 20 min read
Technologies Used
Languages
Technologies
Products
Table of Contents
  • Inspiration