<?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: MEHMET ALI IZCI</title>
    <description>The latest articles on DEV Community by MEHMET ALI IZCI (@mmehmetaliizci).</description>
    <link>https://dev.to/mmehmetaliizci</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%2F1145842%2Fd4e89258-c7a3-42ed-bf94-4e427970c5d3.jpeg</url>
      <title>DEV Community: MEHMET ALI IZCI</title>
      <link>https://dev.to/mmehmetaliizci</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mmehmetaliizci"/>
    <language>en</language>
    <item>
      <title>🎬 Episode 3: Designing Database &amp; le communication</title>
      <dc:creator>MEHMET ALI IZCI</dc:creator>
      <pubDate>Sat, 02 Sep 2023 11:53:05 +0000</pubDate>
      <link>https://dev.to/mmehmetaliizci/episode-3-designing-database-le-communication-3hb7</link>
      <guid>https://dev.to/mmehmetaliizci/episode-3-designing-database-le-communication-3hb7</guid>
      <description>&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Database Design&lt;/strong&gt;: How to structure tasks and assignees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code me some Back end&lt;/strong&gt;: Connect MongoDB with your Node.js app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code me some Front end&lt;/strong&gt;: Update Slash Commands to manage tasks and assignees.&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  System Design and Connection Architecture
&lt;/h4&gt;

&lt;p&gt;I've designed a simple schema to illustrate the project's flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c4NWFSnB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dd8y2cvxy3hegsv5oryp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c4NWFSnB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dd8y2cvxy3hegsv5oryp.png" alt="SYSTEM" width="800" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User interacts with &lt;strong&gt;Slack interface&lt;/strong&gt; then slack sends these interactions via events to our plugin via &lt;code&gt;.../slack/events&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Our &lt;strong&gt;slack plugin&lt;/strong&gt; handles these events which we created in Episodes 1-2, allowing us to filter out invalid requests or events from Slack then sends &lt;code&gt;POST&lt;/code&gt; requests to &lt;strong&gt;BE&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BE&lt;/strong&gt;, which exclusively handles the connection to the &lt;strong&gt;database&lt;/strong&gt;. This modular design provides the flexibility to switch  the any BE if needed and feeds data back to the &lt;strong&gt;slack plugin&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Some side note here&lt;/em&gt;: You could bypass the BE and connect directly to the database through the middleware, but I prefer a cleaner architecture and want to encourage good design patterns. This approach does require exposing two servers, which means a bit more setup work.&lt;/p&gt;




&lt;h4&gt;
  
  
  Why MongoDB and Vercel?
&lt;/h4&gt;

&lt;p&gt;I've chosen MongoDB and Vercel for this project because the solution we need is relatively simple, and I'm interested in learning more about these technologies. Feel free to choose any database that suits your needs, but be aware of the differences between NoSQL and SQL databases, as well as their pros and cons.&lt;/p&gt;




&lt;h4&gt;
  
  
  Mongo shenanigans
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Create a MongoDB cluster using their free tier, which should suffice for this project. Follow the instructions &lt;a href="https://www.mongodb.com/basics/create-database"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Obtain your MongoDB connection URL. It should resemble:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mongodb+srv://&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt;@cluster0.b71kbmb.mongodb.net/?retryWrites=true&amp;amp;w=majority  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Backend Code Walkthrough
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/mmehmetAliIzci/Tasky.git"&gt;Get the code from here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to step-3. Here you can see that we've added two new folders. &lt;code&gt;plugin&lt;/code&gt; and &lt;code&gt;be&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;After cloning the repository, run &lt;code&gt;yarn&lt;/code&gt;, adjust the &lt;code&gt;env&lt;/code&gt; variables, and start the server. You should now have a localhost connected to a public MongoDB instance.&lt;/p&gt;

&lt;p&gt;The backend follows classic architecture with Models, Controllers, Routes, and Services.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Models&lt;/strong&gt;: Examine the &lt;code&gt;Tasks&lt;/code&gt; model to understand our data structure. Initially, I thought of creating both &lt;code&gt;Person&lt;/code&gt; and &lt;code&gt;Tasks&lt;/code&gt; models, but later realized that storing user IDs in &lt;code&gt;Tasks&lt;/code&gt; is sufficient.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Controllers&lt;/strong&gt;: These contain various operations to ensure the system functions as intended. While not entirely foolproof, they include common error-handling measures to ensure proper usage. These methods perform basic CRUD operations on MongoDB.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Routes&lt;/strong&gt;: Look into the routes exposed via Express in the BE.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Services&lt;/strong&gt;: This section includes the connector for MongoDB and JSON validation for our collections.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  Plugin Code Walkthrough
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the &lt;code&gt;step-3/plugin&lt;/code&gt; directory to see the updated code.&lt;/li&gt;
&lt;li&gt;You'll find a new &lt;code&gt;env&lt;/code&gt; file for specifying the BE URL.&lt;/li&gt;
&lt;li&gt;Multiple files in the &lt;code&gt;/src/api&lt;/code&gt; directory segregate each call to the BE, making the architecture more modular.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;index.ts&lt;/code&gt;, you'll see the logic for making calls to our exposed BE and handling the responses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lets spin up our plugin and connect to Slack.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;yarn&lt;/code&gt; and &lt;code&gt;yarn start:dev&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In another terminal, forward your localhost to HTTPS with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   ssh -o ServerAliveInterval=60 -R kumbaya-my-lord-kumbaya:80:localhost:3000 serveo.net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  See what you build
&lt;/h3&gt;

