-
Protective measures for recent shai hulud attacks
As the recent attacks are getting common, I did some changes and tried to prevent my ongoing apps that I am working on, as much as I can using some steps. Before, we move forward, just to give context, I left using “npm” for my new projects some years back. I use “pnpm” mostly for…
-
PostgreSQL deep dive: Syncing Cart items
context: I was working on persisting cart items in database. The tech stack is React, Nest, Drizzle and Postgres. approach: I thought it would be simple as its just POST and GET requests for syncing, but I went deep diving postgres DB. the saving: Cart Item Table: Approach 1: I can add a product to…
-
Flexible Products List and Quick View Modal Components Group
context: I was making an ecommerce app in React. I should have made in Next or similar tech, as it would be easier for SEO and other things, but I have chosen React as of now. So, it has a search page, where all the products would be listed, along with it is filters and…
-
Flexible Storage Providers in Nest.js
Implementing file upload service Requirement: I needed a generic file uploader service which have the following functionalities: Also, I might change the service provider later. Currently, I wanted to use ImageKit but later I might change to dropbox or aws s3 or onedrive, etc. But, I want minimal changes in my code with a single…
-
Node.js with Typescript
From my weird learning journey, I am logging this article where I wanted to explore something basic. I have always written Node.js with javascript and with Express mostly. So, today, I am trying to write or structure a basic node and express app with typescript. Just a simple and small setup to log, how to…