<?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>Forem: zain2323</title>
    <description>The latest articles on Forem by zain2323 (@zain2323).</description>
    <link>https://forem.com/zain2323</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%2F824588%2F3875712b-471b-42a6-b330-6bc0fe00e439.png</url>
      <title>Forem: zain2323</title>
      <link>https://forem.com/zain2323</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/zain2323"/>
    <language>en</language>
    <item>
      <title>Symbolic and Hard links in Linux</title>
      <dc:creator>zain2323</dc:creator>
      <pubDate>Tue, 17 Jan 2023 16:40:06 +0000</pubDate>
      <link>https://forem.com/zain2323/symbolic-and-hard-links-in-linux-95l</link>
      <guid>https://forem.com/zain2323/symbolic-and-hard-links-in-linux-95l</guid>
      <description>&lt;p&gt;I am sure you all have used some GUI-based Operating System once in your life and if that is the case then you might be familiar with the concept of shortcuts. They are typically located on your desktop or within a startup window menu. A shortcut is essentially a file that links to your application so you don't have to go to the installation location every time you want to open it.&lt;/p&gt;

&lt;p&gt;In Linux, we can link files to other files, giving us the ability to create our shortcuts. There are two different ways to create links i.e &lt;strong&gt;hard and symbolic&lt;/strong&gt;. They achieve the same purpose but both of them work differently and have their pros and cons.&lt;/p&gt;

&lt;p&gt;In this article, we'll go over both of them, how they differ from one another and why they are useful to know for sysadmins jobs. So, let's get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Inodes
&lt;/h3&gt;

&lt;p&gt;Before we go any further, we need to understand the concept of inodes. We won't be going into depth as it will be the topic for some other time. So, Inodes are data objects that store the metadata regarding files and directories such as time stamps, owner of the file, permissions, last modified date, etc. Inodes are represented by an integer number often times called the inode address.&lt;/p&gt;

&lt;p&gt;To view the inode address, first, create two dummy files and name them &lt;strong&gt;sample-file-1.txt&lt;/strong&gt; and &lt;strong&gt;sample-file-2.txt&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch sample-file-1.txt sample-file-2.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now to view the inode address use the &lt;strong&gt;ls&lt;/strong&gt; command with the &lt;strong&gt;-i&lt;/strong&gt; flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -i

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsmfxdg6qutgch80xkjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsmfxdg6qutgch80xkjy.png" alt="Checking inode address" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, the inode address of both of the files is &lt;em&gt;4203984&lt;/em&gt; and &lt;em&gt;4203990&lt;/em&gt;. The inode address depends upon the filesystem and so it might be different in your case.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are Hard Links
&lt;/h3&gt;

&lt;p&gt;A hard link looks like a new file but points back to the data in the original file. They are duplicate entries, where both entries point to the same data. When you are creating a hard link, you're creating another file that points to the exact same data as the original file. It's just a carbon copy of the original file.&lt;/p&gt;

&lt;p&gt;Now let's go over how to create a hard link&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ln sample-file-1.txt link-1.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, I'm creating a hard link &lt;em&gt;link-1.txt&lt;/em&gt; that is linked to the &lt;em&gt;sample-file-1.txt&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To verify if indeed &lt;em&gt;link-1.txt&lt;/em&gt; points to the &lt;em&gt;sample-file-1.txt&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -i

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fytcwr5bkb1mfx19cd7yc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fytcwr5bkb1mfx19cd7yc.png" alt="Output after creating hard links" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above output, the important thing to note is that &lt;em&gt;sample-file-1.txt&lt;/em&gt; and &lt;em&gt;link-1.txt&lt;/em&gt; have the same inode address which is proof that the hard link that we created points to the original file. With this hard link created, we can move &lt;em&gt;link-1.txt&lt;/em&gt; to another location and it will still work.&lt;/p&gt;

&lt;p&gt;Hard links are very easy to set up and use but this simplicity has its own shortcomings. First, you can only create a hard link for files and not for directories. Secondly, hard links can not be moved to a different filesystem as hard links depend upon the inode address and each filesystem has its own inode address.&lt;/p&gt;

&lt;h3&gt;
  
  
  Soft Links or Symbolic Links
&lt;/h3&gt;

&lt;p&gt;To overcome this limitation, we have another type of link i.e symbolic links or soft links. As you might recall, hard links are duplicate entry that points to the same inode address. But, a symbolic link is an entry that points to another directory or file. This is different from the hard link as it only references a specific path.&lt;/p&gt;

