Nathaniel's blog
All tags

#TypeScript

43 posts tagged with “TypeScript

Turborepo: Scaling Your TypeScript Monorepo
TypeScriptDevOpsNext.js

Turborepo: Scaling Your TypeScript Monorepo

As your project grows from one app to multiple apps sharing packages, a monorepo becomes the natural architecture. Turborepo makes monorepos fast and manageable by orchestrating builds, caching result...

Mar 2, 20267 min read68
Drizzle ORM: Type-Safe Database Queries in TypeScript
TypeScriptDevOpsLLM

Drizzle ORM: Type-Safe Database Queries in TypeScript

Drizzle ORM is a TypeScriptfirst database toolkit that generates SQL you can actually read. Unlike Prisma (which has its own query engine) or TypeORM (which uses decorators), Drizzle maps directly to...

Feb 27, 20268 min read41
CI/CD Pipelines with GitHub Actions
DevOpsTypeScriptNode.js

CI/CD Pipelines with GitHub Actions

Continuous Integration and Continuous Deployment (CI/CD) automates the journey from code push to production. GitHub Actions makes this accessible with YAMLbased workflows that run on every commit, PR,...

Feb 24, 20267 min read33
Integrating Wallets with ethers.js and wagmi
Web3EthereumTypeScript

Integrating Wallets with ethers.js and wagmi

Wallet integration is the front door of any web3 application. Users connect their wallet, sign transactions, and interact with smart contracts — all through your frontend. Two libraries dominate: ethe...

Feb 18, 20269 min read37
Layer 2 Scaling Solutions Explained
Web3EthereumBlockchain

Layer 2 Scaling Solutions Explained

Ethereum processes about 15 transactions per second. Visa handles 65,000. That gap is why Layer 2 solutions exist — they execute transactions off the main chain while inheriting its security guarantee...

Feb 15, 20268 min read28
Building a DAO: Governance on the Blockchain
Web3BlockchainSmart Contracts

Building a DAO: Governance on the Blockchain

A Decentralized Autonomous Organization (DAO) replaces traditional corporate governance with smart contracts. Token holders vote on proposals, and the code executes the outcome. No board of directors,...

Feb 12, 20268 min read23
Writing Your First Solidity Smart Contract
Web3SolidityBlockchain

Writing Your First Solidity Smart Contract

Smart contracts are selfexecuting programs that live on a blockchain. Once deployed, they can't be modified — every function call is a transaction, and every state change is permanent. That's both the...

Feb 3, 202611 min read17
Docker and Kubernetes for Frontend Developers
DevOpsTypeScriptNext.js

Docker and Kubernetes for Frontend Developers

If you're a frontend developer who's never touched Docker, you're not alone. But as fullstack development blurs the lines, understanding containers is becoming essential — not just for deployment, but...

Jan 31, 20268 min read11
GraphQL Schema Design Best Practices
GraphQLTypeScriptNode.js

GraphQL Schema Design Best Practices

A welldesigned GraphQL schema is the foundation of a maintainable API. Unlike REST, where endpoints evolve independently, your schema is a contract — every type, field, and argument is part of a publi...

Jan 28, 20267 min read12
Mastering the Next.js App Router
Next.jsReactTypeScript

Mastering the Next.js App Router

The App Router in Next.js is a groundup rethink of routing, layouts, and data fetching. If you're coming from the Pages Router, some conventions will feel familiar, but the underlying model is fundame...

Jan 25, 20269 min read5
Building Type-Safe APIs with TypeScript and Zod
TypeScriptGraphQLNode.js

Building Type-Safe APIs with TypeScript and Zod

Runtime type checking has always been a pain point in TypeScript projects. You write beautiful interfaces, but the moment data crosses a boundary — an API request, a database row, a JSON file — all be...

Jan 19, 20268 min read12
Building a transparent LLM proxy with Cloudflare Workers and Hono
TypeScriptDevOpsLLM

Building a transparent LLM proxy with Cloudflare Workers and Hono

The core idea behind an LLM inference gateway is deceptively simple: intercept LLM API calls, forward them transparently, and capture data along the way. Implementing it cleanly took more thought than...

Jan 15, 20268 min read69
Six months with MCP: the good, the bad, the weird
TypeScriptDevOpsNode.js

Six months with MCP: the good, the bad, the weird

I've been building with Model Context Protocol since around early 2025, first integrating tools for an AI agent security platform, then building a multiMCP gateway. Here's where I actually stand after...

Aug 10, 20258 min read24
Context management is the real challenge in LLM engineering
TypeScriptNode.jsLLM

Context management is the real challenge in LLM engineering

Everyone talks about prompts. The more I build on top of LLMs, the more I think context management is actually the harder and more important problem. What I mean by context management A language model...