&lt;p&gt;Now its for the best part. Lets see what we built. &lt;/p&gt;

&lt;p&gt;Task creation and adding new people to task:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ar0uo86K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0rdetx6aentpix4ss00u.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ar0uo86K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0rdetx6aentpix4ss00u.gif" alt="Task creation" width="800" height="579"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rest of the commands:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gxHKqKeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywh2ge5xdwvrzpzq5qtj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gxHKqKeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywh2ge5xdwvrzpzq5qtj.gif" alt="Rest of the commands" width="800" height="579"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've made this far, know that this is my first time being at this side (creator) side.&lt;/p&gt;

&lt;p&gt;If you think about doing the same, take a look at what i've found good and the bad about writing an educational content on my next episode :)&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>node</category>
      <category>tutorial</category>
      <category>automation</category>
    </item>
    <item>
      <title>🎬 Episode 2: Slash Commands and Conceptual Design</title>
      <dc:creator>MEHMET ALI IZCI</dc:creator>
      <pubDate>Sat, 02 Sep 2023 11:52:50 +0000</pubDate>
      <link>https://dev.to/mmehmetaliizci/episode-2-slash-commands-and-conceptual-design-3d4c</link>
      <guid>https://dev.to/mmehmetaliizci/episode-2-slash-commands-and-conceptual-design-3d4c</guid>
      <description>&lt;h3&gt;
  
  
  What's the Deal?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Slash Commands&lt;/strong&gt;: These quick commands are the express lane of Slack bots. Hold onto your hats!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your First Slash Command&lt;/strong&gt;: We're making a slash command. You in?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coding Time&lt;/strong&gt;: We'll toss in a casual "Hi" to get the ball rolling.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  1. Slash Commands: The How and Why
&lt;/h3&gt;

&lt;p&gt;Previously we've built a system where we listen for a particular message and respond with a cat picture. Lets delve into something slightly more practical.&lt;/p&gt;

&lt;p&gt;Interacting with users on Slack can be a total carnival, and that's what makes this gig so fun. Sure, you could make some fancy interactive window asking for names and such, but let's keep it simple. I don't want to click through endless modals when you could do everything with a one-liner. The fewer clicks, the better.&lt;/p&gt;

&lt;p&gt;So, we're rolling with slash commands.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Help, Please&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/tasky help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Task Shenanigans&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/tasky create UniqueTaskName
/tasky remove UniqueTaskName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Assignee Juggling&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/tasky add-assignee UniqueTaskName @user1 @user2
/tasky remove-assignee UniqueTaskName @user1 @user2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next Up&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/tasky next UniqueTaskName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Your First Slash Command
&lt;/h3&gt;

&lt;p&gt;Take a minute, head back to Slack's settings, and whip up a slash command for your bot. It's like making an omelette but with less mess.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nZKpJJdt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27f3k6834z8794b3sohf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nZKpJJdt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27f3k6834z8794b3sohf.jpg" alt="Slash command" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The Specs:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Command&lt;/strong&gt;: Ours is gonna be &lt;code&gt;/tasky&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request URL&lt;/strong&gt;: The same URL you already have up and running. &lt;code&gt;https://kumbaya-my-lord-kumbaya.serveo.net/slack/events&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description&lt;/strong&gt;: It's optional, but don't you want people to know your bot's purpose?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--09QJfN46--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7nq0650amsvqnw89m6q5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--09QJfN46--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7nq0650amsvqnw89m6q5.jpg" alt="Configuration" width="800" height="861"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make sure to tick to 'escape the channels and users' to interpret channels and users properly.&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Testing and Debugging
&lt;/h4&gt;

