learnings

small notes that should prevent repeated work

7 entries · newest first

keep wallet verification small

crypto

Server-side Solana signature checks do not need the full web3 stack. Decode the address to public-key bytes, encode the signed message, and verify the detached signature with a narrow ed25519 library.

dynamic route params now need await

next.js

In current Next.js route handlers, dynamic params can arrive as a Promise. Treat them as async input at the boundary and unwrap before reading fields.

package export shapes are part of the integration

js

Small utility packages can change CommonJS and ESM behavior between majors. Imports that cross that boundary should be checked against the installed version, not copied from memory.

tailwind v4 wants simpler entrypoints

css

The v4 setup starts from @import "tailwindcss". Stable component classes are still useful when the UI needs exact rhythm instead of a long utility chain.

wallet adapters agree less than they appear

solana

Browser wallets expose the same general actions, but result shapes and globals vary. Normalize the signed message result before sending it to the API.

database writes need one owner

postgres

Counters and vote updates should happen in one database-side operation. Read, modify, write from the client is a race waiting to show up under load.

runtime files should be read at runtime

next.js

If a page depends on the latest file contents, read inside the request path and mark the route dynamic. Module-scope reads are easy to accidentally freeze.

see also: errors · thoughts

← back