frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Protoc-gen-dal – Generate data access converters from protobuf

https://github.com/panyam/protoc-gen-dal
1•flashgordon•2h ago
I've been building services where the API layer and database layer inevitably drift apart. Different field names, timestamps as int64 vs time.Time, nested messages becoming JSONB columns - the usual pain. I got a bit sick of hand-writing the same boilerplate converters between my API protobufs and GORM/Datastore entities, so I built this.

Yes - coupling API and DB schemas isn't always best practice. Your API should evolve independently of storage. Leaking internal details to clients is bad. DB optimizations (denormalization, indexes) shouldn't dictate your API shape. But really for a lot of the services Ive bene building - especially at the early stages - there is a lot of "similarity" - 80-90%. Id be doing the same `user.Name = dbUser.Name` lines hundreds of times, and the "clean separation" was mostly ceremony. And the drift just caused more bugs early on - you know forgetting to update a converter when adding a field, subtle type mismatches, copy-paste errors and so on.

This lets me have a single source of truth for my schemas and declare "transformations" as it goes through the layers and the target models/converters are also generated. You could use something like tRPC but then you are stuck with a single language eco system. I really wanted to not have that coupling. Now I can move fast when the schemas are similar, while still allowing divergence when I need it (decorators for custom logic, explicit field mappings).

Currently I generate targets for GORM (Go) and Google Cloud Datastore (so I can spin up small projects with postgres storage or AppEngine storage). Definitely rough around the edges and probably missing features you need, but it's been useful for my own projects. Still lots of things planned (and doing other languages is on the roadmap)

Would love feedback - especially if you've found better patterns for this problem.

Comments

flashgordon•1h ago
Author here. For those wondering - Claude Code was used but not in the "generate me this huge X with a single shot prompt after 8 hours of thinking" mode :).

Hacking group says it's extorting Pornhub after stealing users' viewing data

https://techcrunch.com/2025/12/16/hacking-group-says-its-extorting-pornhub-after-stealing-users-v...
1•SilverElfin•1m ago•0 comments

Codex Is Down

https://status.openai.com/incidents/01KCM7PAMQMCM8KAB6ZCWPKNK1
1•bartkappenburg•2m ago•0 comments

Using GitLab CI/CD with a GitHub Repository

https://docs.gitlab.com/ci/ci_cd_for_external_repos/github_integration/
1•ahmgeek•2m ago•0 comments

Letta Code: a memory-first coding agent

https://github.com/letta-ai/letta-code
3•pacjam•2m ago•0 comments

Neural Networks XD in JavaScript

https://chuwon.github.io/nn/
1•bicepjai•4m ago•0 comments

Feeding the Machine

https://www.theverge.com/cs/features/831818/ai-mercor-handshake-scale-surge-staffing-companies
1•paulpauper•4m ago•0 comments

We built an internal project management system – it became Dyversal AI

1•nivafy•4m ago•0 comments

The Order Is Backwards

https://granot.io/the-order-is-backwards/
1•tomgs•5m ago•0 comments

iRobot files for bankruptcy; Bought by its Chinese Manufacturer

https://apnews.com/article/irobot-roomba-bankruptcy-picea-amazon-7ef311c0b3848af2b30ba3921496efe1
1•Zaheer•5m ago•0 comments

How to Reclaim Aesthetic Vision from the Lean Startup?

https://medium.com/@gp2030/the-lean-startup-zen-the-art-of-failing-fast-and-reclaiming-aesthetic-...
1•light_triad•7m ago•0 comments

Lessons from building a content scanner for multiple social platforms

https://keywordspal.com/blog/building-multi-platform-content-aggregator
1•binsquare•9m ago•0 comments

Audio Plugin UI Components

https://www.audio-ui.com/
1•gregsadetsky•11m ago•0 comments

Ask HN: Tech Interview Coaches Worth the Money?

1•idontwantthis•11m ago•1 comments

The Arctic Is in Dire Straits, 20 Years of Reporting Show

https://www.scientificamerican.com/article/the-arctic-is-in-dire-straits-20-years-of-reporting-show/
4•quapster•13m ago•0 comments

Bitwarden / KeePass Diff

https://codeberg.org/cicko/bwkp-diff
2•cicko•14m ago•1 comments

From Experiment to Backbone: Adopting Rust in Production

https://blog.kraken.com/product/engineering/rust-part-2-from-bet-to-backbone
2•simag•14m ago•1 comments

How to Detect Browser-as-a-Service Scrapers in 2025

https://webdecoy.com/blog/browser-as-a-service-detection-baas-ai-agents-2025/
1•cport1•14m ago•0 comments

Will Creative Work Survive A.I.?

https://www.nytimes.com/2025/12/16/opinion/artists-creative-work-ai.html
1•thm•16m ago•0 comments

The Engine Is Not the Car

https://thinking.relica.io/the-engine-is-not-the-car/
1•m-xtof•20m ago•1 comments

Why Does Everyone Want to Be a Bank Now?

https://www.bloomberg.com/news/articles/2025-10-28/why-fintech-companies-want-to-become-banks-rig...
1•petethomas•20m ago•1 comments

Bot invasion increases with Google scraping the way, Cloudflare says

https://www.theregister.com/2025/12/15/cloudflare_report_bot_traffic/
2•Bender•21m ago•1 comments

Show HN: Community Site for WebGL / WebGPU

2•FarhadG•22m ago•0 comments

Show HN: Dev Tools – 24 browser-based utilities with no signup or tracking

https://dev-tools.online
2•ghdj•22m ago•0 comments

Age-Gating the Web

https://manuelmoreale.com/thoughts/age-gating-the-web
1•kevin061•23m ago•0 comments

AI-Triggered Delusional Ideation as Folie a Deux Technologique

https://arxiv.org/abs/2512.11818
4•kelseyfrog•24m ago•0 comments

Vic: Trim Videos in the Terminal

https://github.com/wong-justin/vic
1•thunderbong•24m ago•0 comments

No Graphics API

https://www.sebastianaaltonen.com/blog/no-graphics-api
24•ryandrake•24m ago•2 comments

Layers of security for protocols building with TEEs

https://docs.bluethroatlabs.com/layers-of-security-for-protocols-building-with-tees
1•transpute•24m ago•0 comments

'It's surreal': How US sanctions lock ICC judges out of daily life

https://www.irishtimes.com/world/us/2025/12/12/its-surreal-us-sanctions-lock-international-crimin...
5•rendx•25m ago•0 comments

Show HN: N8n-Style Actions and AI Agents in TypeScript

https://github.com/VoltAgent/voltagent/blob/main/README.md
3•omersays•25m ago•0 comments