<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amir</title>
    <description>The latest articles on DEV Community by Amir (@amir_abushanab).</description>
    <link>https://dev.to/amir_abushanab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F390756%2F93bd46c7-0dd0-4249-8c05-aa389d117cdd.jpeg</url>
      <title>DEV Community: Amir</title>
      <link>https://dev.to/amir_abushanab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amir_abushanab"/>
    <language>en</language>
    <item>
      <title>OctoGrad/DevGrad 2020 - Banter.ly</title>
      <dc:creator>Amir</dc:creator>
      <pubDate>Sun, 24 May 2020 03:07:46 +0000</pubDate>
      <link>https://dev.to/amir_abushanab/octograd-devgrad-2020-banter-ly-3ao6</link>
      <guid>https://dev.to/amir_abushanab/octograd-devgrad-2020-banter-ly-3ao6</guid>
      <description>&lt;h2&gt;
  
  
  My Final Project
&lt;/h2&gt;

&lt;p&gt;Not so much a school project as a passion project that forced me to leverage almost everything I learned in the past 3 years of University: &lt;/p&gt;

&lt;p&gt;I present to you &lt;strong&gt;Banter.ly&lt;/strong&gt;, a little web app that one day aims to be the the world's most comprehensive open source chat analytics 🔎 and visualization app 📊.&lt;/p&gt;

&lt;p&gt;The idea for Banter.ly came when I was trying to analyze some of my own chats. All the other chat analyzers I found online were either too shallow (i.e. did not have what I was looking for), or had sketchy privacy statements. &lt;/p&gt;

&lt;p&gt;So like and any good dev, since I couldn't find it, I built it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Demo Link
&lt;/h2&gt;

