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 / main.ts
Last active November 20, 2025 14:30
/**
* AMARTHA HACKATHON 2025 - TRUST SCORE ENGINE
* Tech Stack: Firebase Cloud Functions (2nd Gen), Vertex AI (Gemini), Cloud Vision
*/
const { onRequest } = require("firebase-functions/v2/https");
const logger = require("firebase-functions/logger");
const admin = require("firebase-admin");
const { VertexAI } = require("@google-cloud/vertexai");
const vision = require("@google-cloud/vision");
@ilhamsj
ilhamsj / payload-s3.ts
Created November 18, 2025 01:51
Payload S3 Plugin
import { s3Storage } from '@payloadcms/storage-s3'
// Generate date-based prefix function (folder/collection/YYYY/MM format)
// Returns a getter so date is evaluated at upload time, not config time
const createMediaPrefix = (folder: string, collection: string) => ({
get prefix() {
const now = new Date()
return [folder, collection, now.getFullYear(), String(now.getMonth() + 1).padStart(2, '0')]
.filter(Boolean)
.join('/')
# Check Docker disk usage
docker system df
# Check home directory size
du -sh ~
# Check largest directories in home
du -sh ~/* | sort -hr | head -20
# Check Documents directory
@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,

You are a senior product manager at a tech company building a new app inspired by [insert app name, e.g., Netflix / Airbnb / Gojek], but under a new brand name: [insert your brand name].

Your job is to write a complete Product Requirements Document (PRD) for the MVP version of this product. The PRD should look realistic enough to show recruiters, founders, or engineers, and must include clear details that make it sound like a real-world startup project.

The PRD must include the following sections:

  1. Overview
    • Short summary of what the product does.
    • What problem it solves.
  • Target audience.