&lt;p&gt;After reinstalling the app with the new settings, test the command &lt;code&gt;/tasky&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--45Pxumhh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c4jjoofmwt85v3jtzkli.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--45Pxumhh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c4jjoofmwt85v3jtzkli.jpg" alt="error" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you see a timeout error, don't fret; it’s expected since we haven't set up the backend to handle this yet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ERROR]   An incoming event was not acknowledged within 3 seconds. Ensure that the ack() argument is called in a listener.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also in slack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/tasky failed with the error "operation_timeout"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. Code Time
&lt;/h3&gt;

&lt;p&gt;Now for the hands-on part. [Retrieve the codebase from].(&lt;a href="https://github.com/mmehmetAliIzci/Tasky"&gt;https://github.com/mmehmetAliIzci/Tasky&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Checkout to particular commit via &lt;code&gt;git checkout 924262c&lt;/code&gt; and &lt;code&gt;cd step-2&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;At this stage, we've created a new &lt;code&gt;parseCommand&lt;/code&gt; function that helps translate the slash commands to actionable logic. Right now, it's limited to a simple replies.&lt;/p&gt;

&lt;p&gt;At this point, if you would run the bot and try to interact, you will have something similar like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RHu5EBDV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpm7al4aesk6af43vxe9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RHu5EBDV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpm7al4aesk6af43vxe9.gif" alt="ugly response" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are one step closer but obviously this is quite ugly. To make the bot's replies more appealing, Slack provides a good guide to 'beautifying' your text output. You can go nuts. Check out &lt;a href="https://api.slack.com/block-kit/building"&gt;slack block kit building&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Make it a beauty
&lt;/h4&gt;

&lt;p&gt;I still want to keep things simple but also help the users. Thus I’ve did some alterations to the responses. They are all stored in blocks. You can find the latest version from &lt;a href="https://github.com/mmehmetAliIzci/Tasky/tree/main/step-2"&gt;here&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;If you run this code it should look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vd7v_lwL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6piav9wb6h68g9govjyf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vd7v_lwL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6piav9wb6h68g9govjyf.gif" alt="beautey" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;So there you have it, folks. You're one episode closer to becoming the office Slack bot guru. Stay tuned.&lt;/p&gt;

</description>
      <category>node</category>
      <category>automation</category>
    </item>
    <item>
      <title>🎬 Episode 1: Slack Bot &amp; Server Setup</title>
      <dc:creator>MEHMET ALI IZCI</dc:creator>
      <pubDate>Sat, 02 Sep 2023 11:52:36 +0000</pubDate>
      <link>https://dev.to/mmehmetaliizci/episode-1-slack-bot-server-setup-37a</link>
      <guid>https://dev.to/mmehmetaliizci/episode-1-slack-bot-server-setup-37a</guid>
      <description>&lt;h3&gt;
  
  
  What You're In For
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Bot Creation &amp;amp; Permissions&lt;/strong&gt;: Quick stroll through Slack's settings. We'll be in and out like a fiddler's elbow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bare Minimum Server&lt;/strong&gt;: A light server to make Slack and your bot play nice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event Subscriptions&lt;/strong&gt;: Mandatory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Drive&lt;/strong&gt;: Invite the bot, chat a bit.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Step 1: Bot Creation &amp;amp; Permissions
&lt;/h3&gt;

&lt;p&gt;Creating a bot in Slack isn't a trust fall; it's more like a firm handshake. Here's how to do it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Workspace &amp;amp; App&lt;/strong&gt;: Create a Slack workspace, if you don't have one. Then, fashion your app via &lt;a href="https://api.slack.com/apps"&gt;Slack Apps&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keys &amp;amp; Secrets&lt;/strong&gt;: Every good spy movie has a secret code. In this saga, it's called the "Signing Secret". Remember it.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X67INzkO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6ijm5ykkhd0fkvt7s7w.jpg" alt="SigninSecret" width="673" height="156"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OAuth &amp;amp; Permissions&lt;/strong&gt;: Head over there in your Slack settings. 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Bk312VZT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v3exwv78zg1wmlabhy7m.jpg" alt="Oauth-image" width="282" height="167"&gt;
Add some scopes like &lt;code&gt;app_mentions:read&lt;/code&gt;, &lt;code&gt;channels:read&lt;/code&gt;, and &lt;code&gt;chat:write&lt;/code&gt;. These scopes give your bot some social skills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install &amp;amp; Token&lt;/strong&gt;: Finally, install your app to the workspace to snag that OAuth token.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Step 2: Bare Minimum Server
&lt;/h3&gt;

&lt;p&gt;Our server's not going to solve world hunger, but it'll do its job. Get the starter code from &lt;a href="https://github.com/mmehmetAliIzci/Tasky/tree/main/step-1"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Yarn Install&lt;/strong&gt;: Fire up your terminal and let yarn do its magic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment&lt;/strong&gt;: In the &lt;code&gt;.env&lt;/code&gt; file, place those two secret tokens from earlier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run Server&lt;/strong&gt;: A simple &lt;code&gt;yarn start:dev&lt;/code&gt; will bring your server to life.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SSH your way into reality with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;ServerAliveInterval&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;60 &lt;span class="nt"&gt;-R&lt;/span&gt; kumbaya-my-lord-kumbaya:80:localhost:8888 serveo.net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Voila, &lt;code&gt;https://kumbaya-my-lord-kumbaya.serveo.net&lt;/code&gt; is your server's alter ego.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 3: Event Subscriptions
&lt;/h3&gt;

&lt;p&gt;Back to Slack settings. Enable "Event Subscriptions" and paste this URL: &lt;code&gt;https://kumbaya-my-lord-kumbaya.serveo.net/slack/events&lt;/code&gt;. Then, subscribe to &lt;code&gt;message.channels&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K5RbRZsn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1glvz2r3rskogt2n60bx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K5RbRZsn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1glvz2r3rskogt2n60bx.jpg" alt="event subscription image" width="431" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KMyfc7ON--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qi5e53eiizagbvvf2hff.jpg" alt="subscriptions" width="656" height="385"&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Take It for a Spin
&lt;/h3&gt;

&lt;p&gt;Invite your new bot to a Slack channel. Type "gimmeCat", and your bot becomes your personal feline photographer. Just don't expect it to feed the cat for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5WyR661M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ugz6y6ebcee6ua82mjw.gif" alt="final-result" width="600" height="407"&gt;
&lt;/h2&gt;

&lt;p&gt;And that's Episode 1. More thrilling than a cup of decaf, wouldn't you agree? Stay tuned. &lt;/p&gt;

&lt;p&gt;Feel free to copy, paste, and bask in your newfound bot glory. 🤖&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Cook me a Slack bot</title>
      <dc:creator>MEHMET ALI IZCI</dc:creator>
      <pubDate>Sat, 02 Sep 2023 11:51:57 +0000</pubDate>
      <link>https://dev.to/mmehmetaliizci/cook-me-a-slack-bot-23fd</link>
      <guid>https://dev.to/mmehmetaliizci/cook-me-a-slack-bot-23fd</guid>
      <description>&lt;h2&gt;
  
  
  Build a Round-Table Task Manager Slack Bot 🤖
&lt;/h2&gt;

&lt;p&gt;Ever been tired of wasting time deciding who will be sharing their screen this time on a standup ? Are you sad because you are always the one who does all the dirty work ? Well, today's your lucky day! We're building a Slack bot to manage unwanted task using round-table. 🔄&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Aint got no time for reading tutorial ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mmehmetAliIzci/Tasky"&gt;Here is the repository&lt;/a&gt;. Go nuts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  📚 What's Inside?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Episode 1&lt;/strong&gt;: Set up your Slack Bot and a Node.js TypeScript server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Episode 2&lt;/strong&gt;: Learn about Slash Commands and think up cool features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Episode 3&lt;/strong&gt;: Get nerdy with MongoDB and design a database and communicate with the bot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Episode 4&lt;/strong&gt;: Deploy it for world domination! 🌍&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎬 Episode 1: Setting up the Slack Bot and Node.js TypeScript Server
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Introduction&lt;/strong&gt;: Slack bots. Node.js. TypeScript. It's not sci-fi; it's your workspace in a few minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bot Configuration&lt;/strong&gt;: Quick stroll through Slack's settings. We'll be in and out like a fiddler's elbow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server, but Make it Minimal&lt;/strong&gt;: A light server to make Slack and your bot play nice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Drive&lt;/strong&gt;: Invite the bot, chat a bit.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🎬 Episode 2: Slash Command and Conceptual Design
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Slash Commands&lt;/strong&gt;: What are these? Why use them?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your First Slash Command&lt;/strong&gt;: Create a Slash Command for your bot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design Ideas&lt;/strong&gt;: What should the bot do? Manage tasks? Assign people? 🤷‍♀️&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coding Time&lt;/strong&gt;: Make your bot say "Hi" when you use the Slash Command.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🎬 Episode 3: Designing the Database Schema
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Database Design&lt;/strong&gt;: How to structure tasks and assignees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Time&lt;/strong&gt;: Connect MongoDB with your Node.js app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coding Spree&lt;/strong&gt;: Update Slash Commands to manage tasks and assignees.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🎬 Episode 4: SHIP IT
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deploy BE to Vercel&lt;/strong&gt;: What's Vercel? How to implement it?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Last touches&lt;/strong&gt;: Test and polish your bot. Take over the world!&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>typescript</category>
      <category>slackbot</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