&lt;p&gt;You can &lt;a href="http://34.105.74.179:8080/"&gt;try it out for yourself&lt;/a&gt; (sorry about the http, don't want to setup certs or a domain before v0.2)&lt;/p&gt;

&lt;p&gt;Or if it's bugging out (which frankly is quite likely 😅), checkout this demo of what an analyzed group chat looks like &lt;a href="https://www.loom.com/share/d18297dbc3964fe9ad8f7801a5f386c9"&gt;https://www.loom.com/share/d18297dbc3964fe9ad8f7801a5f386c9&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Link to Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vWogaON8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-28d89282e0daa1e2496205e2f218a44c755b0dd6536bbadf5ed5a44a7ca54716.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/sahaab-io"&gt;
        sahaab-io
      &lt;/a&gt; / &lt;a href="https://github.com/sahaab-io/banter.ly"&gt;
        banter.ly
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      The world's most comprehensive open source chat analytics 🔎 and visualization app 📊 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;
  &lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/sahaab-io/banter.ly/master/assets/logo.png"&gt;&lt;img alt="Banter.ly Logo" src="https://res.cloudinary.com/practicaldev/image/fetch/s--FISY7MgI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/sahaab-io/banter.ly/master/assets/logo.png" width="250px"&gt;&lt;/a&gt;
  &lt;h1&gt;
&lt;a href="https://raw.githubusercontent.com/sahaab-io/banter.ly/master/"&gt;Banter.ly&lt;/a&gt;
&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://camo.githubusercontent.com/a0674ba59bf9a4843d155882468f97f3f1fa17ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507974686f6e2d332e372e372d79656c6c6f772e7376673f6c6f676f3d707974686f6e266c6f6e6743616368653d74727565266c6f676f436f6c6f723d776869746526636f6c6f72423d333737346163267374796c653d666c61742d73717561726526636f6c6f72413d346335363661"&gt;&lt;img src="https://camo.githubusercontent.com/a0674ba59bf9a4843d155882468f97f3f1fa17ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507974686f6e2d332e372e372d79656c6c6f772e7376673f6c6f676f3d707974686f6e266c6f6e6743616368653d74727565266c6f676f436f6c6f723d776869746526636f6c6f72423d333737346163267374796c653d666c61742d73717561726526636f6c6f72413d346335363661" alt="Python"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://camo.githubusercontent.com/f7a5b32400e4eb814a3d8dccd0f4cee4c2338cc7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446173682d76312e31322e302d626c75652e7376673f6c6f6e6743616368653d74727565266c6f676f3d707974686f6e266c6f6e6743616368653d74727565267374796c653d666c61742d737175617265266c6f676f436f6c6f723d776869746526636f6c6f72423d33373734616326636f6c6f72413d346335363661"&gt;&lt;img src="https://camo.githubusercontent.com/f7a5b32400e4eb814a3d8dccd0f4cee4c2338cc7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446173682d76312e31322e302d626c75652e7376673f6c6f6e6743616368653d74727565266c6f676f3d707974686f6e266c6f6e6743616368653d74727565267374796c653d666c61742d737175617265266c6f676f436f6c6f723d776869746526636f6c6f72423d33373734616326636f6c6f72413d346335363661" alt="Dash"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Banter.ly's goal is simply to be &lt;em&gt;the world's most comprehensive open source chat analytics 🔎 and visualization app 📊&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We want to make it easy and safe for anyone to get the most advanced insights from their text conversations with the click of a button&lt;/p&gt;
&lt;p&gt;See a live demo &lt;a href="http://34.105.74.179:8080/" rel="nofollow"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
Features&lt;/h2&gt;
&lt;p&gt;Banter.ly currently only supports Whatsapp chat exports - more messengers and formats are on the &lt;a href="https://github.com/sahaab-io/banter.ly/projects/2"&gt;roadmap&lt;/a&gt; (feature requests and cool ideas are welcome!)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Frequency analysis&lt;/li&gt;
&lt;li&gt;Sentiment, emotion, and profanity analysis&lt;/li&gt;
&lt;li&gt;Named entity extraction&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Getting Started&lt;/h2&gt;
&lt;p&gt;Banter.ly is built on top of &lt;a href="https://plotly.com/dash/" rel="nofollow"&gt;Dash&lt;/a&gt;, which provides a fantastic python environment for creating dashboards&lt;/p&gt;
&lt;h3&gt;
Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.python.org/downloads/release/python-377/" rel="nofollow"&gt;Python 3.7.7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://mongodb.com" rel="nofollow"&gt;MongoDB&lt;/a&gt; running locally or one their free hosts&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Running the App&lt;/h3&gt;
&lt;div class="highlight highlight-source-shell"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; install poetry&lt;/span&gt;
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py &lt;span class="pl-k"&gt;|&lt;/span&gt; python
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; clone this repo and go into it&lt;/span&gt;
git clone https://github.com/sahaab-io/banter.ly.git &lt;span class="pl-k"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="pl-c1"&gt;cd&lt;/span&gt; banter.ly
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; create and activate the virtualenv + install dependencies&lt;/span&gt;
poetry&lt;/pre&gt;…&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/sahaab-io/banter.ly"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I built it
&lt;/h2&gt;

&lt;p&gt;At first, Banter.ly was just a notebook on Google Collab where I was trying to plot some cool interactive visualizations, but it quickly grew out of scope. Plus I realized that others out there could benefit from this so I decided to turn it into a web app, one that you could also run locally if you don't want your super personal conversations to ever leave your PC.&lt;/p&gt;

&lt;p&gt;When building Banter.ly, I only used open-source tech (except an S3 bucket), with the main components being &lt;a href="https://www.mongodb.com/"&gt;MongoDB&lt;/a&gt; and a monolith made with &lt;a href="https://github.com/plotly/dash"&gt;Dash&lt;/a&gt; (which is built on top of a bunch of other open-source tech, namely &lt;a href="https://github.com/pallets/flask"&gt;Flask&lt;/a&gt; and &lt;a href="https://github.com/facebook/react"&gt;React&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Now Dash is the really interesting piece here. If you ever dreamed of writing JavaScript in Python, then congratulations the devs over at &lt;a href="https://plotly.com"&gt;Plot.ly&lt;/a&gt; have granted your wish; Dash transforms your python code into React code which then becomes honest-to-god-true-blue browser rendered &lt;code&gt;HTML&lt;/code&gt;+&lt;code&gt;CSS&lt;/code&gt;+&lt;code&gt;JS&lt;/code&gt;. It's also recently passed the 1.0 mark and after using it I'd say it's more than solid enough for production use. &lt;/p&gt;

&lt;p&gt;That said, while it's nice to have a monolith repo for handling the data processing and UI, it turns out for this particular use case it would have been better to split the app into an independently scalable front-end and back-end; the two big hurdles in usability were the one-directional flow of doing things that Dash forces on you (for good reason, but not for this use case), plus the amount of time (and cost) it takes to process some of the larger requests; had a friend try uploading a 400k⁉ message chat, and to no ones surprise it crashed the app.&lt;/p&gt;

&lt;p&gt;So before adding in any more features, I plan on a full re-write to split it up into a React frontend (still leveraging &lt;a href="https://github.com/plotly/plotly.js"&gt;plot.ly&lt;/a&gt;) and a &lt;a href="https://github.com/tiangolo/fastapi"&gt;FastAPI&lt;/a&gt; back-end, containerized and deployed on something like Container service or Kubernetes, allowing the compute intensive parts to scale with demand and save that money - I might not be a student anymore but frugality is a learned habit I plan to keep 🤑.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Thoughts / Feelings / Stories
&lt;/h2&gt;

&lt;p&gt;There's still a lot of improvements to be made before I feel it's ready for primetime, but I'm excited to see just how far this project will go. Supporting more messengers, real-time views of your chats, and much much more. This is just the beginning.&lt;/p&gt;

&lt;p&gt;I plan on doing a more thorough deep-dive once I've ironed out some of the bigger outstanding issues, so stay tuned!&lt;/p&gt;

&lt;p&gt;Here's hoping that someday it will empower anyone to learn from their data 🐱‍🏍&lt;/p&gt;

</description>
      <category>octograd2020</category>
      <category>devgrad2020</category>
    </item>
  </channel>
</rss>
