Django + HTMX vs Next.js + Django REST API: Is React/Next.js necessary for a modern frontend?
I'm building a web application where Django is my primary framework and backend.
I currently have two frontend approaches:
Option 1: Next.js + Django REST API
Django serves only APIs.
Next.js consumes the APIs.
Requires maintaining separate frontend and backend projects.
Frontend directory is about 700 MB with ~30,000 files (
node_modules, build tooling, etc.).Additional effort is needed for API serialization, authentication flow, and frontend-backend integration.
Option 2: Django Templates + HTMX + Alpine.js + Tailwind CSS
Django views pass data directly to templates.
HTMX handles partial page updates.
Alpine.js is used for lightweight interactivity.
Tailwind CSS for styling.
Only a few template files are needed.
No separate frontend application or API layer for most pages.
My requirements:
Modern UI/UX
Fast development and maintenance
Good performance
SEO-friendly pages
Moderate interactivity (dashboards, forms, tables, filtering, modals, etc.)
Django remains the primary framework
My question:
Is separate frontend necessary to achieve a modern-looking and responsive frontend, or can HTMX + Alpine.js + Tailwind provide a comparable user experience for most business applications?
I'd appreciate answers based on real-world experience, including maintainability, scalability, developer productivity, and performance trade-offs.