Boundary rule
Keep your app code speaking your app’s language. Put outside shapes, SDK calls, SQL, Firebase code, and payment responses at the edge.
Adapter changes an external interface into one your app expects. Repository gives one place to read and write domain data.
Why this matters
Hackathon apps often start with API calls inside button handlers or routes. It works until you change from a mock API to Supabase, MongoDB, Firebase, or a college server.
If the boundary is hidden, your core code stays stable. You can swap the outside part without rewriting the feature.