<![CDATA[Thoughts, stories and ideas.]]>//favicon.pngThoughts, stories and ideas./Ghost 4.10Fri, 27 Aug 2021 06:43:40 GMT60<![CDATA[Problems faced while creating comments section with a tree like data structure]]>/problems-faced-while-creating-comments-section-with-a-tree-like-data-structure/612855dd62b60102fc4f9544Fri, 27 Aug 2021 03:05:07 GMTIf anyone faces the same problems and want me to write the actual implementation DM me on [twitter]() my DM's are openProblems faced while creating comments section with a tree like data structure

While working on my dev.to clone in Angular I came across the comments section which can be very tricky to render. As it has a tree like structure which can go infinitely.

├── comment
│   ├── comment ─── comment
│   │   └── comment
│   ├── comment
│   ├── comment ─── comment ─── comment
│   │   └── comment ─── comment ─── comment
│   └── comment
├── comments
│   ├── comment ─── comment
│   │   └── comment 
│   └── comment 
├──── comment
│   ├── comment
│   └── comment
└──── comments

Rendering comments

We never know the actual structure of the comments. I looked closely at the structure and I saw its just like recursion the same component is calling the same component. So I tried that and it worked.

I passed the comments array to a component and it renders it with a ngFor after I call the same component pass to it its children and go about that again and again. You can

Spacing comments

Next problem was CSS I wanted to add space before each comment when it goes to the next level but after 4 levels we need to stop adding spaces in comments other wise there will be no space for comments. Here we have one advantage aver the above problem we know the level after which we want to remove the CSS if we don't try to make it generic we can just do

.app-comments .app-comments .app-comments .app-comments {
    padding-left: 0;
 }

using specificity we can take advantage of us knowing the level at which to remove padding.

Toggling functionality

If we use any library managing state of such a structure can be a night mare. I used the native details html tag which comes with the toggling functionality in built and we need not manage any state this is the point where I realize how powerful these structures can be.

State problems

Working with the details tag was great but I needed the state of it closing and opening in the template. To show and hide some data whenever the state changes. To do that and not manage any state I thought of using template variables and @ViewChild but failed miserably managing state at each level of an Array of dynamic length array was really hard which is changing its state I have to manage a tree like state for components to to mitigate this I thought lets completely keep the state in the template and I used the same template variable and use the native open property on details element to show and hide elements but nothing was happening. I really tried everything but the open property never changed in the template.

Ngzone problem

So I got to know that on open close of detail HTML element a toggle event is generated and zone.js has not monkey patched the toggle event. What a pain when you expect something to work in the frame work and it does not work and you need to have deep understanding of the frame to solve it and if if you have a good amount of knowledge you can't solve it. To resolve this I imported ChangeDetectorRef and detectChanges on when the toggle event happens.

]]>
<![CDATA[Updates on dev.to clone in Angular - August 27]]>/updates-on-dev-to-clone-in-angular-august-27/612845c162b60102fc4f951fFri, 27 Aug 2021 01:56:26 GMTHelp me improve these updates by giving suggestions.Updates on dev.to clone in Angular - August 27

Github Repo -

Deployed on Firebase -

Last week we finished details page, article section and basic comments section.

Updates on dev.to clone in Angular - August 27

This week I added the complete comments section. It was one the most complex tasks while building the dev.to ui. The comments structure is a bit complex to render. Comments contain a key called children which can again contain comments so it was like a tree like structure.

├── comment
│   ├── comment ─── comment
│   │   └── comment
│   ├── comment
│   ├── comment ─── comment ─── comment
│   │   └── comment ─── comment ─── comment
│   └── comment
├── comments
│   ├── comment ─── comment
│   │   └── comment 
│   └── comment 
├──── comment
│   ├── comment
│   └── comment
└──── comments

How to render an infinite tree. Then I called the comment component from the comment component. To create a recursion like scenario which will render the entire component tree. I've written details about it in this .

has also added
commit lint to the repo so that reading the commit messages is easy. I'm thankful for that.

First Live stream

I also did my first live stream with on moving over our app from angular-cli to NxDevTools we did the basics in the stream and I went over a lot of questions that I have to why Nx if you want to see how to move your project over Nx please follow us on
we will be migrating the whole dev.to clone to Nx over the live stream. This was my first talk I was a bit nervous but Santosh made me at ease. Thanks Santosh.

So this is where we are right now.

Updates on dev.to clone in Angular - August 27

