
After working with over 10 AI projects of various scales and complexity, I am beginning to see some clear patterns in AI development. As a result, some clear winners when it comes to framework choices.
NextJS with Python(specifically with GRPC) is a stack which I think solves a lot of AI development questions. here are some of the strengths I noticed with specific part of this stack,
NextJS is extremely robust and promotes clean architecture specially with App Router. Since the FE code is written in react, its extremely scalable and has a clear API architecture.
In my opinion, NextJS is a complete web framework similar to how Flutter or Electron are for mobiles and desktops respectively. I often find myself going with one of the three choices based on the platform. NextJS for Web based apps, Flutter for mobile apps and Electron with React for desktop apps.
The main reason I almost always choose Python for backend is because of the ecosystem, for example its extremely easy to download and infer a HugginFace model in python or using Autogen to create multiagentic flows.
GRPC on the other hand is awesome and I love it, especially I love it because it's clear API contracts, ability for bidirectional stream and excellent support in both NodeJS and Python.
To conclude, my favorite stack, NextJS and Python GRPC is less of a stack but more of a pattern in AI development with ability to swap out frontend based on the target platform.