frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Goldenthread – Compile Go to TypeScript Zod for type-safe validation

https://github.com/blackwell-systems/goldenthread
1•daynablackwell•1w ago
Hi HN,

I kept shipping features where the frontend accepted data the backend rejected. Validation rules lived in two places (Go struct tags and TypeScript Zod schemas), and they'd drift.

I built goldenthread to solve this. It's a build-time compiler that generates TypeScript Zod schemas from Go struct tags. Write validation once, use it everywhere.

Example:

    // Go backend
    type User struct {
        Username string `json:"username" gt:"required,len:3..20"`
        Email    string `json:"email" gt:"email"`
        Age      int    `json:"age" gt:"min:13,max:130"`
    }
Run `goldenthread generate ./models` and you get:

    // TypeScript (auto-generated)
    export const UserSchema = z.object({
      username: z.string().min(3).max(20),
      email: z.string().email(),
      age: z.number().int().min(13).max(130)
    })

    export type User = z.infer<typeof UserSchema>
The compiler uses go/packages and go/types for accurate type resolution. It handles nested objects, enums, maps, embedded structs, and 37+ validation rules.

The best feature: drift detection. Run `goldenthread check` in CI - it computes SHA-256 hashes of your schemas and fails the build if generated TypeScript doesn't match Go source. No more "frontend works locally but breaks in production because someone changed the backend struct."

Before releasing v0.1.0, I ran continuous fuzzing (10 targets, hourly in GitHub Actions). It found two bugs my test suite missed:

  1. UTF-8 corruption: Japanese field names with empty JSON tags triggered byte-slicing bugs in camelCase conversion. Took 444,553 executions to discover.

  2. Regex escaping: Patterns with newline characters produced broken JavaScript output. Found in 180 executions.
Both required specific intersections of conditions that manual testing wouldn't cover. I wrote up the full fuzzing setup here: https://blackwell-systems.github.io/blog/posts/continuous-fu...

The tool is production-ready:

Zero runtime dependencies (generated code only imports Zod) Generates readable TypeScript (looks hand-written) Complete Go type support (primitives, arrays, maps, nested objects) Works with any Go project structure MIT OR Apache 2.0 dual licensed

I built this because I was tired of frontend/backend validation bugs in my day job (hospitality platform with booking/payment APIs). We use it internally now.

Real-world example in the repo: 9-schema e-commerce system with Customer records (E.164 phone validation), Product SKUs (regex patterns), and Order workflows (nested objects + array constraints).

GitHub: https://github.com/blackwell-systems/goldenthread Docs: https://github.com/blackwell-systems/goldenthread/blob/main/... Tag syntax: https://github.com/blackwell-systems/goldenthread/blob/main/...

Would love feedback

Thanks for looking!

GPT-5.3-Codex System Card [pdf]

https://cdn.openai.com/pdf/23eca107-a9b1-4d2c-b156-7deb4fbc697c/GPT-5-3-Codex-System-Card-02.pdf
1•tosh•12m ago•0 comments

Atlas: Manage your database schema as code

https://github.com/ariga/atlas
1•quectophoton•15m ago•0 comments

Geist Pixel

https://vercel.com/blog/introducing-geist-pixel
1•helloplanets•18m ago•0 comments

Show HN: MCP to get latest dependency package and tool versions

https://github.com/MShekow/package-version-check-mcp
1•mshekow•26m ago•0 comments

The better you get at something, the harder it becomes to do

https://seekingtrust.substack.com/p/improving-at-writing-made-me-almost
2•FinnLobsien•27m ago•0 comments

Show HN: WP Float – Archive WordPress blogs to free static hosting

https://wpfloat.netlify.app/
1•zizoulegrande•29m ago•0 comments

Show HN: I Hacked My Family's Meal Planning with an App

https://mealjar.app
1•melvinzammit•29m ago•0 comments

Sony BMG copy protection rootkit scandal

https://en.wikipedia.org/wiki/Sony_BMG_copy_protection_rootkit_scandal
1•basilikum•32m ago•0 comments