Next week I'll start working on the podcast page.

Issue

Commits

]]>
<![CDATA[Built my first MVP never thought this will happen so fast]]>I've started a service on providing a software for community building . This is my website for providing the services . I need feedback on how I can improve this. It is raw right now but I have learnt my lesson to never go after perfection and

]]>
/built-my-first-mvp-never-thought-this-will-happen-so-fast/6121bfd362b60102fc4f9515Sun, 22 Aug 2021 03:09:53 GMTI've started a service on providing a software for community building . This is my website for providing the services . I need feedback on how I can improve this. It is raw right now but I have learnt my lesson to never go after perfection and start first and iterate upon it. Iterations are the key you are never good at anything when you start but you keep getting good at it and and when you keep going.

I now need to know how I'll market this. I'm very bad at marketing. So, I'll need all the help I can get. I am thinking of releasing it on product hunt and posting about it on communities. If you know any communities that help in building communities please let me knew in the comments down below.

My first service I never thought if I start I'll get this far but here I'm am so to anyone who is going t start something I'll say start today. You will reach far after you start. Don't go after perfection

]]>
<![CDATA[Updates on Dev.to clone in Angular - August 20]]>/updates-on-dev-to-clone-in-angular-august-20/611f219962b60102fc4f94e4Fri, 20 Aug 2021 03:33:26 GMTHelp me improve these updates by giving suggestions.Updates on Dev.to clone in Angular - August 20

Github Repo -

Deployed on Firebase -

Last week we added details page but did not style the middle articles portion.

Updates on Dev.to clone in Angular - August 20

This week I added the article section CSS and added basic comments the comments section. Is on a different branch so will not deployed right now.

We have new contributors too who is building the videos detail page did a great job she has already completed it added infinite scroll and made everything responsive too she has already completed her work but there are some small changes after that her work would be merged. To have a look you can have a look at her and let me give you a sneak peek.

Updates on Dev.to clone in Angular - August 20

This week I had a lot of problems with the CSS because the article body was injected and I still could not do the code highlighting properly. It was really really tiring.

I also resolved other small bugs added GitHub action for deployment on main branch. Lets talk about the small bugs earlier the reactions section was static I added the reactions store so that they are dynamic but there is no reaction api provided by the dev.to/api it so lets see if this is going to be a problem as its structure can change anytime because of no support.

I also ran into the grid overflow problem mostly grid automatically takes the free space using fr units but some elements in it does not play well. I came to know about this . It was a tricky problem because I put an hour into fixing my inner code blocks but the problem was with the grid.

Adding the GitHub action was fun I have with CI/CD but only on Gitlab I didn't think it would be this different adding actions for other repos seems a weird concept to me but maybe it grows on me. Lets have a look at the GitHub action.

# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the main branch
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch: 

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  firebase-deploy:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2
      # Setup node version which this action will run
      - uses: actions/setup-node@master
        with:
          node-version: '14.x'

      # Install node_modules as we don't push them
      - run: npm install
      # Build our angular app
      - run: npm run build
      # Firebase action to deploy. Still don't fully understand this concept
      - uses: w9jds/firebase-action@master
      # With what arguements will this action run
        with:
          args: deploy --only hosting --project dev-toclone
      # Environment variables with which you want to run your job. To keep them a secret you can set in your repository secrets 
        env:
          FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

Let me give you the sneak peek of the newly created comments section too this is going to be hard as the way comments are but we are going to use recursion here to render out all the comments. That is going to interesting you will see a new pattern of rendering these types of structures.

Updates on Dev.to clone in Angular - August 20

 Current Status three branches :-

- This branch contains the Homepage, Article-detail with comments, Listing page

- This branch contains the comments section of the article detail page

-  This branch contains the videos section

Discussions

I've started a new discussion weather we should move the project to Nx on main branch or keep it on angular-cli. Would love to hear everyone's opinion.

Issue

Commits

This time I won't add all the commits there are many I "ll highlight the most useful

Next time I'll finish the comments section. if anyone wants to contribute they can connect on twitter with me my handle is my DM's are open or on github.

]]>
<![CDATA[Dynamo DB - Hands On]]>/dynamo-db-hands-on/611ef76b62b60102fc4f94b5Tue, 17 Aug 2021 00:30:00 GMTTo create a new dynamo DB table follow the instructions below:-

  • Go to the DynamoDB service. Click on create table.
Alt Text
  • Add table name and primary key. For example I used TutTable as name and id as the primary key. Click on create.
