I’m maintaining a production-level web app that runs on Next.js 13 (App Router), a FastAPI backend, and PostgreSQL. A few issues have crept in and I need them resolved quickly—starting with the one that hurts the most. Primary pain point Every request hitting several API routes returns a 500 error every time. I have full stack traces and database logs ready for you to inspect so you can zero-in on the root cause without guesswork. Additional fixes and tweaks • Authentication sessions sometimes expire even when “remember me” is set. • Pagination misbehaves on the user-listing screen. • A small Tailwind alignment glitch shows up on the dashboard. • Two SQL queries are noticeably slow and could use a rewrite or index tweak. Tech context Frontend: Next.js 13+ with the App Router and Tailwind CSS Backend: FastAPI (async), JWT auth, Python 3.11 Database: PostgreSQL 15 with Alembic migrations What I expect Clean, well-commented code pushed through Git, small commits tied to each fix, and changes verified on my staging server before we touch production. If a fix touches the DB, please include the migration. If you’ve untangled similar full-stack issues and can walk me through your approach as you go, let’s get this sorted.