Yong Sen - Full-Stack Developer
← Home

Blog

All

Building a Chatbot with RAG: How Retrieval Meets the LLM

A practical look at Retrieval-Augmented Generation: embeddings, vector search, and how to wire them to an LLM—plus how this portfolio implements the same pattern with Next.js, Supabase pgvector, and Hugging Face.

10 min read · AI · RAG · TypeScript · Next.js · Supabase

Essential Security Practices to Protect Your Web Applications

Practical, easy-to-apply security improvements for any online project — from security headers, rate limiting, login protection, to safe file uploads and more.

18 min read · Security · Web · Best Practices · DevOps · Next.js · Nginx · Hardening

Automated MongoDB Backup to S3 with Shell Script on Ubuntu

Learn how to create an automated MongoDB backup system using shell scripts that dump databases, compress them, and upload to AWS S3 with automatic cleanup.

6 min read · MongoDB · Ubuntu · Backup · AWS · S3 · DevOps · Shell Script · Cron

Deploy Next.js on Ubuntu with Git, PM2, Nginx, and Certbot

Production-ready guide to deploy a Next.js app on Ubuntu using Git for code, PM2 for process management, Nginx as reverse proxy, and Certbot for HTTPS.

3 min read · Next.js · Ubuntu · PM2 · Nginx · Certbot · DevOps · Deployment

Generate a Self‑Signed SSL Certificate on Ubuntu (Nginx)

Step-by-step guide to creating a self-signed certificate with OpenSSL and configuring Nginx with secure defaults.

2 min read · Ubuntu · Nginx · SSL · TLS · OpenSSL · DevOps

How to Set Up an FTP User on Ubuntu (vsftpd)

Step-by-step guide to installing and configuring vsftpd on Ubuntu, creating a restricted FTP user, and opening firewall ports.

2 min read · Ubuntu · FTP · vsftpd · Server · Linux

Ubuntu Server Best Practices: Create 'ubuntu' User, SSH Keys, Disable Root Login

Harden an Ubuntu server by creating a non-root user with SSH key-based access, disabling root login, and configuring sudo privileges.

2 min read · Ubuntu · SSH · Security · DevOps · Server

Why We Need forwardRef in React: A Complete Guide

Understanding forwardRef in React: when to use it, why it's necessary, and practical examples for building reusable components.

7 min read · React · forwardRef · Refs · Components · JavaScript

Understanding React Hooks: useEffect vs useMemo vs useCallback

A comprehensive guide to understanding when and why to use useEffect, useMemo, and useCallback in React applications.

6 min read · React · Hooks · Performance · JavaScript