How to Make an App End to End: Reddit Bot That Uses AI

Norman Benbrahim
Nov 3 · 4 min read

There’s a lack of good resources on making web apps from end to end — meaning from what the user sees on the screen, all the way to hosting it on a cloud platform like AWS or Google Cloud.

You can use this project to show future employers you mean business, or to show any potential business partners that you can get shit done. Let’s get to it!


Complete Beginners

If you’ve never coded before and just stumbled on this article, fear not! I’ve written an extensive article on how to learn to code from the beginning. This article was written in the context of building an automated algorithmic trading bot, but the knowledge in this article is the same.


App Description

We will let a user search for subreddits on www.reddit.com, and then display how that subreddit is feeling that day based on all the comments using Sentiment Analysis.

We will use the Vader library to do Sentiment Analysis on comments in the threads. This library is specially tuned to comments on social media, so it will work great for us.

This means we will use a little bit of Machine Learning, but we will rely on the pre-trained “gold-standard” vectors from Vader, so we won’t have to train any models (however, you can train data as your app grows).


Where You Can Download The Code

You can download all the code used on my github repository for this page. This is where you will find the most up-to-date code.


Step 1: Building a Responsive Front End (Bootstrap)

This will be the face of our application.

I like starting with the front end of the application because it forces me to think of what the users will see. Because at the end of the day, the user is everything.

Bootstrap provides an easy-to-use framework for building a responsive website that looks great on mobile. It’s easy to use and most importantly there’s tons of free templates out there we can piggyback from, which is exactly what we’re going to do.

Read step 1 now: [link to article]

Step 2: Making our Framework Play Nice With Our Front End (Django)

No, I’m not talking about the movie.

Django is a complete web framework that allows us to build everything a web app needs in a very easy way.

This will be the heart of our application. Everything will pump through the Django framework, including the database where we will store our data. It turns out Django is a highly efficient, secure and super powerful way to build web apps. And I love Python so that’s why I chose this framework.

Step 2 article coming soon.

Step 3: Use Reddit’s API To Do Calculations & Store Results in Database (Python + Django)

We will use the reddit python wrapper library called PRAW. This will allow us to pull data from reddit and do some work on it using Python, including our Sentiment Analysis. The best part is that Reddit’s API is super easy to work with, so we will be able to focus on more important things like actually making useful scripts.

Step 3 article coming soon.

Step 4: Host The App on Google Cloud

Once we have a fully functional app we’ll host it on Google Cloud and let the world see the result of our sweat. This is a little more involved then you would expect, but is a very common part of creating web apps. This is the part of creating apps that is most often overlooked.

Step 4 article coming soon.

Let’s Get Started

Here’s the article for the first step in our journey. Let’s get to work!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade