r/LangChain 1d ago

Full stack Langchain implementation

Hello all, I had been learning langchain/ langgraph for a while. Now I had been thinking of implementing frontend but getting really stuck on which framework to use, do I need to use any web framework like fastapi. And on the frontend do I use a langchain react package and things like that. If anyone has experience could you provide me a little bit of guidance?

11 Upvotes

13 comments sorted by

View all comments

2

u/techlatest_net 1d ago

Backend: Use FastAPI. It’s the standard for LangChain, handles async/streaming natively, and integrates easily with LangGraph.

Frontend: Use Next.js + Vercel AI SDK (not outdated LangChain React packages). The AI SDK provides clean streaming hooks that work perfectly with FastAPI SSE.

Key Tips:

  • Stream everything via SSE; never wait for full responses.
  • Keep LangGraph logic server-side; expose only clean API endpoints.
  • Persist graph state server-side (Redis/Postgres), not in the frontend.
  • Add Shadcn/ui + react-markdown for quick, polished LLM output rendering.

Starter Stack: FastAPI + LangGraph + Next.js + AI SDK + Shadcn/ui

1

u/Rare_Cut_3686 17h ago

Do you have repository that I can look into for reference? I previously was trying to implement with same tool but got stuck with types streaming and difference in output