&lt;p&gt;To create a soft link use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ln -s sample-file-2.txt link-2.txt
ls -i

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wfjhzkyax1t0slq4kq1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wfjhzkyax1t0slq4kq1.png" alt="Output after creating soft links" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice that the inode addresses are different. Symbolic links are not duplicate entries of the original file but the new file that points to the original file path. It works exactly in the same way as pointers work in C.&lt;/p&gt;

&lt;p&gt;There are several advantages of using soft links such as it works for both files and directories. You can move soft links to a different file system and it will work as expected as it does not have any dependency on inodes.&lt;/p&gt;

&lt;p&gt;Symbolic links have some limitations as well. As the symbolic link is just a pointer to the original file, if you move the original file or directory to another location, your link will break as the symbolic link won't be able to find the original file path. Another thing to note is that symbolic links don't inherit the original file permissions and this means changes to the original file permissions won't be reflected in a symbolic link.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrap up
&lt;/h3&gt;

&lt;p&gt;As we have covered both hard and symbolic links, you might be wondering which one to use. The main benefit of the hard link is that you can move either the original file or the link to any different location and it will still work. This is not true for the symbolic links as it is just a pointer to the original file location. If you delete the original file, the hard link will still work but the symbolic link will break. The reason is straightforward, hard links are duplicates of the original file while symbolic links are just merely a pointer to the actual file path.&lt;/p&gt;

&lt;p&gt;Taking into account the benefits of hard links versus soft links, you should prefer hard links only when you are sure that you might need to move links to different locations. Otherwise, you should prefer using symbolic links as they work with both files and directories and are filesystem independent.&lt;/p&gt;

&lt;p&gt;This is it for this article, I hope you gained something valuable out of it. If you like this article and would like me to continue writing these types of articles then please give it a thumbs up. If you have any suggestions or questions feel free to use the comment section below.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>How to create a virtual machine using KVM on Ubuntu 22.04 LTS</title>
      <dc:creator>zain2323</dc:creator>
      <pubDate>Mon, 02 Jan 2023 09:02:16 +0000</pubDate>
      <link>https://forem.com/zain2323/how-to-create-a-virtual-machine-using-kvm-on-ubuntu-2204-lts-1aia</link>
      <guid>https://forem.com/zain2323/how-to-create-a-virtual-machine-using-kvm-on-ubuntu-2204-lts-1aia</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Kernel Based Virtualization or KVM&lt;/strong&gt; is an open-source virtualization solution for Linux on x86 hardware containing virtualization extensions. It lets you turn Linux into a type-1 hypervisor that allows a host machine to run many instances of Virtual Machines which are all isolated from each other.&lt;/p&gt;

&lt;p&gt;KVM is a feature built right into the Linux Kernel and we can run Virtual Machines without any third-party solution. Many third-party solutions let us do the same but KVM offers a high-speed interface to the Linux Kernel to run VMs at near-native speeds&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To run KVM, your CPU must support virtualization technology. Most CPUs nowadays support this technology but often it is disabled in the BIOS section so you need to find out a way to enable this by yourself as this varies with every manufacturer.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To check whether your CPU supports virtualization:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

egrep -c '(vmx|svm)' /proc/cpuinfo
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A result of _1 or more_ means that the CPU support    virtualization extensions. A result of _0_ means it does not.
* Alternatively, you can also check whether your CPU supports KVM by:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;kvm-ok&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;In my case the output of this command is:

![KVM-Ok](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/llshn0g6av7qrxjjym01.png)
The output clearly indicates that my CPU supports KVM.
* The default directory for KVM Virtual Machine images is **/var/lib/libvirt/images**.
* Your root file system should have at least **10G** of free space to create a single VM.

**Setting up KVM Server**
KVM is built-in into the Linux Kernel but we still need to install some dependencies. We’ll need to install **libvirt** and **QEMU**. Libvirt gives us access to the virtualization platforms while QEMU emulates the machine’s processor.

So let’s begin installing them
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo apt install bridge-utils libvirt-clients libvirt-daemon-system qemu-&lt;br&gt;
system-x86&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;To verify if everything installed as expected check if the **libvirtd** service is running.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl status libvirtd&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
![Libvirtd service status](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fud98b4w5gf5wsb1may.png)

