MaiD: Hackable newsfeed reader with Postman.
Tags: javascript
Published: 2021-02-15 13:48:12

**How much time do you spend reading stuff on the internet??**

If your answer is *'A lot'* then MaiD is the solution you need.

**MaiD?**

if you are thinking, what the fluff is MaiD? then let me simplify it for you. 

*MaiD = Mail in your feeD*

Before you read the rest of the article, this is how a feed looks like: [Sample feed](https://pmg-feed-maid.udaykrishna.com/feedfiles/9f1dd4a8-a118-4d8a-91df-70e25f0b52f6.html)

**Backstory**

It all started on new year. Like everyone else, I was working on new year goals. One of them was to limit my time on the internet. For a software developer whose life is to make others spend their time online, it sounds ironic. I know.

Anyway, I listed down the apps/websites that I was spending my time on.

These came out as the top ones:

1. Reddit
2. Twitter
3. Medium
4. Hacker News
5. Dev.to

On average I am spending 3 hrs a day reading stuff. Yes 3hours! and the worst part is I am reading stuff that i don't even need. I am getting distracted by the suggested posts and feed.

I thought to myself, wouldn't it be cool, if there was an app that can email me daily all the top posts and articles from my favorite reading sources?

As a curious hacker, I started searching for solutions that can help me build personalized feeds. I was surprised that there aren't any solutions for this problem. Sure there are many rss readers but they are also suggesting more articles/blogs to read 😅

I discussed with some of my friends and many are facing the same issue as well. Some were even willing to pay for a solution. Hmm, looks like I am onto something.

So i discussed with Uday and we thought of building a solution that will collect all the articles and posts and send you a custom feed

Like a bunch of nerds, we started with the system design and architecture. During this time, I also came across a postman hackathon. Postman introduced workspaces(which are nothing but a collection of api calls.) And we realized we could just use workspaces instead of creating backend from scratch.

Yep, you read that right. We built our entire backend on postman. That means no hassle of creating db tables, handling auth, saving user preferences etc.,

Here is how we built:

1. We added all the feed sources as requests in a collection. Requests can return either xml(rss feeds) or json.
2. We also created util functions to parse the response and store it in a variable. These functions are run once a request is run successfully.
3. We used postman scripts to handle the workflow(ie. To make requests in a specific order)
4. We added space theme(for better reading experience) to the feed and uploaded it to aws S3.
5. The feed link is shared in the email.

So if anyone wants to use maid, all they need to do is:

1. Go to mailjet and request for api access(free btw).
2. Fork the [postman workspace](https://www.postman.com/read-stack/workspace/maid-mail-in-your-feed/overview) and use the mailjet credentials.
3. If you want to add any custom sources,add it as a new request and the util functions to handle logic.


**Note:**

1. You can use the aws api key provided to upload to aws -- Details in [postman workspace](https://www.postman.com/read-stack/workspace/maid-mail-in-your-feed/overview)
2. By default the theme is space, you can also customize it -- Details in postman workspace.
3. If you prefer watching video on [Youtube](https://www.youtube.com/watch?v=1EqbrCyg9Rs&feature=youtu.be)