Building Huswerks: Running a Side Project Like a Production Service
Every house generates paperwork that nobody organizes. The water heater's model number is on a sticker in a dark closet. The warranty for the dishwasher is somewhere in an email inbox. The receipt for the roof repair is in a kitchen drawer, and nobody remembers when the furnace was last serviced. Renters and landlords have the same problem with move-in photos, repair requests, and leases.
None of this matters until something breaks, and then all of it matters at once.
I built Huswerks to be the one place that history lives. You log maintenance, scan appliance labels, save receipts and warranties, and get reminders before things are due. It works for homeowners, renters, and small landlords.
This post covers the stack and, more interesting to me, how I run it. I do reliability work for a living, so I wanted a side project that I'd be comfortable getting paged for.
The Stack
- Framework: Next.js 16 (App Router) with TypeScript
- Database: PostgreSQL on Supabase
- ORM and migrations: Drizzle
- Auth: Supabase Auth (email and Google OAuth)
- Files: Supabase Storage
- UI: Tailwind CSS and shadcn/ui
- AI: Google Gemini through the Vercel AI SDK
- Email: Resend
- Bot protection: Cloudflare Turnstile
- Errors: Sentry
- Hosting: Vercel, deployed from GitHub Actions
- Testing: Vitest and Playwright
Most of these choices came down to one rule: as a solo developer, I don't want to run anything I don't have to. Supabase gives me Postgres, auth, and file storage as one managed service. I wrote that down as an ADR along with the alternatives I passed on. Firebase didn't fit relational data like properties, projects, and expenses. Self-hosting Postgres with a separate auth provider meant more moving parts for no real gain.
Data Isolation in the Database, Not Just the App
Huswerks stores people's addresses, receipts, and documents, so a bug that shows one user's data to another is the worst failure I can have.
Every table has Row-Level Security turned on in Postgres. Policies check that the row belongs to the signed-in user before Postgres returns it. The app checks ownership too, but it isn't the only line of defense. If I write a sloppy query in a server action someday, the database still won't hand over someone else's rows.
The schema has grown to around 38 tables covering properties, units, appliances, maintenance schedules, projects, expenses, contractors, documents, and condition reports. Drizzle keeps it versioned. I change a schema file, generate a migration, and the migration runs in the pipeline. It's never applied by hand against production.
Mutations go through Next.js server actions with Zod validation on the way in. Route protection runs in a proxy layer that checks the session before a protected page renders, with client-side checks as a backup.
A Pipeline With Real Gates
This is the part I care about most. Code takes the same path every time, and every stage can stop it.
- Feature branches run lint, typecheck, unit tests, a production build, and the full Playwright end-to-end suite.
- Pull requests into main run lint, typecheck, unit tests, and a build as separate required checks, plus a Gitleaks secret scan.
- Staging gets its own Supabase project. A push to the staging branch validates, migrates the staging database, and deploys.
- Production validates again, runs migrations against the production database, then builds and deploys to Vercel from GitHub Actions. Vercel's automatic Git deploys are turned off on purpose so nothing reaches production without passing the pipeline.
- Post-deploy smoke tests run Playwright against the live site with throwaway test accounts, then clean those accounts up.
That ordering is deliberate. Migrations run before the new code deploys, so the code never expects a column that doesn't exist yet. Smoke tests run after the deploy, because "the build passed" and "the site works" are two different claims.
The secret scan has a small trick I like. CI plants a fake secret and checks that Gitleaks catches it. A scanner that silently stops working is worse than no scanner, because you think you're covered.
Observability
Sentry captures errors on the client, server, and edge runtimes. Vercel Analytics covers traffic. The project is small enough that I don't need a full Prometheus and Grafana setup like I'd run at work, but the principle is the same. I want to hear about a broken page from an alert, not from a user.
Adding AI Without Losing Control of Cost
Huswerks uses Gemini for a few features: reading the model and serial number off a photo of an appliance label, pulling line items from a receipt photo, and an assistant that answers questions about your home's records. The assistant is still limited to a small group of accounts while I tune it, and it will eventually be part of an optional paid AI plan.
The assistant's design borrows from how I think about automation at work. It gets read-only tools to look up your properties, appliances, and maintenance history. When it wants to change something, like adding a task, it can only propose the change. Nothing is written until you approve it. An AI that can quietly edit your data is a change management problem waiting to happen.
AI calls cost money on every request, so I treated them like any other shared resource that needs limits:
- Monthly credits per user. Each account with access gets a fixed number of credits a month.
- Weighted costs. Heavier requests, like image scans and image generation, cost more credits than a text question, which roughly tracks what each call costs me.
- A burst limit. A cap on requests in a short window, which stops a runaway loop or an abusive client from draining the budget.
It's basically an error budget applied to spend. Users get a predictable allowance and I get a predictable bill.
The biggest lesson so far is that the boring stuff is cheapest on day one. Writing an ADR takes ten minutes. Turning on RLS before there's data is easy. A deploy pipeline is simple to build when the app is small, and painful to retrofit once you've been shipping by hand for a year. None of it is exciting, but it's the reason I don't worry when I push to main.
What's Next
Huswerks is live at huswerks.com. The core app will stay free, and I'm planning an optional AI plan for people who want the assistant and the heavier AI features. I'm also writing a steady set of home maintenance guides on the Huswerks blog, and next on the list is deeper tooling for small landlords managing a handful of units.