As you can see libvirt service is currently running but for now, we need to stop this as there is some configuration left.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl stop libvirtd&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Now we need to add two required groups on our machine which are **kvm** and **libvirt**. It might be possible that these groups have already been created by the packages we have just installed. To verify if the groups already exist:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;cat /etc/group | grep 'kvm|libbvirt'&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
![KVM and Libvirtd groups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pa679t6sikw6fssijudz.png)

In my case, both of the groups already exist so I don’t need to create them again.

If the output of the command is empty then this means the groups were not created and you have to now manually create them by running the following commands.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo groupadd kvm&lt;br&gt;
sudo groupadd libvirt&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
The primary user of the system should be the part of these groups. If not, then you can add your user to the required groups. If you don’t know your username, you can use the output of the `whoami` command.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo usermod -aG kvm &lt;br&gt;
sudo usermod -aG libvirt &lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
To let the changes take effect log out and then log in again.

We need to ensure that the users of the kvm group have access to the **/var/lib/libvirt/images** directory. First we’ll add kvm group to this directory.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo chown :kvm /var/lib/libvirt/images&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Now, we’ll set the permissions so that anyone in the kvm group will be able to modify its contents.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo chmod g+rw /var/lib/libvirt/images&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Now we can start the libvirtd service again.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl start libvirtd&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
To verify if the service is running as expected check the status of the libvirtd service.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl status libvirtd&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
![Libvirtd service status after configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6jnm0m4k073fgqo1w6l.png)

## Setting up Virt-Manager
Virtual Machine Manager is a GUI-based utility program that lets us manage our KVM Virtual Machines running either locally or on some remote server.
To install this utility run the following command:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo apt install ssh-askpass virt-manager&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Next open **virt-manager** either through the application windows or simply run `virt-manager` in your shell.

If there is some error while opening virt-manager you can simply ignore it.


![virt manager error while opening it first time](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n0ohnqsljqaxwii2v2wc.png)

## Connect to VM on a remote machine over SSH

&amp;gt; If you are not making a VM on some remote server and using your own local machine then you can skip steps 1–6 and you can directly start by adding ISO in the storage group. If you have configured all of the above steps to set up VM on your local machine then in virt-manager the first connection “QEMU/KVM” is your local host and you can add the ISO in the same way as for the remote connection.


![virt manager main window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nede0csq0j6w2oyr199g.png)

1\. To create a new connection, click on File and then **Add connection**.
2\. A new window will appear where you can add your connection details.
3\. Select the checkbox _Connect to a remote host over SSH_ and fill in the required fields.
4\. You will need to make sure that you are able to SSH into the server correctly otherwise this will not work.
5\. You will also be prompted to enter your server machine password.
6\. After this, you will have a new connection in your virt-manager application.
7\. Now we need to add an ISO image in the storage group so we can install the Operating System.
8\. To create _storage_ group, double-click on your server connection and go to the storage tab.
9\. To add ISO to our storage pool click the _plus_ symbol in the bottom left corner.

![Click green plus icon to create storage group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/73ry1hbrtxxyk3hqn124.png)

10\. In the Name field type _ISO_.
11\. In the _Target Path_ field type /**var/lib/libvirt/images/ISO**.

![Creating storage pool](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4xauz45bt243ump7iud.png)

12\. Click **Finish** to save all the changes.
13\. If you followed all the steps correctly, you will see the storage pool that we just created in the left window pane.


![ISO storage pool in the left window pane](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4v9b99tmq0kjihnr2ej.png)

14\. Now we need to update the permissions in the **/var/lib/libvirt/images/ISO** directory.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo chown root:kvm /var/lib/libvirt/images/ISO&lt;br&gt;
sudo chmod g+rw /var/lib/libvirt/images/ISO&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;15\. One last thing we need to do is just copy the ISO image we need to install in the **/var/lib/libvirt/images/ISO** directory. You can use the `scp` command to copy the ISO image from your local machine to some remote server. If you are following this article on your local machine then you can use the `cp` command to copy the ISO file.

## Creating a virtual machine

1\. In virt-manager, right click on your server connection and click on New to create a new VM.

![Creating new VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0j9ssciwp2bxgbaio4yh.png)

2\. The default selection will be **Local install media (ISO image or CDROM)**, leave this as is and click on **Forward**.

3\.  In the next step, you can select your ISO image from the storage pool. Click on **browse** and on the new window select the **ISO** storage pool in the left pane and you should be able to see your ISO image. If you still are unable to see your ISO images, click on the **refresh** button.


