<?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: Zafar Saleem</title>
    <description>The latest articles on DEV Community by Zafar Saleem (@zafarsaleem).</description>
    <link>https://dev.to/zafarsaleem</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%2F135195%2F1f3a3d76-a462-4475-944a-629b189c2335.png</url>
      <title>DEV Community: Zafar Saleem</title>
      <link>https://dev.to/zafarsaleem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zafarsaleem"/>
    <language>en</language>
    <item>
      <title>My First Open Source Project.</title>
      <dc:creator>Zafar Saleem</dc:creator>
      <pubDate>Tue, 19 Feb 2019 10:52:58 +0000</pubDate>
      <link>https://dev.to/zafarsaleem/my-first-open-source-project-4kd</link>
      <guid>https://dev.to/zafarsaleem/my-first-open-source-project-4kd</guid>
      <description>&lt;p&gt;Developing web sites and apps are fun to do while working as an employee for employer or for clients. However, developing your own product is even more fun. I have been working the first part for sometime now. For the later, after getting plenty of free time lately. I started working on my own project.&lt;/p&gt;

&lt;p&gt;I named this project TimeOff. Ideas are a lot like everybody else some are new others are existing ones. However, I went on choosing the one that already exist. &lt;/p&gt;

&lt;p&gt;This project is all about vacation setter i.e. Employees can easily set vacations with easy to use user interface. &lt;/p&gt;

&lt;p&gt;In this blog post I am going to describe this project. &lt;/p&gt;

&lt;p&gt;The technology stack I used in this project is below.&lt;/p&gt;

&lt;p&gt;Node&lt;br&gt;
Express&lt;br&gt;
Mongodb&lt;br&gt;
React&lt;br&gt;
Redux&lt;br&gt;
Redux saga&lt;br&gt;
React router&lt;/p&gt;

&lt;p&gt;The server side implementation is scalable. All it needs is to keep implementing new services. The whole architecture is divided on below folder structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gajDD_IN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xlbokwywxe8n2dr9tolw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gajDD_IN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xlbokwywxe8n2dr9tolw.png" alt="Server side folder structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The complete repo of this architecture can be found on below repository.&lt;/p&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--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/zafar-saleem"&gt;
        zafar-saleem
      &lt;/a&gt; / &lt;a href="https://github.com/zafar-saleem/NodeScalableArchitecture"&gt;
        NodeScalableArchitecture
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A Scalable Node Architecture/Server. This repository contains a complete implementation of writing scalable nodejs server/architecture on my medium blog.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Node Server that scales / Node Architecture that scales&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://twitter.com/intent/tweet?text=How%20to%20build%20a%20Node.js%20server%20that%20scales&amp;amp;url=https://medium.freecodecamp.org/writing-scalable-architecture-for-node-js-2b58e0523d7f" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/83d4084f7b71558e33b08844da5c773a8657e271/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c" alt="Tweet"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: This is a sample project for my blog on medium which can be found &lt;a href="https://medium.freecodecamp.org/writing-scalable-architecture-for-node-js-2b58e0523d7f" rel="nofollow"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
Get Started&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Clone this repository&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm install&lt;/code&gt; inside its root folder.&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;nodemon index.js&lt;/code&gt; (assuming &lt;code&gt;nodemon&lt;/code&gt; npm package is already installed in your systems)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
Client side for this project&lt;/h2&gt;
&lt;p&gt;To test this project using browser I implemented the client side of this project which is in react and redux. The blog for that could be found &lt;a href="https://medium.com/@zafarsaleem/login-using-react-redux-redux-saga-86b26c8180e" rel="nofollow"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Real world project&lt;/h3&gt;
&lt;p&gt;I developed a complete real world project using this architecture which can be found &lt;a href="https://github.com/zafar-saleem/timeoff-server"&gt;here&lt;/a&gt;. Please go ahead a explore it and leave feedback if you can.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/zafar-saleem/NodeScalableArchitecture"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;The blog on how to write above structure can be found on my medium profile &lt;a href="https://medium.com/@zafarsaleem/writing-scalable-architecture-for-node-js-2b58e0523d7f"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I will explain the parts that focuses on my open source project than from my blog above where details description is provided on how to write that folder structure.&lt;/p&gt;

&lt;p&gt;The controllers. Since every endpoint is a service on its own. Every service has a controller which points to its respective service in services folder. Controllers provides an endpoint to clients and interacts with services to process data.&lt;/p&gt;

&lt;p&gt;A single service is a function or a set of functions. One service can reside in single file or multiple files.&lt;/p&gt;

&lt;p&gt;For example authentication service has one file which has login and registration services. &lt;/p&gt;