Alt Text
  • Now you will see a screen with details of Dynamo DB table
Alt Text
  • Now we will add some items to see how DynamoDB works. To do that go into items tab and click create item
Alt Text
Alt Text
  • Add some fields like name, gender. To add click the plus symbol do append and add the type of data you want to add and click on save. So you added an item to your database
Alt Text
Alt Text
  • Create another item and this time just add the id. you need not all all fields his is how NoSql database work.
Alt Text
  • You will see two items with different data
Alt Text
  • After that delete the table. So, that there are no additional charges.
Alt Text

Next we will study about some more databases available in AWS for various other use cases.

]]>
<![CDATA[Databases in AWS - DynamoDB]]>DynamoDB is NoSql, key-value, document database that delivers to massive workloads. It is a distributed, fully managed, server less database that can scale to millions of requests per second and trillions of entries and 100's of TB in storage. Many of the world's fastest growing businesses

]]>
/databases-in-aws-dynamodb/611c568162b60102fc4f949fMon, 16 Aug 2021 00:40:00 GMTDynamoDB is NoSql, key-value, document database that delivers to massive workloads. It is a distributed, fully managed, server less database that can scale to millions of requests per second and trillions of entries and 100's of TB in storage. Many of the world's fastest growing businesses such as Lyft, Airbnb, and Redfin as well as enterprises such as Samsung, Toyota, and Capital One depend on the scale and performance of DynamoDB to support their mission-critical workloads.

What is a key-value Database?

A key-value database is a type of nonrelational database that uses a simple key-value method to store data. A key-value database stores data as a collection of key-value pairs in which a key serves as a unique identifier. Both keys and values can be anything, ranging from simple objects to complex compound objects. Key-value databases are highly partitionable and allow horizontal scaling at scales that other types of databases cannot achieve. For example, Amazon DynamoDB allocates additional partitions to a table if an existing partition fills to capacity and more storage space is required.

Advantages of using Dynamo DB

  1. Scalability- It can scale to trillions of requests and 100's of TB of data without any intervention as it is a serverless database.
  2. High availability - data is highly available as everything is replicated across 3 AZ.
  3. Low latency - It gives a single digit low latency in microseconds
  4. Pay as use- You only for the storage and network requests you fulfill
  5. IAM - Its fully integrated with IAM which provides you full control of each user for security authorization and administration.
  6. Automatic Backups - You can go to any point in the preceding 35 days with no downtime.

DynamoDB Accelerator (DAX)

Millisecond latency is too slow for some mission critical apps. If you want performance improvement you can use Dax which use caching to improve performance many times. It is  a fully managed in memory cache service for Dynamo DB.

]]>
<![CDATA[2 products in 6 months]]>/2-products-in-6-months/61188111c6aedf02ed7929e9Sun, 15 Aug 2021 02:52:22 GMT

I'm starting a new challenge of building 2 products in 6 months. Earlier I always used to postpone building new products to find the perfect opportunity but now I think at least I should make myself ready when the perfect opportunities arrive or make the perfect opportunity myself. Taking ideas in my head to actual products will help a lot in it. I am afraid to start I have nothing to lose still I'm afraid I don't know of what. So, lets try this and see where this goes.

I'll post updates on Saturday and Sunday if anyone is interested. Holding my breath to see what comes of it.

]]>
<![CDATA[Updates on Dev.to clone in Angular - August 13]]>/updates-on-dev-to-clone-in-angular-august-13/61161d12c6aedf02ed7929c8Fri, 13 Aug 2021 07:20:52 GMTHelp me improve these updates by giving suggestions.Updates on Dev.to clone in Angular - August 13

Github Repo -

Deployed on Firebase -

Last week we added basic details page.

Updates on Dev.to clone in Angular - August 13

This week I added user details and a reaction section in article details. There is no API for adding reactions to actual dev.to site so the reactions component is read-only for now.

This week I have good news did the listings page for us. I am really happy this is a first opensource contribution in my project. Thanks Chellapan

Updates on Dev.to clone in Angular - August 13

He implemented the masonry layout in this and next I'll write how he implemented the masonry layout.

Now back to my work this time added a global component store for user details in the article-details component. I also had a lot of problems with the layout of the page the layout was not working correctly whatever I set in the grid-template-columns but after putting a lot of time in it I realized its just that article details content is not working correctly either the image was bigger then the body or the code-snippets were. I was really tired of this, to solved this problem my mind told so what is not styled the details content. This made me realize that the problem should be there. Then I checked and then there it was so for now I made images with width 100% and its working  fine for now. This is where we are now.

