Next.js Discord

Discord Forum

Advice Needed: Transitioning Django Full-Stack Project to Django Backend + Vercel/Next.js Frontend

Unanswered
Siamese Crocodile posted this in #help-forum
Open in Discord
Avatar
Siamese CrocodileOP
Hi everyone,

I’m working on a Django-based project that handles both backend and frontend tasks. Recently, I’ve been considering decoupling these layers to use Next.js hosted on Vercel for the frontend. This change could provide a cleaner and more polished user experience.

Current Setup:

Backend: Django with robust functionality, including blog posts, user profiles, and feature pages.
Frontend: HTML templates and static files tightly integrated with Django.
Dynamic Features: Custom JavaScript handles block editors, event management, and other content.
Recent Changes: Significant refactoring was done recently, so starting over isn’t ideal.
Goals:

Use Django as a backend API server for logic, database interactions, and authentication.
Build a separate Next.js frontend on Vercel for improved design and deployment.
Minimize redundant work given recent refactoring.
Questions:

Integration: Should I incrementally migrate by replacing Django templates with React components, or is it better to rebuild the frontend in Next.js entirely?
Dynamic Features: How can I migrate JavaScript components like block editors into Next.js while keeping backend logic intact?
API Strategy: Should I design a full REST/GraphQL API in Django before migrating, or expose APIs iteratively as I migrate pages?
Pitfalls: What challenges might I face in this transition, and what strategies would you recommend to avoid common issues?
I’d prefer to avoid duplicating work but am open to strategic refactoring for better results. Any advice or resources would be greatly appreciated. Thanks in advance for your help!

0 Replies