The Future of Systems

https://novlabs.ai/mission/
2•tekbog•32m ago•1 comments

NASA now allowing astronauts to bring their smartphones on space missions

https://twitter.com/NASAAdmin/status/2019259382962307393
2•gbugniot•37m ago•0 comments

Claude Code Is the Inflection Point

https://newsletter.semianalysis.com/p/claude-code-is-the-inflection-point
3•throwaw12•39m ago•1 comments

Show HN: MicroClaw – Agentic AI Assistant for Telegram, Built in Rust

https://github.com/microclaw/microclaw
1•everettjf•39m ago•2 comments

Show HN: Omni-BLAS – 4x faster matrix multiplication via Monte Carlo sampling

https://github.com/AleatorAI/OMNI-BLAS
1•LowSpecEng•39m ago•1 comments

The AI-Ready Software Developer: Conclusion – Same Game, Different Dice

https://codemanship.wordpress.com/2026/01/05/the-ai-ready-software-developer-conclusion-same-game...
1•lifeisstillgood•41m ago•0 comments

AI Agent Automates Google Stock Analysis from Financial Reports

https://pardusai.org/view/54c6646b9e273bbe103b76256a91a7f30da624062a8a6eeb16febfe403efd078
1•JasonHEIN•45m ago•0 comments

Voxtral Realtime 4B Pure C Implementation

https://github.com/antirez/voxtral.c
2•andreabat•47m ago•1 comments

I Was Trapped in Chinese Mafia Crypto Slavery [video]

https://www.youtube.com/watch?v=zOcNaWmmn0A
2•mgh2•53m ago•0 comments

U.S. CBP Reported Employee Arrests (FY2020 – FYTD)

https://www.cbp.gov/newsroom/stats/reported-employee-arrests
1•ludicrousdispla•55m ago•0 comments

Show HN: I built a free UCP checker – see if AI agents can find your store

https://ucphub.ai/ucp-store-check/
2•vladeta•1h ago•1 comments

Show HN: SVGV – A Real-Time Vector Video Format for Budget Hardware

https://github.com/thealidev/VectorVision-SVGV
1•thealidev•1h ago•0 comments

Study of 150 developers shows AI generated code no harder to maintain long term

https://www.youtube.com/watch?v=b9EbCb5A408
1•lifeisstillgood•1h ago•0 comments

Spotify now requires premium accounts for developer mode API access

https://www.neowin.net/news/spotify-now-requires-premium-accounts-for-developer-mode-api-access/
1•bundie•1h ago•0 comments

When Albert Einstein Moved to Princeton

https://twitter.com/Math_files/status/2020017485815456224
1•keepamovin•1h ago•0 comments

Agents.md as a Dark Signal

https://joshmock.com/post/2026-agents-md-as-a-dark-signal/
2•birdculture•1h ago•0 comments

System time, clocks, and their syncing in macOS

https://eclecticlight.co/2025/05/21/system-time-clocks-and-their-syncing-in-macos/
1•fanf2•1h ago•0 comments

McCLIM and 7GUIs – Part 1: The Counter

https://turtleware.eu/posts/McCLIM-and-7GUIs---Part-1-The-Counter.html
2•ramenbytes•1h ago•0 comments

So whats the next word, then? Almost-no-math intro to transformer models

https://matthias-kainer.de/blog/posts/so-whats-the-next-word-then-/
1•oesimania•1h ago•0 comments

Ed Zitron: The Hater's Guide to Microsoft

https://bsky.app/profile/edzitron.com/post/3me7ibeym2c2n
2•vintagedave•1h ago•1 comments

UK infants ill after drinking contaminated baby formula of Nestle and Danone

https://www.bbc.com/news/articles/c931rxnwn3lo
1•__natty__•1h ago•0 comments

Show HN: Android-based audio player for seniors – Homer Audio Player

https://homeraudioplayer.app
3•cinusek•1h ago•2 comments