Updates on Dev.to clone in Angular - August 13
Updates on Dev.to clone in Angular - August 13


Next week I'll style article details and on the comments section.

Issue

  • The article section is really getting on my nerves. Making so many stores for articles is annoying.
  • Moving it to Nx. I've heard a lot about Nx this will be my first Nx project.

Commits done

As you can see a lot of content was added. Now we will soon dive into improving it more using Nx and Tailwind once we finish the basic application.

]]>
<![CDATA[Setup AWS Relational Databases - RDS Hands On]]>/setup-aws-relational-databases-rds-hands-on/611ef86f62b60102fc4f94c2Tue, 10 Aug 2021 00:35:00 GMTLast time we studied about databases now we create a RDS database in AWS. To create a RDS database follow the steps:

  • In search bar type RDS. Select a service named RDS
Alt Text
  • Then select databases. There click on create database
Alt Text
Alt Text
  • For this tutorial we would do a standard create in easy create there are some configured options that makes it really easy to create a DB. Select MySql in database engine. You can select the version too but right now I'll choosing the latest default version.
Alt Text
  • Select the free tier in templates or select the option if you need to deploy the DB in prod or test as needed.
Alt Text
  • In the settings setup database name, username and password as needed. I've set the db name as database-1, username as admin, password as password
Alt Text
  • Select the instance because of free tier we only have a t2.micro available
Alt Text
  • In storage select storage type as general purpose SSD with 20 GB storage as it is available in the free tier. Uncheck enable auto scaling as this is a test instance if in production enable it as the storage will automatically be increased as needed.
Alt Text
  • You can also select multi AZ deployments if you are using it for production but it is not available in the free tier.
Alt Text
  • In connectivity select the VPC you want and subnets we will study about them in detail some other time, for now select the default ones and no need to change anything in this section defaults work just fine.
Alt Text
  • In authentication we will select password auth and in the costs you will see that this is in the free tier change settings from free tier to something else and you will see the monthly costs.
Alt Text
Alt Text
  • Click on create database. This will create our DB.
Alt Text
  • Don't forget to delete your Db if you are dong this as an exercise as it may cost you money with all the backups

So we have created our database we can use it now, we see how easy it was to setup a new DB in AWS if we would have done it on our own with backups, monitoring etc. It would have taken us a 1-2 days. Next we will study about Dynamo DB.

]]>
<![CDATA[Databases in AWS - RDS and Aurora]]>/databases-in-aws-rds-and-aurora/611ef96662b60102fc4f94d2Mon, 09 Aug 2021 00:38:00 GMTThere are many managed databases provided by AWS which allows us to setup databases very easily.

Why use managed databases given by AWS

You can setup your own Db on your on premises server or on your Ec2 instances but then you have to take care of backups, replication, scaling, availability, durability. Which is a lot of operational work added to your plate. If you mainly want to focus on developing your applications and don't want to worry about managing and handling your data bases then managed DB's by AWS are your best choice. These managed DB have a built in

  1. Scaling, Availability
  2. Backups and upgrades
  3. Monitoring, alarms etc.

Relational DB services

RDS

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It allows you to setup many relational DB with many different engines like  Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL Server.

Using RDS has the following advantages over traditional Db

  1. Ease of setup - You can setup a production-ready relational database in minutes
  2. Scaling - These Db has built in scaling you can also setup replicas to reduce load on each server
  3. Availability - If you setup a multi-az db then all the data is automatically replicated and we can even recover our DB from there. There are also continuous backups and we can recover DB's from those timestamps
  4. Secure - It allows you to encrypt your data using industry standard encrypted IPsec VPN. It also offers encryption at rest and encryption in transit.
  5. Maintenance - We have to do less management as OS management and updates are handled by AWS

Aurora

Aurora is a special proprietary DB by AWS and you can use Mysql or Postgres it combines the performance and availability of traditional enterprise databases with the simplicity and cost-effectiveness of open source databases. Amazon Aurora is up to five times faster than standard MySQL databases and three times faster than standard PostgreSQL databases. It auto-scales up to 128TB per database instance and delivers high performance and availability with continuous backup to Amazon S3.