Jan 20, 20257 min read6
Cutting LLM costs by 20%: what actually moved the needle
TypeScriptNode.jsLLM

Cutting LLM costs by 20%: what actually moved the needle

We were burning through LLM API budget faster than expected. After a few weeks of profiling and experiments, we got costs down by about 20%. Here's what actually worked versus what sounded good in the...

Jul 15, 20246 min read20
Kafka at 200k DAU: what breaks and how to fix it
TypeScriptDevOpsNode.js

Kafka at 200k DAU: what breaks and how to fix it

We hit about 200k daily active users on our platform at peak. Most of the stack held up fine. Kafka was where we learned the most. Here's what I wish I'd known before we got there. Partition count mat...

Feb 10, 20247 min read7
Writing my first Solidity contract: lessons from the trenches
TypeScriptReactNode.js

Writing my first Solidity contract: lessons from the trenches

Before I joined my current company, I had exactly zero production Solidity experience. I'd read the docs, deployed a toy contract on a testnet years ago, and that was it. Three months in, I've shipped...

Aug 20, 20237 min read19
On leaving Microsoft after 18 months
TypeScriptReactDevOps

On leaving Microsoft after 18 months

Disclaimer: this is a reflection, not a complaint. A year and a half goes by faster than you'd think. When I joined, I was still fairly new to the kind of scale that a big tech company brings — hundre...

Mar 5, 20234 min read20
Migrating from C# to TypeScript: mental model shifts
TypeScriptNode.js

Migrating from C# to TypeScript: mental model shifts

I've been writing C professionally for about a year now on the backend of some ad serving systems, while also writing TypeScript on the frontend. Switching between the two throughout the day is intere...

Sep 10, 20226 min read16
What I learned running 50 A/B tests in one year
TypeScriptReactDevOps

What I learned running 50 A/B tests in one year

Running A/B tests was never something I thought I'd be doing this much. But at my current gig, we ship new experiments almost every week. After doing this for about a year, I've picked up a few things...

Mar 15, 20227 min read13
From Jobless to FAANG - My three year journey
TypeScriptReactGraphQL

From Jobless to FAANG - My three year journey

Disclaimer: this post is all about my personal experience, only representing my point of view, take it with a grain of salt. About three years ago, I was graduating from college with a CS degree. Drea...

Oct 16, 20214 min read212
How I make memes inside code
TypeScriptDevOpsNode.js

How I make memes inside code

Just another day, I was making memes on reddit, and writing code in the interval. It suddenly struck me, why can't I do both at the same time? Making memes inside code is totally possible, just make a...

Jul 31, 20214 min read276
Sorting 1 billion numbers
TypeScript

Sorting 1 billion numbers

Today we are going to try to sort 1 billion numbers. To be exact, they are 1 billion 32bit signed integers. Which have a size of around 4GB. Loading all of them into memory at once is possible, but no...

Jul 25, 20213 min read302
Building a high concurrency student course selection system
TypeScriptReactGraphQL

Building a high concurrency student course selection system

Intro Remember those days when your school system suck so much that you can never pick the course you want? Well, those days are no more. After learning how to design a high concurrency student course...

Jul 24, 202110 min read319
The making of a modern javascript library
TypeScriptDevOps

The making of a modern javascript library

Every 60 seconds passed in Africa, a new javascript library is created. There are a plethora of js libraries out there, and today I made another one. What Recently, I need to build some function revol...

Jun 21, 20213 min read93
How I build an app in 2 hours
TypeScriptDevOps

How I build an app in 2 hours

Yesterday I built an android app in 2 hours with without even knowing how to write in before starting to work on it. Granted, the app is really simple and I've written some demo app at around 2014 whe...

Feb 17, 20214 min read154
Typescript function return type based on parameters
TypeScript

Typescript function return type based on parameters

Typescript is all fun and games until you want some behaviour based on runtime values, recently I encountered a tricky problem: How do I type a function's return type based on the parameter value? I k...

Jan 11, 20213 min read67
Migrate to typescript - the advance guide
TypeScriptReactDevOps

Migrate to typescript - the advance guide

About a year ago I wrote a guide on how to migrate to typescript from javascript on node.js and it got more than 7k views. I did not have much knowledge on javascript nor typescript at the time and mi...

Dec 7, 202011 min read156
Use recoil in react custom hooks
TypeScriptReact

Use recoil in react custom hooks

Recoil is a hot new state management tool from Facebook that handles the state sharing problem gracefully with a minimal API. I recommend everyone check it out. It's an amazing tool that feels very re...

Jul 13, 20202 min read99
Let's talk about design patterns
TypeScriptReactDevOps

