Skip to content

Instantly share code, notes, and snippets.

View ilhamsj's full-sized avatar
🎯
Focusing

Ilham Saputrajati ilhamsj

🎯
Focusing
View GitHub Profile
@ilhamsj
ilhamsj / decode-example.ts
Last active October 9, 2025 02:00
Decode a NextAuth.js JWE token
import { jwtDecrypt } from 'jose'
import { hkdf } from '@panva/hkdf'
/**
* Derive the encryption key the same way NextAuth does
*/
async function getDerivedEncryptionKey(keyMaterial: string | Buffer, salt: string) {
return await hkdf(
'sha256',
keyMaterial,
@ilhamsj
ilhamsj / prompt.md
Last active September 23, 2025 06:01

Here’s how I’d approach this: think of prompt engineering as building a well-structured pipeline that guides the AI through your product development flow — from PRD to implementation. Right now, you’re imagining:

PRD → Architecture → JTBD → Backend/Frontend Todos

This is a good starting point, but for software teams, there are a few extra layers we should consider to ensure the process produces useful, actionable, and technically consistent outputs.


1. Define the End-to-End Flow