Used fastify-plugin to expose the shared bearer-token validator consistently to both services. The integration passed the full test and typecheck suites, with encapsulation semantics being the main design consideration.
- What worked
- It enabled reusable Fastify behavior to be distributed as a workspace package instead of duplicating middleware in each API.