DEV Community

Cover image for Project YALA - MongoDB Atlas Hackathon 2022 on DEV submission
Kamil
Kamil

Posted on

Project YALA - MongoDB Atlas Hackathon 2022 on DEV submission

What I built

I built Project YALA (or simply YALA) which is "Yet Another Link-shortener App".

Category Submission:

Think Outside the JS Box - as it is not-the-JS-stack but still nothing wacky to put in other category ;-)

App Link

https://project-yala.fly.dev/

App is run in preview mode - no add/delete options provided.

Example links with data (some short link which redirects to dev.to):

Screenshots

Index page

Link info page

Link visits page

Description

YALA is a simple link shortener that works without logging in - instead it creates "secret key" which allows to view details of created short link and it's statistics.

Generally it is simple app to show that we do not need fancy frameworks to make nice looking, fully working application.

Link to Source Code

https://github.com/elwin013/project-yala

Permissive License

MIT, https://github.com/elwin013/project-yala/blob/master/LICENSE.md

Background

I always wanted to create simple link shortener, just for fun. :-) Additionally this was good moment to look into new Timeseries features from MongoDB.

Instead of using commonly used frameworks (like Spring Framework) I preffered to use something that is small and doesn't have "magic" in it. So I've chosen Javalin as a simple web framework, added MongoDB client libraries nad jte as template engine. To show that simple and clean looking apps doesn't need any big JS libraries I've selected chota - one of micro CSS frameworks.

How I built it

On the app side I've used:

On the MongoDB side I've used just two collections - one with data about links and the second one with visits. For the latter I used timeseries collection to aggregate data into some chunks (in case of example - group visits per hour).

All MongoDB related stuff was done on the code side (except creating cluster, database and user to access). It is pretty great that as long as you have access to database you can work with it freely - e.g. collection is created as soon as first document is saved!

For deployment I've used https://fly.io - mostly because I wanted to check out some Big-Three (AWS,GCP,Azure) alternative for hosting apps!

Additional Resources/Info

Nothing I can think of! ;-)

Top comments (0)