Skip to content

Instantly share code, notes, and snippets.

@gregsantos
gregsantos / 1-app-outline-prompt.md
Last active August 3, 2025 06:32
0-1 App Prompt Library

// Prompt To Generate App Outline

You are an AI assistant tasked with drafting artifacts for a new app idea. Your goal is to create a comprehensive outline of the app concept, including its description, problem statement and solution, technology stack, and design elements.

The app idea you will be working with is:

<app_idea> {{APP_IDEA}} </app_idea>

@gregsantos
gregsantos / CLAUDE.md
Created June 6, 2025 17:35
CLAUDE.md – Next.js + TypeScript + Tailwind + shadcn + React Query Guide

🛠️ Development Environment

  • Language: TypeScript (^5.0.0)
  • Framework: Next.js (App Router)
  • Styling: Tailwind CSS
  • Component Library: shadcn/ui
  • Data Fetching: React Query (TanStack)
  • Testing: Jest + React Testing Library
  • Linting: ESLint with @typescript-eslint
  • Formatting: Prettier
@gregsantos
gregsantos / claude-code-tips.md
Created June 6, 2025 17:30
Claude Code Guide for Agentic Terminal Development

🧠 Claude Code Guide for Agentic Terminal Development

1. 🔧 Initial Project Setup

  • Run /init on project start

Creates a Claude.md containing:

  • Project summary
  • Component descriptions
@gregsantos
gregsantos / fcl.d.ts
Created December 15, 2022 17:12
Type defs for FCL
/* eslint-disable @typescript-eslint/no-explicit-any */
// Type definitions for @onflow/fcl 1.3.0
// Project: https://github.com/onflow/fcl-js
declare module "@onflow/six-create-account" {
let template: any;
}
declare global {
interface Window {
fcl: any;
const fcl = require("@onflow/fcl")
const {TransactionAuthorizer} = require("@freshmint/core")
const {
HashAlgorithm,
InMemoryECSigner,
SignatureAlgorithm,
InMemoryECPrivateKey,
} = require("@freshmint/core/crypto")
const PRIVATE_KEY_HEX =
const {randomBytes} = require("crypto")
const secp256k1 = require("secp256k1")
// or require('secp256k1/elliptic')
// if you want to use pure js implementation in node
// generate message to sign
// message should have 32-byte length, if you have some other length you can hash message
// for example `msg = sha256(rawMessage)`
const msg = randomBytes(32)
@gregsantos
gregsantos / obj-validation-shallow.js
Last active September 18, 2022 19:15
obj-validation-shallow
const isFn = v => typeof v === "function"
const isString = v => typeof v === "string"
function meta(meta) {
return pipe([
ix => {
ix.meta = meta
return Ok(ix)
},
])
@gregsantos
gregsantos / getTxHash.js
Created October 27, 2021 21:16
get transaction hash before send
let txIdCalculated = null
const getTxHash = async () => {
const txIdFromChain = await sdk.decode(
await sdk.send(
await sdk.resolve(
await sdk.build([
sdk.transaction`transaction(msg: String) { prepare(acct: AuthAccount) {} execute { log(msg) } }`,
sdk.args([sdk.arg("Hello, Flow!", t.String)]),
sdk.payer(fcl.currentUser().authorization),
sdk.proposer(fcl.currentUser().authorization),
@gregsantos
gregsantos / account-proof.js
Created October 26, 2021 18:49
account-proof
// Authentication Proof Service
{
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "account-proof",
"method": "DATA",
"uid": "fcl-dev-wallet#account-proof",
"data": {
"f_type": "account-proof",
"f_vsn": "1.0.0",
name: CICD
# Triggers the workflow on push to master
on:
push:
branches:
- master
jobs: