[ ] Consider GraphQL, it will be easier to fetch and cache data as needed, subscribe to DB updates, also types will be easier to manage on the frontend
[ ] Since need to add the new routes and all, GraphQL can be handy here.
Why GraphQL? The Prisma schema is actually already the GraphQL schema
[ ] Consider tRPC - built for NextJS, easier to manage types and allows subscriptions to updates to DB but rather new technology, but it's less complex to set up than GraphQL
[ ] Instead of having a server running backend, just use NextJS API routes and migrate NextJS to use /apphttps://www.prisma.io/nextjs
[ ] Server-sent events
[ ] Prisma Pulse is in early access?
We wouldn't want to implement our own WebSocket server
[ ] Consider GraphQL, it will be easier to fetch and cache data as needed, subscribe to DB updates, also types will be easier to manage on the frontend
[ ] Since need to add the new routes and all, GraphQL can be handy here. Why GraphQL? The Prisma schema is actually already the GraphQL schema
[ ] Consider tRPC - built for NextJS, easier to manage types and allows subscriptions to updates to DB but rather new technology, but it's less complex to set up than GraphQL
[ ] Instead of having a server running backend, just use NextJS API routes and migrate NextJS to use
/app
https://www.prisma.io/nextjs[ ] Server-sent events
[ ] Prisma Pulse is in early access? We wouldn't want to implement our own WebSocket server
[ ] Deploy to Supabase - https://supabase.com/docs/guides/realtime/subscribing-to-database-changes
[ ] Stick to
useSWR
for now[ ] handle booking race condition frontend
[ ] make sure you subscribe to/poll for updates to bookings from the backend
[ ] interfaces vs types fix - https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces
[ ] State management and data cache-ing and data fetching - see todos in code - https://stackoverflow.com/questions/65364352/is-it-correct-or-good-practice-to-use-swr-together-with-redux - note the diff between UI state and Server Cache-ing State