&lt;p&gt;Admin has one file and has several services such as creating new employee, fetching employee list, updating employee profile etc. &lt;/p&gt;

&lt;p&gt;Controller is an express route, that exposes API end point to client.&lt;/p&gt;

&lt;p&gt;For more end points and services please go ahead and explore controllers and services folders on above repository.&lt;/p&gt;

&lt;p&gt;Time for client side implementation. Client side is implemented in react and follows the redux state management library pattern. Below is the folder structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VRWkHP1u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6tqhwpu5aoool9970nk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VRWkHP1u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6tqhwpu5aoool9970nk7.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The boilerplate of this project could be found in this repository.&lt;/p&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--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/zafar-saleem"&gt;
        zafar-saleem
      &lt;/a&gt; / &lt;a href="https://github.com/zafar-saleem/react-login"&gt;
        react-login
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A client side implementation of authentication using react.js for my blog on medium. This is the second part of my previous blog on how to implement scalable node.js server.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
User Authentication using react&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://twitter.com/intent/tweet?text=How%20to%20set%20up%20user%20authentication%20using%20React%20Redux%20and%20Redux%20Saga&amp;amp;url=https://medium.freecodecamp.org/login-using-react-redux-redux-saga-86b26c8180e" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/83d4084f7b71558e33b08844da5c773a8657e271/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c" alt="Tweet"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: This is a sample project for my blog on medium which can be found &lt;a href="https://medium.com/@zafarsaleem/login-using-react-redux-redux-saga-86b26c8180e" rel="nofollow"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
Before getting started&lt;/h2&gt;
&lt;p&gt;Before using this project please make sure you get the server side running which can be found &lt;a href="https://github.com/zafar-saleem/NodeScalableArchitecture"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
Get Started&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Clone this repository&lt;/li&gt;
&lt;li&gt;Run npm install inside its root folder.&lt;/li&gt;
&lt;li&gt;run npm start&lt;/li&gt;
&lt;li&gt;Go to &lt;a href="http://localhost:3000" rel="nofollow"&gt;http://localhost:3000&lt;/a&gt; in your browser to see it in action.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
Real World Project&lt;/h3&gt;
&lt;p&gt;I implemented real world project using this architecture which could be found &lt;a href="https://github.com/zafar-saleem/timeoff-app"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/zafar-saleem/react-login"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;It has all the standard redux concepts. Actions folder has list of actions, reducers has reducers list which is divided into admin and employees parts. Components have list of components, sagas have list of sagas and services with all list of services.&lt;/p&gt;

&lt;p&gt;The whole application is divided into two sections admin and employees.&lt;/p&gt;

&lt;p&gt;Admin is the one who controls the whole application and all employees account.     Employees have control over their account and set of vacations they set.&lt;/p&gt;

&lt;p&gt;That is the whole project I developed and made it available open sourced. &lt;/p&gt;

&lt;p&gt;I hope you like and please leave a feed back or make contributions with issues and pull request.&lt;/p&gt;

&lt;p&gt;Below are the links to these projects on my github.&lt;/p&gt;

&lt;p&gt;Client &lt;br&gt;
&lt;/p&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--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/zafar-saleem"&gt;
        zafar-saleem
      &lt;/a&gt; / &lt;a href="https://github.com/zafar-saleem/timeoff-app"&gt;
        timeoff-app
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      TimeOff is an application that allows companies' employees to set vacations before they begin taking their time off. Implemented in modern tech stack i.e. React, Redux, Redux Saga.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h3&gt;
Note&lt;/h3&gt;
&lt;p&gt;This project is no longer maintained on this repository. Please head &lt;a href="https://github.com/timeoffthescheduler/app"&gt;here&lt;/a&gt; for further details and up to date project.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/zafar-saleem/timeoff-app"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;Server&lt;br&gt;
&lt;/p&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--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/zafar-saleem"&gt;
        zafar-saleem
      &lt;/a&gt; / &lt;a href="https://github.com/zafar-saleem/timeoff-server"&gt;
        timeoff-server
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      TimeOff is an application that allows companies' employees to set vacations before they begin taking their time off. Implemented in modern tech stack i.e. Node, Express, MongoDB.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h3&gt;
Note&lt;/h3&gt;
&lt;p&gt;This project is no longer maintained on this link. Please head &lt;a href="https://github.com/timeoffthescheduler/server"&gt;here&lt;/a&gt; for up to date project.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/zafar-saleem/timeoff-server"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;em&gt;Note I wrote a blog post about this project already on freecodecamp but yet to be published. The main idea of this post and that, is the same but the approach of writing them are different. The main purpose of this blog post is to write my own open source project than working for employer or specific client.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>opensource</category>
      <category>productivity</category>
      <category>node</category>
    </item>
  </channel>
</rss>
