The same booking list/detail feature, shown twice: once against a
hand-written fetch/SWR data layer, once after migrating to a generated
OpenAPI client. Kept side by side deliberately as a before/after contrast,
plus the underlying Next.js route handlers and auth config.
hand-written/Bookings.tsx,hand-written/Booking.tsx— data fetched with a customuseFetchhook (see../state-management/useFetch.ts) and revalidated manually viaswr'smutate. UI copy is hardcoded (German).generated/Bookings.tsx,generated/Booking.tsx,generated/BookingEditForm.tsx— the same feature built on a generated API hook (useBookingControllerGetList) from an OpenAPI spec, withreact-i18nextfor copy instead of hardcoded strings.route.ts,route.by-id.ts— Next.js route handlers backing the hand-written variant (app/api/booking/route.tsandapp/api/booking/[id]/route.ts, flattened here for readability).authConfig.ts— NextAuth configuration for Azure AD B2C, including access-token refresh handling.
- The generated OpenAPI client itself (types, request functions) — machine generated, not hand-written, so not representative of authorship.
Plans/andRiders/from the generated variant — same pattern asBookings/, omitted to avoid repetition.
Auth configuration reads tenant ID, client ID, and client secret from environment variables rather than hardcoding them; no real credentials or tenant names are present.
The generated variant moves selection state from an array (bookings,
checked via .includes()) to a Set<string> of IDs — an incidental
improvement made possible by the rewrite, not something the generated
client required.