The Stack : Making a free open-source disposable email service (inboxkitten.com) in 14 hours 😼
Tags: opensource, serverless, javascript, vue
Published: 2018-09-22 09:40:36

---
title: The Stack : Making a free open-source disposable email service (inboxkitten.com) in 14 hours 😼
published: true
description: A view into the stack involved in a "hackaton" project which eventually turned into production code.
canonical_url: https://uilicious.com/blog/making-a-free-open-source-disposable-email-service-inboxkitten-com-in-14-hours/
tags: opensource,serverless,javascript,vuejs
cover_image: https://thepracticaldev.s3.amazonaws.com/i/gghm5uz5bnvcbx86m1l1.png
series: The InboxKitten journey 🐈
---

(powered by serverless kittens 🐈)


Disposable emails services, are incredibly useful in accessing parts of the internet that insist of having an your email address which you do not wish to give out. Or for automation of your day to day testing in web development.

All you need to do is send an email to `unique-name@inboxkitten.com`, go over to inboxkitten.com, search it up. And poof it should be there. No signup nor passwords needed.

So 2 of us, [Eugene Cheah](https://twitter.com/@picocreator) and [Jia Ming Tiong](https://dev.to/jmtiong), originally planned to make one for fun in a hackerton.

However when our usual testing inbox started randomly failing (too much mail?). It went from “for fun” to “fur reals, we need it to work now (or yesterday if possible)”. A mad rush of 14 hours from zero to prototype.

> And PS : Its launches on Product Hunt on 22nd September [here](https://www.producthunt.com/posts/inboxkitten), and the website can be found on [inboxkitten.com](https://inboxkitten.com)

---

![mailgun](https://thepracticaldev.s3.amazonaws.com/i/4jmizyczm4gcotsxm1by.png)
<figcaption>(mailgun official announcement on free inbound mail)</figcaption>

# Making it free, with Mailgun

As a disposable inbox does not need to keep emails for more a few hours, we do not need a full `SMTP + FileSystem + Database` setup, which would be a huge pain and expense to set up. Hence enter Mailgun, who provides a [free incoming email service](https://www.mailgun.com/blog/weekly-product-update-no-charge-for-inbound-email-and-self-service-dedicated-ips), with a small small catch that its up to 3 days of storage, which is 3 times more then what we practically needed. Woohoo!

---

![firebase](https://thepracticaldev.s3.amazonaws.com/i/wzs5uevgy103nk598n98.png)
<figcaption>(firebase, and its free spark tier + blaze plan)</figcaption>

#Making it free, with serverless API

While we could make a static site, which makes javascript calls to Mailgun directly with the API keys, having private api keys to the internet is a bad idea (for the wallet).

Enter [firebase](https://medium.com/r/?url=https%3A%2F%2Ffirebase.google.com%2Fpricing%2F) with [google always free cloud functions](https://cloud.google.com/functions/pricing)! As long as we are reading less than 50,000 (+/- viral kittens) emails a month, regardless of the amount of emails actually sent, it would be within the free tier, great! 

Hence after learning how to properly interact with Mailgun's API, which is fairly simple, using only two endpoints for [listing of emails and retrieving the email](https://documentation.mailgun.com/en/latest/api-events.html#events). And a quick testing on Postman, we would simply need to only create our express.js server wrapping those endpoints with our API keys. Providing access to the Mailgun API, while keeping our keys secure.

<figcaption>(Note there are a few other free serverless offering, that would probably work the same)</figcaption>

---

![vuejs](https://thepracticaldev.s3.amazonaws.com/i/hj0kdz90d93ek30tszre.png)

# Interacting with our API - through the UI and even the CLI

After completion of our own API server for the endpoints, all that is left to do is to create a friendly user interface for it.

This is quickly done up as a 3 view, single page application using vue.js.

And since we are at it, we might as well create a CLI version of it. Using go lang. (Just because we wanted to learn how to do so in go =D )

---

![github](https://thepracticaldev.s3.amazonaws.com/i/h9b47x5gxwo7tgbgklsb.png)

# And making it opensource

Because we can, on github here, under MIT license.

So go forth, and adopt your own inboxkitten.

---

![uilicious test](https://thepracticaldev.s3.amazonaws.com/i/rmja3d5oynevwmdjrxow.gif)
<figcaption>Catfeeding: Uilicious testing inboxkittens XD</figcaption>

# With automated UI testing for validation

Full disclaimer, naturally since I work at uilicious.com, I would be using their platform to test my project. 

The test case shown above, uses the following script:

{% gist https://gist.github.com/PicoCreator/592c14b7da64fca48098f87a39653ff8 %}

You can see an example result here:

[https://test.uilicious.com/test/public/7t74nVS828weKMtzGgJppF](https://test.uilicious.com/test/public/7t74nVS828weKMtzGgJppF)

Woohoo, now that it’s tested and know its working. We can let the kitten free on the internet!

---

# All in 14 hours

With a 2 person team. This makes the project ideal for a 24 hour hackathon project with time to spare disturbing all the other contestants, while playing the wii-u.

The full timeline of the prototyping project can be found [here](https://blog.uilicious.com/development-timeline-for-inboxkitten-com-lessons-learnt-e802a2f0a47c).

Special thanks to Nai Jie, our designer friend who saved our prototype from public embarrassment with the cute cat logo (applied after the 14 hours). Check out his other works at [@njartz](https://www.instagram.com/njartz/)!

If you have any feedbacks or comments, do let us know, after you give [InboxKitten a try](https://inboxkitten.com). Also if you like the project, feel free to upvote [our Product Hunt launch here](https://www.producthunt.com/posts/inboxkitten).

---

> This article was originally co-written by Jia Ming Tiong, on the uilicious blog [here](https://blog.uilicious.com/making-a-free-open-source-serverless-disposable-email-service-inboxkitten-com-in-14-hours-b7c4915b9593), and has been modified from medium.
>
> He has a related post on his own personal experience [below](https://dev.to/jmtiong/what-i-have-learnt-from-a-14-hours-project-2joo)

{% link https://dev.to/uilicious/what-i-have-learnt-from-a-14-hours-project-2joo %}