![ISO storage pool](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hfxgje7eq64q2meflp8x.png)

4\. Select the ISO image you wish to install and then click on **Choose Volume**. After this click on **Forward**.

5\. In the next window you can configure the amount of **RAM** you want to allocate to the VM and the number of **CPU** cores. At a minimum, _allocate at least 1GB of RAM and 1 CPU core_.

![RAM and CPU allocation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/526pwdwf0f89p1kte1gn.png)

6\. In the next step you have to allocate the _amount of storage_. You can change this according to your requirements.


![Allocating storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbzj6gekj9x2180zgg8y.png)

7\. In the next step you have to give a _name_ to your VM.

![Giving VM name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gkodrznijw3ni8w1znv.png)

8\. Finally, click on **Finish**. After this, your VM will automatically boot into the installation menu of the Operating System. You can then follow the installation process of your VM’s operating system.

This is it for now. I hope you have found the article useful and if so please give it a like. If you have any confusion then feel free to ask.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>linux</category>
      <category>kvm</category>
      <category>ubuntu</category>
      <category>devops</category>
    </item>
    <item>
      <title>Doctorly API ~ A backend solution for appointing doctors online</title>
      <dc:creator>zain2323</dc:creator>
      <pubDate>Mon, 29 Aug 2022 17:33:48 +0000</pubDate>
      <link>https://forem.com/zain2323/doctorly-api-a-backend-solution-for-appointing-doctors-online-ipn</link>
      <guid>https://forem.com/zain2323/doctorly-api-a-backend-solution-for-appointing-doctors-online-ipn</guid>
      <description>&lt;h3&gt;
  
  
  Overview of My Submission
&lt;/h3&gt;

&lt;p&gt;Obtaining an appointment with a doctor for a checkup is commonly observed to be time consuming and demanding. Usually, there are already booked slots and long waiting lists, so going to the hospital or clinic goes in vain. A patient may be late for a new appointment for any reason, and the slot may be filled by someone else.&lt;/p&gt;

&lt;p&gt;A proposed solution is to have a complete backend system that can manage booking slots in advance, patient's appointment history and much more. By utilizing this API, a user can check the available slots for a doctor he wishes to see, from home. The patient does not have to stand in long lines to learn about the doctor's expenses or know the free slots or to get an appointment. All of this can be done from any client application that can consume this API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technical Overview
&lt;/h3&gt;

&lt;p&gt;I have used Flask Framework with PostgreSQL as a primary database with Redis as a caching solution on top of PostgreSQL to avoid querying data again and again. When the user will request the data, it will be first searched in the cache and if it happens to be the cache hit, then it will be returned to the client without querying the database and hence overall performance will be improved. In the cache miss, the requested data will be returned to the user by querying the database. The data will be cached in the Redis database to save time if the user requests the same thing again. All the data in the Cache will automatically expire after a particular amount of time.&lt;/p&gt;

&lt;p&gt;To provide search functionality, I have used Redis JSON and RediSearch modules. The client application can search the doctors by name, specializations, qualifications and by day. Important thing to note here is that not all of the data that is saved in relational database is replicated in Redis JSON but only the data that is related to the doctor is replicated. The data in Redis JSON is kept in sync with the relational database to avoid providing inaccurate search results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pKFN24B5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehjty2agqy7ztq6a7p2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pKFN24B5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehjty2agqy7ztq6a7p2z.png" alt="System Architecture" width="611" height="829"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;User registration, login and logout&lt;/li&gt;
&lt;li&gt;Search functionality to search for doctors by different attributes&lt;/li&gt;
&lt;li&gt;Separate endpoints for Doctor like registration and creation of profile.&lt;/li&gt;
&lt;li&gt;Complete appointment history of the patients&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Future Expansions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Email recovery and password reset support.&lt;/li&gt;
&lt;li&gt;Real time Notifications.&lt;/li&gt;
&lt;li&gt;More advanced search functionality.&lt;/li&gt;
&lt;li&gt;A client application that consumes this API&lt;/li&gt;
&lt;li&gt;Integration of rating service.&lt;/li&gt;
&lt;li&gt;Patient's prescription, recommended diet plan, next appointment date, reminders about workout and much more.&lt;/li&gt;
&lt;li&gt;A robust recommendation service so that the patients always get the most reliable doctors on the home screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;p&gt;MEAN/MERN Mavericks&lt;/p&gt;

