-
#express
#nodejs
#middleware
#jwt
#error-handling
#debugging
▸TL;DR
- Expired admin JWTs produced a 500 with no log output at all, which made it nearly untraceable.
responses.serverError was being called but never logging usefully.
- The culprit was Multer’s error handler — meant for file uploads — catching the JWT error.
- It classified an auth failure as a server error, hence the misleading 500.
- Fixed by catching token errors in the JWT middleware first and letting unrelated errors pass through.
Read it →
-
#automation
#golang
#python
#icloud
#api
#gitlab
#architecture
▸TL;DR
- Goal: record a voice note on my phone and have it published without touching a computer.
- Existing Go server exposes an endpoint, maybe at
api.ryer.io, as the trigger.
- iCloud metadata plus unique identifiers in Postgres tracks which recordings are already processed.
- Go orchestrates; Python does the transcription and LLM work via the OS command interface.
- The endpoint needs real authentication before it goes anywhere near the public internet.
Read it →
-
#devops
#render
#gitlab
#remix
#hugo
#nextjs
#static-site
#deployment
▸TL;DR
- Go backend, Postgres, and three frontends — Remix, Next.js, Hugo — all under one domain on Render.
- GitLab CI runs validate, test, build, deploy; static sites skip the build stage and trigger Render deploy hooks.
- Remix is the front door, proxying to Go and rewriting URLs so the static sites live under the main domain.
- Hugo built 192 pages almost instantly, which is a good argument for static generation.
- Next.js
basePath breaks image bundling, so images need copying into out after the build.
Read it →
-
#react
#auth
#state-management
#debugging
#async
#loading
▸TL;DR
- 401s from the backend traced to the client calling APIs before it held a valid token.
- The spinner logic was spread across
isLoading, isSigningIn, isSigningUp and refreshing, and the booleans overlapped.
- Cutting it to just
isSigningIn / isSigningUp removed most of the misbehaviour.
- The reducer wasn’t applying the dispatched payload, so state never actually changed.
- Callbacks from the context beat
finally blocks and timeouts for knowing when auth is genuinely done.
Read it →
-
#react-native
#react
#auth0
#ios
#theming
#async
#ui
▸TL;DR
- iOS shows an OS-level alert when Auth0 opens a web view, which backgrounds the app and triggers state resets.
- Those resets fire before navigation completes, so users see menu items and theme colours flicker.
- Backend logs show unauthorized API calls during logout — 401s with no token, meaning requests outrun the teardown.
- Replaced a promise-plus-one-second-timeout hack with resets keyed on
wasLogoutSuccessful.
- Some jank remains. Sub-300ms and post-logout, I’ll take it for now.
Read it →
-
#ios
#authentication
#react-native
#auth0
#backend
#bugfix
▸TL;DR
- Re-registering with a previously soft-deleted email returned a 500 and dumped the user back to onboarding.
- The backend’s register endpoint never checked for soft-deleted records, so it tried to create a duplicate.
- The database rejected it with a duplicate key error, surfacing as an unhandled 500.
- Fixed by setting
isExistingUser from the soft-deletion state rather than from existence alone.
- Register now returns 200, though post-registration navigation still needs work.
Read it →
-
#react-native
#android
#ios
#ui
#shadows
#theming
#design-system
#figma
▸TL;DR
- Teal theme made scores modal text nearly invisible — white plus opacity doesn’t survive a theme change.
- I’d bumped opacity from 40% to 75% while testing the blue theme and never rechecked the others.
- Android doesn’t do
shadowOffset; it does elevation, and identical styling produces nothing.
- React Native 0.80’s filter-based drop shadow finally makes Android images match iOS.
- React Native SVG doesn’t support the new architecture, so SVGs need wrapping in a
view to take the filter.
Read it →
-
#financial
#equipment
#property
#calculation
#personal
▸TL;DR
- Contractors run about $100/hour and renting is similarly pricey for sporadic work.
- A 30-35hp backhoe loader utility tractor covers moving material and digging on my own schedule.
- Utility tractors hold value unusually well — depreciation is minimal if they’re maintained.
- On a $40k purchase financed at $500-600/month, a year’s real cost is mostly financing.
- Selling at ~$35k after one or two years puts total out-of-pocket near $10k, roughly break-even.
Read it →
-
#mongodb
#replica-set
#local-development
#enterprise
#csfle
#transactions
▸TL;DR
- Enterprise Edition is required for client-side field-level encryption via
libMongoCrypt.
- A local replica set is what makes database transactions available — they don’t work standalone.
- Stop the service, add
?replicaSet=rs0 to the connection string, restart with --replSet rs0.
- Then
rs.initiate() in mongosh, verify with rs.status().
- No Docker needed for this one.
Read it →
-
#react
#auth
#auth0
#refactoring
#typescript
#error-handling
▸TL;DR
loadCredentials was doing credential retrieval, user assembly, and UI state updates all at once.
- Split it:
loadCredentials fetches and stores, initializeUser assembles, UI state moves out entirely.
- Return
null explicitly rather than undefined, so callers can distinguish “no user” from “something broke”.
- A blanket error handler covering both our endpoints and Auth0 was hiding which system actually failed.
- Returning null shouldn’t always mean logout — check for a
sub before tearing the session down.
Read it →