Now that my iPhone mobile app is working as intented functionally, I need to persist the data of my users using my own backend API and database instead of locally on the iPhone.
Create a Next.js API backend for this iOS mobile app with the following stack and structure:
- Next.js with App Router (API routes only, no frontend pages needed)
- Neon PostgreSQL database
- Drizzle ORM for database access
- NextAuth with Auth0 provider for authentication
- TypeScript with strict mode