Next we will do a Hands on setting up RDS on AWS cloud.

]]>
<![CDATA[Updates on dev.to clone in Angular - August 6]]>/updates-on-dev-to-clone-in-angular-august-6/610ca8c7dd652c02e5c63eb6Fri, 06 Aug 2021 03:17:38 GMT

Github Repo -

Deployed on Firebase -

Last week I completed the homepage.

Updates on dev.to clone in Angular - August 6

This week I added article details page the styling is left so I added the basic skeleton of the article details page. This will also be divided into 3 sections the reaction section the articles section and the user section.

Updates on dev.to clone in Angular - August 6

This week I focused on the article details section and joining the homepage articles to article details section. It was a bit tiresome this week. There were some problems like getting a specific article by path requires you to set the article username which I came to know that can be either username or organization name but if organization name exists it has to be organization name. There is no API to get featured article on homepage earlier I used the articles API and set the first one as featured article but that had a problem that the first article may not necessarily contain an image. The articles API also gave stale articles so I changed it with rising articles and took the first one that has an image. I think the timeline should be better if someone wants to use this as an app. Took a lot of my time yesterday but still there was progress so, I am happy.

Let us talk about the article section I've divided it into 3 parts the article details the comment section and the read next section I was only able to work on article detail section. I got article details using https://dev.to/api/articles/{username}/{slug} the API and I the same pattern as before a store and and API service.

There is one good news is working on the listings section. The listings section will require masonry layout so maybe I can extract out some directives which makes making masonry layout easy for anyone to use. I'll be releasing articles on his work too after he completes. Here is where I am now.

Updates on dev.to clone in Angular - August 6

Issue

  1. The article section is again repeated Which I think is not a big problem because every state is different. I'm not sure about this.

2.

Tags color and background. Tags in API comes in an a separate array and the colors in a different array I need to mix and match them and it should be reusable because its used everywhere.

Commits done

Contributions

is working on the listings section. Waiting for it Chellapan 😁. If anyone want to contribute they can pick anything from the issues section in the repo.

]]>
<![CDATA[Updates on dev.to clone in Angular - July 30]]>/updates-on-dev-to-clone-in-angular-july-30/610376f6dd652c02e5c63e85Fri, 30 Jul 2021 03:51:44 GMT

Github Repo -

Deployed on Firebase -

Last week I added article section dev.to clone.

Updates on dev.to clone in Angular - July 30

This week we added the tags store and joined the tags to the api. We mostly follow a pattern to add an api service which makes all the api calls and a store service which sores al the data related to that service.

We also added listings using the same pattern. This is the first time we used *rxLet. It really makes working with all Observable in the templates easier do it out. It allows you four states for an observable suspense, error. complete so that you can handle each one of them separately and gets rid of the *ngIf with async pipe. Like if you want to display something else while loading and error is a big disadvantage of the async pipe when used with an api.

There was one interesting thing we did this time we created a reusable component which when passed a tag will show all the top articles from these tags in the last 3 days if you want to check out.

This is how it looks now

Updates on dev.to clone in Angular - July 30


Next week we will start working on article details page.

Issues


The article tag store and article store are quite common can we make them one. Same for listings HTML and article-tag HTML. I'm not sure what to do about this.

Commits done in this update

Contributions

has also offered some help. He will raise a detailed feature request on what he will work on Waiting for that.

If you want to contribute too. I've created a lot of issues. Anyone can work on issues but for feature requests you have to raise a detailed feature request before working on it.

also raised his first pr on the project. Thank you sunny.

]]>
<![CDATA[Updates on dev.to clone in Angular July 23]]>/updates-on-dev-to-clone-in-angular-july-23/60fbbb92ecc9817fa2347858Fri, 23 Jul 2021 07:06:00 GMT

Github Repo -

Deployed on Firebase -

Last week I added Article store and sidebar in our dev.to clone.

Updates on dev.to clone in Angular July 23

This week I added the articles section. The articles section is divided into three parts the featured article ie the first article in your feed the rest of the articles section and the top header from where I select the time interval of our feed. Right now the feed is generic not based on any tags and user but I will do that later. Most of the time went in setting up the HTML, CSS for our articles section so I was not able to complete the tags store and the articles header section.

I did some interesting things which you may find interesting.

Content projection in the articles-cards section

In normal articles card the font size of title is 24px and in the featured-article section it was 30px. So I thought I should add the title section via content projection but this had one problem that there is no way in Angular to give default content projection the is open for a long time but there is a work around you can define a ref on the template and check if has children then render the projected content or render the default content if it does not have any content projected. To see how I implemented it follow this .