Let's talk about design patterns

What is a design pattern Design pattern is a method of solving specific problems through definition, use, and testing. It is a universal and reusable solution proposed for the repetitive problems in s...

Jul 8, 20202 min read28
Speed up your build by putting node_modules in ram
TypeScriptDevOps

Speed up your build by putting node_modules in ram

After a day of diligently copying from Stackoverflow and Google searches, you finally ready to build that 10GB Frankenstein project. You type into the console then went home and enjoy the rest of your...

Apr 2, 20204 min read19
Migrate to Typescript on Node.js
TypeScriptReactNode.js

Migrate to Typescript on Node.js

Recently I've migrated one of my personal projects from Javascript to Typescript. The reason for migrating will not be covered here, since it's more of a personal choice. This guide is for those who k...

Oct 3, 201910 min read29
ES-Next dynamic import
TypeScriptNode.js

ES-Next dynamic import

Problem Recently when writing a project of mine, I've written some javascript like this: I'd really like some syntax like this: Turned out there's this called that goes like: and it's supported by all...

Aug 28, 20192 min read29
Why do I love Billie Eilish
TypeScript

Why do I love Billie Eilish

Disclaimer: the mentioned in this article is limited to admiration of a singer at the level of art, which means I appreciate their songs and other artworks and that's it. It's been a long time since I...

Aug 3, 20198 min read65
Basis of computer networks
TypeScriptGraphQLDevOps

Basis of computer networks

By learning computer networks, I've gather some most useful knowledge and put them here. What is a threeway handshake? The first handshake: Client sets SYN to 1, randomly generates an initial sequence...

Jul 8, 201927 min read5
Let's talk about Operating system
TypeScriptGraphQLDevOps

Let's talk about Operating system

What is the difference between a process and a thread? Process (Process) is the basic unit of system resource allocation and scheduling, and thread (Thread) is the basic unit of CPU scheduling and dis...

Dec 8, 201833 min read26
Python learnings
TypeScript

Python learnings

What is a Python generator? generator, there are two ways to generate generator objects: one is to add parentheses to the list generator: One is to include the py def fib(max): n, a, b = 0, 0, 1 while...

Nov 8, 20188 min read15
All things Database
TypeScriptGraphQLDevOps

All things Database

What are the concepts and characteristics of transactions? Concept: Transaction is a sequence of operations, an indivisible unit of work, starting with BEGIN TRANSACTION and ending with ROLLBACK/COMMI...

Jul 8, 201823 min read12
All things Git
TypeScriptDevOps

All things Git

Git Common Commands Push to the dev branch of the remote warehouse: After commit, a small bug was changed, but you don't want to add a commit, you can use: git pushgit pulltouch .gitignoregit tag v1.0...

Nov 8, 20176 min read5
APUE reading notes-2
TypeScriptDevOps

APUE reading notes-2

第二章 1. 2.1 We mentioned in Section 2.8 that some of the primitive system data types are defined in more than one header. For example, in FreeBSD 8.0, sizet is defined in 29 different headers. Because...

Aug 15, 20173 min read38
APUE reading notes-1
TypeScriptDevOps

APUE reading notes-1

闲来无聊,想学习一个,提高一下自身的知识水平,据说Unix方面的神书主要有两本,分别为 Advanced Programming in the Unix Environment 和 Unix network programming 均为W. Richard Stevens所著,那么,闲话不多说,开始读书吧。 第一章 被誉为神书总是有道理的,从第一章就可以看出来,本书的作者显然不像贝尔实验室中的大触...

Aug 12, 20171 min read12
PHP learning
TypeScriptDevOps

PHP learning

环境搭建 鉴于我使用的是OSX系统,那么只需要把下的这一行取消注释,即可使用PHP了 可以在自己的下放一个这样的PHP页面检测是否成功, 如果成功出现PHP相关的信息,则说明PHP启用成功 基础语法 本文建立在你已有 等传统语言基础,并且知道数据库是什么的前提之下 与完全相同的部分被省去,仅讨论不同部分。 首先 PHP 是服务端语言,和系的 系的 对应 主要用作动态页面显示,服务端操作等,由于其完...

Jul 10, 20163 min read13
SQL basics practice
TypeScriptDevOps

SQL basics practice

实验环境 硬件环境 处理器: i55257U 2.72.9GHz 内存: 8 GB 1867MHz DDR3 硬盘: APPLE SSD SM0 256G 软件环境 操作系统: OSX 10.11.4 DBMS版本: MySQL 5.7.12 Community Server (GPL) DBMS图形界面: MySQL Workbench 6.3 实验内容 基本表 基本表的定义 语法 定义基本表的...

May 24, 20165 min read14