r/typescript

We rewrote our VIN decoder from SQLite to binary indexes - 100x faster, and our neural net reverse-engineered the VIN spec

We rewrote our VIN decoder from SQLite to binary indexes - 100x faster, and our neural net reverse-engineered the VIN spec

We built Corgi, an open-source offline VIN decoder. v2 used SQLite which worked fine until we needed to batch decode 1000 VINs and hit 4000 sequential queries.

v3 uses MessagePack-encoded binary indexes with O(log n) lookup:

Cold start: 200ms -> 23ms
Single decode: 30ms -> 0.3ms
Batch 1000: 4 seconds -> 300ms
npm package: 21MB -> 6.5MB (gzip)

The architecture was inspired by @wonderooo's corgi-rs which uses finite-state transducers.

While validating accuracy, we also trained a small transformer (6.6M params) on 50k VIN-vehicle pairs.

It learned the ISO 3779 encoding scheme from data alone - figured out that position 10 encodes model year, that VINs starting with 5YJ are Teslas, etc.

The embeddings cluster vehicles by body type with 0.99 cosine similarity between similar vehicles. All from a 10 digit string.

Blog post with details: https://cardog.app/blog/corgi-v3-binary-indexes

u/cardogio — 10 hours ago
LogicStamp Context: an AST-based context compiler for TypeScript
▲ 17 r/typescript+2 crossposts

LogicStamp Context: an AST-based context compiler for TypeScript

I’m building an open-source CLI that compiles TypeScript codebases into deterministic, structured architectural context.

It uses the TypeScript compiler API (via ts-morph) to parse the AST and emit JSON representing components, props, hooks, and dependency relationships in a diffable format.

Key properties: • Deterministic output (same code → same structure) • Strict watch mode + breaking change detection • Diffable architectural contracts • Compact JSON bundles for tooling

Curious how others approach extracting reliable structure from TypeScript - especially for larger codebases.

Repo: https://github.com/LogicStamp/logicstamp-context

github.com
u/context_g — 3 days ago
I want to use an open source project for my web application, but the database and backend is written in Go. Can I translate this to node.js/Typescript and use it in my application ?

I want to use an open source project for my web application, but the database and backend is written in Go. Can I translate this to node.js/Typescript and use it in my application ?

So I have a web application that has been built and I am adding a "forums" section to the topics that the user can create that is similar to Reddit. My application is written in node.js / typescript. Just to let you all know, I am a developer, but not a front end developer, so I'm not a node.js expert myself. I have a developer working with me on that.

Anyway, we found a open source repo called Discuit which we wanted to use and integrate so that we don't have to build Reddit like features from scratch. Here is their repo:

https://github.com/discuitnet/discuit

As you see in the repo, the backend is written in Go and my developer said that it has to be in node.js and using Go code in our code is bad architecture. Not only that, but he is not a Go developer himself. I agreed with him. I want to use this open source software though, is there a way we can translate the Go backend code to node.js ? Or is that a fool's errand ? My developer advised against using AI to translate as it won't be maintanable code (I trust my developer and he has proved himself time and time again). If you disagree with this, let me know. He suggested we find another open source project, but there is not a lot out there. Can we really not build the backend again in node.js and use that in our application ? Or is that a waste of time and money ?

If you all can give me any advice, that would be much appreciated. It would take too long and be too expensive for me to create Reddit-like features from the ground up. If Discuit is not the answer, then does anyone have any other alternative ? If you're a developer, you are free to contact me if you want. Any advice is appreciated.

Thank you for your time.

u/GladiusAcutus — 12 hours ago
I want to use an open source project for my web application, but the database and backend is written in Go. Can I translate this to node.js and use it in my application ?
▲ 0 r/typescript+1 crossposts

I want to use an open source project for my web application, but the database and backend is written in Go. Can I translate this to node.js and use it in my application ?

So I have a web application that has been built and I am adding a "forums" section to the topics that the user can create that is similar to Reddit. My application is written in node.js / typescript. Just to let you all know, I am a developer, but not a front end developer, so I'm not a node.js expert myself. I have a developer working with me on that.

Anyway, we found a open source repo called Discuit which we wanted to use and integrate so that we don't have to build Reddit like features from scratch. Here is their repo:

https://github.com/discuitnet/discuit

As you see in the repo, the backend is written in Go and my developer said that it has to be in node.js and using Go code in our code is bad architecture. Not only that, but he is not a Go developer himself. I agreed with him. I want to use this open source software though, is there a way we can translate the Go backend code to node.js ? Or is that a fool's errand ? My developer advised against using AI to translate as it won't be maintanable code (I trust my developer and he has proved himself time and time again). If you disagree with this, let me know. He suggested we find another open source project, but there is not a lot out there. Can we really not build the backend again in node.js and use that in our application ? Or is that a waste of time and money ?

If you all can give me any advice, that would be much appreciated. It would take too long and be too expensive for me to create Reddit-like features from the ground up. If Discuit is not the answer, then does anyone have any other alternative ? If you're a developer, you are free to contact me if you want. Any advice is appreciated.

Thank you for your time.

u/GladiusAcutus — 13 hours ago
Week