Building Tewe Diary

12 parts, in reading order.

Sep 7, 2026·5 min read

Building Tewe Diary, Part 1: Dapper, Not an ORM

When the SQL is the logic, I want to see it. My movie diary API uses Dapper over Npgsql with hand-written SQL. The post covers what that looks like in a repository, the small habits that keep it safe, and the point at which I'd reach for an ORM instead.

dotnetdapperpostgresarchitecture
Sep 10, 2026·5 min read

Building Tewe Diary, Part 2: Two Services, One Shared Signing Secret

Splitting token issuance from the API gives you a realistic boundary without a network call on every request. The JWT setup in my movie diary API, why a shared symmetric secret is fine for now, and what would make me move to asymmetric keys.

dotnetsecurityjwtarchitecture
Sep 14, 2026·5 min read

Building Tewe Diary, Part 3: Policy-Based Authorisation Plus an API-Key Filter

A person and a pipeline are different callers and shouldn't be trusted the same way. My movie diary API authorises people with claims-driven policies and machines with a shared key. The post covers what each tier can do, and where the key approach is weakest.

dotnetsecurityauthorizationapi-design
Sep 17, 2026·5 min read

Building Tewe Diary, Part 4: Integration Tests Against a Real Postgres

When the SQL is the logic, a mocked connection tests nothing that matters. My movie diary API spins up a throwaway Postgres with Testcontainers, applies the real migrations once and wipes the data between tests. The post also covers what it costs to run.

dotnettestingtestcontainerspostgres
Sep 21, 2026·5 min read

Building Tewe Diary, Part 5: Output Caching with Tag-Based Eviction

Cache reads, and tie eviction to writes instead of guessing how long data stays fresh. The output cache policy in my movie diary API has a tag that every write evicts and an endpoint the import pipeline calls. It only works on a single instance.

dotnetcachingperformanceapi-design
Sep 24, 2026·5 min read

Building Tewe Diary, Part 6: Schema Owned by Migrations, With Separate Database Roles

One thing owns the schema, and each job that touches the database gets the least privilege it needs. My movie diary API uses FluentMigrator as the only owner of DDL, keeps import scripts data-only, and splits the database into migrate, import and runtime roles.

dotnetpostgresmigrationssecurity
Sep 28, 2026·5 min read

Building Tewe Diary, Part 7: The ADR Habit, Decision, Rationale, Revisit When

Writing down when you'd change your mind is what makes a decision log worth keeping. The three-line format I use in my movie diary repo, a few real entries including the ones that say 'not done yet', and why it beats a long architecture document.

architecturedocumentationadrdotnet
Oct 1, 2026·5 min read

Building Tewe Diary, Part 8: Getting Hosting to $0, and What Each Option Costs

I wanted my portfolio project live for nothing. The honest answer is that this exact Azure stack can't do it. The reasons, the three options I compared, what I chose, and the one that's documented but deliberately not built.

azuredevopscostdotnet
Oct 5, 2026·5 min read

Building Tewe Diary, Part 9: Deployment Gotchas, and the Switch That Keeps It Off

A dry run can check syntax. It can't check ordering and timing. Here are the three problems that stopped my first Azure deployment, the fixes, the hardening I added for free, what I skipped on purpose, and the single variable that keeps the deploy job from failing before Azure exists.

azuredevopsgithub-actionspostgres
Oct 8, 2026·5 min read

Building Tewe Diary, Part 10: v1 Controllers Beside v2 Minimal APIs

A second API style can run beside the first if both share the same contracts, policies and cache tag. My movie diary API serves v1 controllers and v2 Minimal APIs from one host. A parity test keeps them honest, and the post covers what would make me split them.

dotnetminimal-apisapi-versioningtesting
Oct 12, 2026·6 min read

Building Tewe Diary, Part 11: The .NET 10 Upgrade, Run From a PRD

A framework upgrade is the kind of change where 'no behaviour change' is easy to promise and hard to prove. I ran the .NET 10 move on my movie diary API from a written plan: a spike first, decisions I asked to be challenged, a pinned transitive package, and a guard test for the version.

dotnetupgradespec-drivenai
Oct 24, 2026·7 min read

Building Tewe Diary, Part 12: Building the React Frontend From a PRD

A small frontend that shows each authorisation tier is the quickest way for a reviewer to see an API working. I built a TV-style React app for my movie diary API from a written PRD. The post covers what it shows at each level, the choices I made, and what I left out.

reacttypescriptfrontendspec-driven