Changing styles of component

So if you put some styles of your component in the :host selector it can be easily changed in other components too. Like the article card-component as some styles but with the featured card I need to change some styles of the card component. Most of the CSS I need to be changed is global so I put it in host of the article-card component and I was easily able to change the styles to see how I implemented this check this .

Which leads us here

Updates on dev.to clone in Angular July 23

Issues

CSS management


CSS is getting out of hand I had to add a new class again and again every time even to add a small padding value. Its obvious that CSS is going to balloon soon and will get out of hand. So, see some CSS management techniques.

Content projection


Content projection just to change the size of the title seems overkill. Should it be done via inputs.

Header in article section


Article section header is incomplete.

Commits done in this update

Let me know in the comments if you think something can be improved.

]]>
<![CDATA[Updates on dev-to clone in Angular - July 16]]>/updates-on-dev-to-clone-in-angular-july-16/60fbb9bcecc9817fa234783fFri, 16 Jul 2021 00:57:00 GMT

Github Repo -

Deployed on Firebase -

Last week I created a header component. It was just HTML and it was in the following position.

Updates on dev-to clone in Angular - July 16

.

This week I stated adding the body of the dev.to website I used a component to handle all the margins and padding on the body of the dev.to website. And created all body sub-elements as the the children of this Component in routing.

To start with body sub-components I created a home module I created a new module for homepage because people may open other pages before visit our home page so putting our homepage in a different module other than app.module made sense for lazy loading. If your has to be visited before visiting any other pages use home module in app module.

I divided home page into three parts sidebar, articles, extra-info. On careful examination of the dev.to sidebar I divided it into 4 components sidebar-primary, sidebar-social-links, sidebar-tags, sidebar-advertisement. The sidebar-primary will contain all the default options in the sidebar. sidebar-social-links contains all the social links that open in dev.to when clicked on more option in sidebar. Sidebar tags contains tags on dev.to and sidebar-advertisement contain the ad at the bottom of dev.to sidebar.

After building the Basic HTML structure of dev.to sidebar I moved onto the articles section. It is also divided into 3 component featured article, article list, header.

Here we start the use of the . This API is divided into 2 parts one which requires a key one which are open so first I will build everything possible to build with the open API and after that we will build a login where you have to put your key and the key will be stored in localStorage and we will run API requiring API token from there. The first question that should come to your mind is shouldn't that be done first. Later on it will require a lot of refactoring. My answer is I want to do refactoring basically in most test projects lot of refactoring is done so we will intentionally make some mistakes along the way to see how we handle refactoring and updating features. I think half of the work done in software is refactoring or updating old features.

We used the articles open API() to get the list of articles. We created an articles-api service which will fetch the data and a article-store service which uses component store for managing the state of the articles. We will use Michael Hadly push pipe as it is more performant and does not return null when used. I will go into details of async pipe and push pipe some other time.

After doing all this I reached at the following state.

Updates on dev-to clone in Angular - July 16

Next week I will add the article section HTML, CSS and add a tag store, tags API for the tags section we created in the sidebar. If you want to know any details regarding anything comment below.

Honorable Mention and regarding contributions:

wanted to contribute to this project. Thanks Sunny for your proposal but I work on this on Thursday's only. I don't have much time to manage the project. I proposed if anyone wants to contribute add a feature request in the issues. I will comment I accept on it and then you can build the feature I won't build it but you will have to release an article on how you build that feature.

Commits done with this update

]]>
<![CDATA[Creating Dev.to Clone with Angular]]>/creating-dev-to-clone-with-angular/60fac01becc9817fa23477f9Fri, 09 Jul 2021 00:00:00 GMT

I'm starting a new series in which we will create a dev.to clone in angular. I will release some work every Thursday. I'm busy on all other days. I will use

  1. Component store for state management
  2. Rx-angular template for RxLet and push pipe

Rest we will add stuff as needed and think about it in various scenario's as we go. I'll add stuff to github repo on Thursday and drop an article on what we did on Friday. Follow along if you want to learn more about Angular.

Github Repo -

Deployed on Firebase -

Right now we have created the header component and next we will create the side bar.

Creating Dev.to Clone with Angular
Dev.to Sidebar

Each commit message will tell what we have done in that commit. Follow alone if you want to learn angular and let me know if any enhancements you think are needed create an issue on the repo if you want we can discuss there.

]]>