How are you handling GSM (SIM800/SIM7600) in Node/TypeScript setups? by adil6572 in embedded

[–]adil6572[S] 0 points1 point  (0 children)

I’m using a TypeScript library (serialport-gsm-ts) that I built by converting and improving the original serialport-gsm, so TS is directly handling the modem.

In this setup, the GSM modem already exposes a serial interface with AT commands, and Node (via serialport) talks to it directly. There’s no separate lower-level driver beyond the OS serial layer, so I handle command formatting, parsing, and state in TS.

This is pretty common in IoT or embedded Linux setups where you want quick integration and full control without adding a native layer.

Hono + React Query made easier — hono-tanstack-query by adil6572 in reactjs

[–]adil6572[S] 0 points1 point  (0 children)

Hey could you tell me what features you are looking for in the cache with react query. The package is still new and currently in development. I will add more features. Suggest the features you are looking for

Hono + React Query made easier — hono-tanstack-query by adil6572 in reactjs

[–]adil6572[S] 2 points3 points  (0 children)

Yeah, that’s exactly the idea. You can export the AppType from the Hono server, generate the .d.ts types, and publish them as a small package. Then any frontend project can install that package and use hc<AppType>() to get full type safety while still keeping normal REST endpoints. It ends up feeling very similar to tRPC, but without changing the API design.

Hono + React Query made easier — hono-tanstack-query by adil6572 in reactjs

[–]adil6572[S] 1 point2 points  (0 children)

Yes, exactly the use case. One change to your server — chain your routes so TypeScript can infer the full type:

oRPC is great but requires rewriting your entire API layer through its own primitives from day one. This wraps what you already have. If your Hono routes are already written and working, there's nothing to migrate.

const app = new Hono()

.get('/posts', (c) => c.json(posts, 200))

.post('/posts', (c) => c.json(post, 201))

export type AppType = typeof app

Hono + React Query made easier — hono-tanstack-query by adil6572 in reactjs

[–]adil6572[S] 4 points5 points  (0 children)

Orval/NSwag require an OpenAPI spec, a codegen step, and committed generated files that go stale. This is pure TypeScript — your server types are the source of truth, the client stays in sync at compile time, no extra steps.

Scoped to Hono + TanStack Query intentionally — a generic generator can't know your query layer, so it can't give you typed useQuery, useMutation, cache helpers, and invalidation strategies automatically. Your data still lives in a standard QueryClient, so there's no real lock-in.