&lt;h3&gt;
  
  
  Language Used
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Flask Framework&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Redis Features Used
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Redis as a Cache&lt;/li&gt;
&lt;li&gt;Redis JSON&lt;/li&gt;
&lt;li&gt;RediSearch&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Link to Code
&lt;/h3&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--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/zain2323"&gt;
        zain2323
      &lt;/a&gt; / &lt;a href="https://github.com/zain2323/docterlyapi"&gt;
        docterlyapi
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Backend for the doctor's appointment application
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Doctorly API&lt;/h1&gt;
&lt;p&gt;Obtaining an appointment with a doctor for a checkup is commonly observed to be time-consuming and demanding. Usually, there are already booked slots and long waiting lists, so going to the hospital goes in vain, especially in post-Covid time.&lt;/p&gt;

&lt;p&gt;I devised a solution to these issues. Utilizing this backend system, any client application, be it web-based or mobile can be made that provides the solution to the above issues.&lt;/p&gt;

&lt;h3&gt;
Home Page&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/zain2323/docterlyapi/assets/doctorly_home.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hhSUi9e5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/zain2323/docterlyapi/assets/doctorly_home.png" alt="Api Home Page"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Register Page&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/zain2323/docterlyapi/assets/doctorly_register.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--duUF5GOG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/zain2323/docterlyapi/assets/doctorly_register.png" alt="Api Register Page"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Sign in Page&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/zain2323/docterlyapi/assets/doctorly_auth.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OQxpgsU_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/zain2323/docterlyapi/assets/doctorly_auth.png" alt="Api Auth Page"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Slots Page&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/zain2323/docterlyapi/assets/doctorly_slots.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--saBzn6Sa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/zain2323/docterlyapi/assets/doctorly_slots.png" alt="Api Slots Page"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Redis Cached data&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/zain2323/docterlyapi/assets/doctorly_cache.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2J6hHYay--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/zain2323/docterlyapi/assets/doctorly_cache.png" alt="Api cache"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
How it works&lt;/h2&gt;
&lt;p&gt;Let's first understand the application architecture&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Client will request the data from the REST API.&lt;/li&gt;
&lt;li&gt;The API will first check the requested data in Redis Cache&lt;/li&gt;
&lt;li&gt;If a cache hit occurs, it will directly return the data to the client.&lt;/li&gt;
&lt;li&gt;If the API did not find the requested data in Redis Cache, then it will issue the query to the relational database. Upon the…&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/zain2323/docterlyapi"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
 to share a GitHub repository)

&lt;p&gt;BTW, your Github code’s README file should contain the details as &lt;a href="https://github.com/redis-developer/hackathon-docs/blob/main/README.md"&gt;per this template&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Home Page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9VL3kIl8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tutw3j9qj979qkiehrlq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9VL3kIl8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tutw3j9qj979qkiehrlq.png" alt="Home Page" width="880" height="367"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User Registration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yUO_xAtB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9xw78rinpgouadm4t4e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yUO_xAtB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9xw78rinpgouadm4t4e.png" alt="User Signup" width="879" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Check out &lt;a href="https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries"&gt;Redis OM&lt;/a&gt;, client libraries for working with Redis as a multi-model database.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Use &lt;a href="https://redis.info/redisinsight"&gt;RedisInsight&lt;/a&gt; to visualize your data in Redis.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Sign up for a &lt;a href="https://redis.info/try-free-dev-to"&gt;free Redis database&lt;/a&gt;.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>redishackathon</category>
    </item>
    <item>
      <title>How to transfer your files from iOS to Linux</title>
      <dc:creator>zain2323</dc:creator>
      <pubDate>Wed, 03 Aug 2022 08:32:00 +0000</pubDate>
      <link>https://forem.com/zain2323/how-to-transfer-your-files-from-ios-to-linux-3mig</link>
      <guid>https://forem.com/zain2323/how-to-transfer-your-files-from-ios-to-linux-3mig</guid>
      <description>&lt;p&gt;Are you a fan of both Linux and IOS? If Yes, then you must have encountered the problem of sharing your files between these two different operating systems. Of course, there are services like airdrop but it only works within the Apple ecosystem. Windows users can use iTunes to transfer their files but Apple does not provide any dedicated software for Linux users.&lt;/p&gt;

