Skip to content

Instantly share code, notes, and snippets.

@kevinmichaelchen
kevinmichaelchen / test-github-svg.md
Created November 13, 2025 15:27
Testing animated D2 SVG in GitHub Markdown

Testing Animated SVG in GitHub Markdown

This is a test to see if animated D2 SVG files work in GitHub's Markdown renderer.

Method 1: Object Tag

Your browser doesn't support embedded SVG. View the diagram directly.

@kevinmichaelchen
kevinmichaelchen / README.md
Last active October 27, 2025 16:15
GraphQL Codegen + Temporal Zod Demo - Demonstrating how to use GraphQL Codegen to generate Zod schemas with Temporal type support in Deno

GraphQL Codegen + Temporal Zod Demo

A demonstration of using GraphQL Codegen to generate [Zod][zod] schemas with Temporal type support using Deno and TypeScript.

@kevinmichaelchen
kevinmichaelchen / README.md
Last active October 24, 2025 19:25
Temporal Zod Deno Demo - Demonstrating Temporal.Instant validation and coercion

Temporal Zod Deno Demo

A demonstration of using temporal-polyfill and temporal-zod in a Deno TypeScript project, focusing on Temporal.Instant validation and coercion.

What This Demonstrates

This project shows how temporal-zod schemas can accept either:

  • A Temporal.Instant instance
@kevinmichaelchen
kevinmichaelchen / functional-ddd-with-effect-monoid-value-objects.md
Last active September 24, 2025 05:23
Functional Domain-Driven Design with Effect-TS Monoid Value Objects
@kevinmichaelchen
kevinmichaelchen / cupid.md
Created September 19, 2025 13:55
Development principles and guidelines

CUPID: Properties for Joyful Code

CUPID is a framework for creating "joyful code" that humans can understand and enjoy working with. As Martin Fowler noted: "Good programmers write code that humans can understand."

The Five Properties

🧩 Composable

@kevinmichaelchen
kevinmichaelchen / prisma-vs-kysely-unordered-migrations.md
Last active September 12, 2025 19:37
Comparison of how Prisma and Kysely handle unordered migrations in parallel development

🔄 Prisma vs Kysely: Unordered Migrations Comparison

📋 Executive Summary

Prisma does not suffer from the same unordered migrations problem that affects Kysely. While Kysely strictly enforces alphabetical/chronological ordering of migrations and fails when migrations are executed out of order, Prisma uses a more flexible approach that tracks migration history in the database and provides tools to handle divergent migration histories.

⚠️ The Kysely Problem

@kevinmichaelchen
kevinmichaelchen / kysely-unordered-migrations.md
Created September 12, 2025 18:44
Kysely Migration Ordering: Handling Parallel Development - How to handle out-of-order migrations in team environments

Kysely Migration Ordering: Handling Parallel Development

The Problem

When multiple developers work on feature branches simultaneously, they often create migrations with timestamps that become out of order when merged. This is a common scenario:

  • Developer A creates migration 20240112_1200_add_users.sql on their feature branch
  • Developer B creates migration 20240112_1201_add_products.sql on their feature branch
  • Developer B merges first, production runs the 12:01pm migration
  • Developer A merges second, but now there's a problem...
@kevinmichaelchen
kevinmichaelchen / declarative-migrations.md
Last active September 12, 2025 18:38
Migration Systems: Traditional Timestamp-Based vs Atlas - Why timestamp-based migrations fail and how Atlas solves it

Migration Systems: Traditional Timestamp-Based vs Atlas

If you've ever seen Kysely return the error below, this post is for you.

☠️ Error: corrupted migrations: previously executed migration

The Problem with Traditional Timestamp-Based Migration Systems

@kevinmichaelchen
kevinmichaelchen / musicbrainz.md
Last active November 2, 2024 21:55
MusicBrainz API + Data Schema

GraphQL

https://graphbrainz.fly.dev lets you do cool GraphQL queries.

Page through an artist's albums

query {
  lookup {
    artist(mbid: "144ef525-85e9-40c3-8335-02c32d0861f3") {