Why Next.js 15 + FastAPI instead of just Streamlit for the frontend? #2
-
|
Saw AgriTwin migrated away from a Streamlit monolith. What specifically pushed the move to a separate Next.js frontend instead of just scaling the Streamlit app? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Streamlit could not be split into independent, horizontally-scalable services — the whole UI and business logic lived in one Python process, so any change to one panel risked breaking another. Moving to Next.js/React on the frontend and FastAPI on the backend let each layer deploy, scale, and version independently (Vercel for FE, Railway for BE), gave us a real REST/WebSocket API other clients (ESP32, mobile) could consume, and made the migration incremental — the Streamlit app kept running as a fallback while the new stack was built out phase by phase. |
Beta Was this translation helpful? Give feedback.
Streamlit could not be split into independent, horizontally-scalable services — the whole UI and business logic lived in one Python process, so any change to one panel risked breaking another. Moving to Next.js/React on the frontend and FastAPI on the backend let each layer deploy, scale, and version independently (Vercel for FE, Railway for BE), gave us a real REST/WebSocket API other clients (ESP32, mobile) could consume, and made the migration incremental — the Streamlit app kept running as a fallback while the new stack was built out phase by phase.