&lt;p&gt;There are multiple ways of transferring your data but in this article, we’ll do it wirelessly using a protocol known as SSH or Secure Shell.&lt;/p&gt;

&lt;p&gt;You don’t need to know any intrinsic details about how SSH works under the hood for this article so don’t go anywhere if you find SSH to perplexing. You will need to use the terminal along the way but I promise, you will need to paste a few commands and we will be done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite
&lt;/h2&gt;

&lt;p&gt;Before proceeding forward make sure your iOS and Linux device is on the same Local Area Network or else this method will not work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find out your username and IP address
&lt;/h2&gt;

&lt;p&gt;The first thing you need to find is your IP address and username. Be sure to note it down somewhere as you will need it later.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To find out your IP address type the below command in your terminal.
```
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ifconfig&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- For username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;whoami&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
![Image displaying the command for finding out ip address and username](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a4sscoiaf3bt3anppems.png)

## Setting up SSH-Server
Now we will install and configure SSH server which is a command line utility that allows the user to remotely control any Linux machine.

- To install it on Fedora based distributions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo dnf install openssh-server&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- To start the ssh-server in the current session, run the following command in your shell.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl start sshd.service&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Once done, make sure if the status of the server is enabled.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl status sshd.service&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- To enable the server to automatically start at boot time, run the below command.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl enable sshd.service&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- If you want to stop the server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo systemctl stop sshd.service&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
![Image displaying output of all the above programs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9my19emxk2hy8n30l5bg.png)

## Setting up SFTP on iOS device
Now everything is ready on your Linux machine and you need to take out your iOS device and head over to the App Store to install **FE File Explorer**.

This application has both free and paid versions but the free version will be sufficient for our use case.

- Now open the app and find + icon and tap on it.

![Image displaying the plus icon on FE file explore application](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0y4xovw8ahgrbb3s67ok.jpeg)

- A new connection window will pop up and tap on the SFTP icon.
- A new display window will open. This window will be having a lot of fields but we will need to fill only a few of them.
- In the **Hostname/Ip** section, enter your **IP address** which we have previously found.
- Now in the **Connect As** section, enter your Linux machine **username** and **password**.
- Finally save all the settings.

![Image displaying the new connection details](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jais592qprie23a4qsug.jpeg)

Now tap on your newly created connection and this will establish an SFTP connection between your iOS device and Linux machine. If you did everything right till this point, then you can access all of your Linux machine files and you can transfer your data back and forth between your iOS and Linux device.

![Image displaying the newly created connection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emr5gl8y6rwxr4anis5i.jpeg)

If you found this article helpful then please give it a clap and feel to free ask any questions if you have any confusion.


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>linux</category>
      <category>ios</category>
      <category>data</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Prize Bond Drawer - The Lottery Managment System 🤑 💶 💰</title>
      <dc:creator>zain2323</dc:creator>
      <pubDate>Tue, 08 Mar 2022 15:08:30 +0000</pubDate>
      <link>https://forem.com/zain2323/prize-bond-drawer-the-lottery-managment-system-52i1</link>
      <guid>https://forem.com/zain2323/prize-bond-drawer-the-lottery-managment-system-52i1</guid>
      <description>&lt;h2&gt;
  
  
  Overview of My Submission
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Background 🕵️‍♂️
&lt;/h3&gt;

&lt;p&gt;I always wanted to have my lottery management web application since all of the existing ones are either too bloated or aren't that user-friendly. But I was just delaying the project because it wasn't the need of the hour. Fortunately, I wasn't able to further procrastinate my idea as Dev.to announced the Microsoft Azure Hackathon, and I immediately started working on it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Description 📋
&lt;/h3&gt;

&lt;p&gt;Prize Bond Draw is a web application for managing prize bonds which are a unique method of investment that are essentially lotteries backed by the government. This project enables the end-user of the application to effectively manage their prize bonds and ease the hassle of manually searching their serials when the result is announced. &lt;/p&gt;

&lt;h3&gt;
  
  
  Technical Overview 🧑‍💻
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;It is a full-stack web application made with Flask Microframework.&lt;/li&gt;
&lt;li&gt;For persistent data storage, I have used the Postgresql database.&lt;/li&gt;
&lt;li&gt;The User Interface is built with Html/CSS and Bootstrap V5.0.&lt;/li&gt;
&lt;li&gt;Supports role-based mechanism to authorize the users:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Admin&lt;/code&gt; Can add denominations and their respective prizes, update the winning list and announce the notifications to all the users. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;User&lt;/code&gt; Can store their bond serials and check the results of either all of their serials or by entering any particular serial.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;For CI/CD 🚀 I have used &lt;a href="https://github.com/features/actions"&gt;Github Actions&lt;/a&gt; to deploy automatically to Azure VM. Check out the &lt;a href="https://github.com/zain2323/prizebond-draw/blob/main/.github/workflows/workflow_deploy.yml"&gt;workflow script&lt;/a&gt; to know more about it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Features ✨
&lt;/h3&gt;

&lt;p&gt;✅ The application supports all CRUD operations.&lt;br&gt;
✅ Easy to use and user-friendly.&lt;br&gt;
✅ Keep all the users updated about the latest result announcements with the notifications 🔔.&lt;br&gt;
✅ Supports email confirmation and password resetting.&lt;br&gt;
✅ All of the user-related data is saved securely 🔐 in the Postgres database.&lt;br&gt;
✅  The application is deployed on Microsoft Azure so you can trust the security 💯.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Most Important Feature 🤩
&lt;/h3&gt;

&lt;p&gt;The most important feature that I'm proud of 😎 is the text extraction from the bond picture. For that, I have used Microsoft Azure Optical Character Recognition API. Thus enabling the user to add the serial just by uploading the picture of the bond. See Appendix for some sample bonds so that you can try yourself 🥰.&lt;/p&gt;
&lt;h3&gt;
  
  
  Dashboards
&lt;/h3&gt;

&lt;p&gt;As stated previously, there are two distinct roles the web application supports. So there are two dashboards one for the admin of the application, and the other for the user.&lt;/p&gt;
&lt;h4&gt;
  
  
  The Admin Dashboard 👨‍🔧
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;To view the admin dashboard login with the following credentials.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Email:&lt;/strong&gt; &lt;a href="mailto:admin@admin.com"&gt;admin@admin.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password:&lt;/strong&gt; testing123&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The admin is responsible for uploading the latest results, announcing the notifications, adding denominations and their respective prizes.&lt;/li&gt;
&lt;li&gt;The admin has the privilege to access all the data including serials, denominations, prizes, and of users too but is restricted to modify any of the user-related data.&lt;/li&gt;
&lt;li&gt;Any of the data can be searched and filtered which is a must-have feature in today's ever-growing data.&lt;/li&gt;
&lt;li&gt;Winners lists usually contain many records and it would be too hectic to upload them manually so the admin can upload the list directly from the file.&lt;/li&gt;
&lt;li&gt;One thing to keep in mind while uploading the data from the file is that the application requires the file to be formatted in a certain way. See appendix for a demo file.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  The User Dashboard 👨‍🦰
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;To view the user dashboard, create an account first.&lt;/li&gt;
&lt;li&gt;Be sure not to use any invalid email as you will need to confirm your email.&lt;/li&gt;
&lt;li&gt;The recommended way is to get a temporary email from &lt;a href="https://temp-mail.org/en/"&gt;temp-mail&lt;/a&gt; and don't use your personal email as anyone can access the admin account and can see your email.&lt;/li&gt;
&lt;li&gt;I have created some demo accounts for testing so you can use those for testing. See appendix for more details. &lt;/li&gt;
&lt;li&gt;The user can add or remove their serials and check their results to see if they have won any prize.&lt;/li&gt;
&lt;li&gt;Users can also change their name, email and password if they want to.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;p&gt;Computing Captains&lt;/p&gt;
&lt;h3&gt;
  
  
  Azure Services Used
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Azure Virtual Machine&lt;/li&gt;
&lt;li&gt;Azure Optical Character Recognition Api&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Azure Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g1g7aUcG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0u29biss2xb23tjus5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g1g7aUcG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0u29biss2xb23tjus5g.png" alt="Image description" width="880" height="262"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Link to Code on GitHub
&lt;/h3&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--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/zain2323"&gt;
        zain2323
      &lt;/a&gt; / &lt;a href="https://github.com/zain2323/prizebond-draw"&gt;
        prizebond-draw
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A web-application developed for the Microsoft Azure Trial Hackathon hosted by https://dev.to/ 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Prizebond Drawer&lt;/h1&gt;
&lt;h1&gt;
📜 Project Description&lt;/h1&gt;
&lt;p&gt;Prize Bond Draw is a web application for managing prize bonds which are a unique method of investment that are essentially lotteries backed by the government.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;This is a full stack web application that supports all the CRUD operations.&lt;/li&gt;
&lt;li&gt;Supports role based mechanism to authorize the users
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Admin&lt;/code&gt; Can add denominations and their respective prizes, update the winning list and announce the notifications to all the users.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;User&lt;/code&gt; Can store their bond serials and check the results of either all of their serials or by entering any particular serial.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;One unique feature is that you can add your bond serial by just uploading their picture.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you would like to read more about how prize bond works then check out this link &lt;a href="https://profit.pakistantoday.com.pk/2021/08/01/all-you-need-to-know-about-government-prize-bonds/" rel="nofollow"&gt;Prize Bond&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;NOTE: I have made this website in accordance with how the prize bond works in Pakistan only and I am…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/zain2323/prizebond-draw"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Demo
&lt;/h3&gt;

&lt;p&gt;Want to test every feature yourself? Yeah sure, definitely check it out and don't forget to give your honest review.&lt;br&gt;
👉 &lt;a href="http://prizebond-draw.centralindia.cloudapp.azure.com/"&gt;Prize Bond Draw&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Admin Panel Screenshots 🥳 🔥
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Denominations&lt;/strong&gt; 💵&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---q-jO-Y_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3jsx621zyzhunm5d1iq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---q-jO-Y_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3jsx621zyzhunm5d1iq.png" alt="Image description" width="880" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prizes&lt;/strong&gt; 🎁&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XNNEYmtl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ys0fi9p74y8ms9aorfb9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XNNEYmtl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ys0fi9p74y8ms9aorfb9.png" alt="Image description" width="880" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Winners List&lt;/strong&gt; 📜&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OIODKtfz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jaueriicjg0hhevfv74.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OIODKtfz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jaueriicjg0hhevfv74.png" alt="Image description" width="880" height="744"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adding Winner's Records Through File&lt;/strong&gt; 📑&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u7mwPxxK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/shx0csqfm0pe2a5wt57f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u7mwPxxK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/shx0csqfm0pe2a5wt57f.png" alt="Image description" width="880" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sending Out Notifications&lt;/strong&gt; 📯&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8aZixUax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rwe5pg4b5ztg1027wcr4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8aZixUax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rwe5pg4b5ztg1027wcr4.png" alt="Image description" width="880" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  User Panel Screenshots 🥳 🔥
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Home Screen&lt;/strong&gt; 🏠&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zael6NCR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ce46mslr4hsnm343fg3m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zael6NCR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ce46mslr4hsnm343fg3m.png" alt="Image description" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Account Info&lt;/strong&gt; ℹ️&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ucxrx3VQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dmwegx4gooxka42pob4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ucxrx3VQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dmwegx4gooxka42pob4.png" alt="Image description" width="880" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Result Window&lt;/strong&gt; 🎀📦&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DlH1nC68--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/472mzugagiui5pdi1zje.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DlH1nC68--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/472mzugagiui5pdi1zje.png" alt="Image description" width="880" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Appendix
&lt;/h3&gt;

&lt;p&gt;✅ Some pre-created accounts for testing:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;S.No&lt;/th&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;th&gt;Password&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:admin@admin.com"&gt;admin@admin.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;testing123&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:guvejyli@ryteto.me"&gt;guvejyli@ryteto.me&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;testing123&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:kidiy79527@xindax.com"&gt;kidiy79527@xindax.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;testing123&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;✅ Check out this 👉 &lt;a href="https://github.com/zain2323/prizebond-draw/tree/main/test_data/sample_winner_data"&gt;link&lt;/a&gt; for some pre-made test data files for updating the winners list. Only this format works while updating the winners list. Use of any other format might not work.&lt;br&gt;
✅ Check out this 👉 &lt;a href="https://github.com/zain2323/prizebond-draw/tree/main/test_data/sample_bonds"&gt;link&lt;/a&gt; to get some sample bonds.&lt;/p&gt;

&lt;p&gt;I hope you liked my project 🤗. If you have any kinds of questions or opinions then please don't hesitate to post them in the comments section.&lt;/p&gt;

&lt;p&gt;Till then Good Bye. 🙋‍♂️🙋 &lt;/p&gt;

</description>
      <category>azuretrialhack</category>
      <category>flask</category>
      <category>python</category>
      <category>postgres</category>
    </item>
  </channel>
</rss>
