langchain-ai/langchain-nextjs-template — reverse-engineered prompt
Reverse engineered prompt
Build me a clean LangChain and Next.js starter app that I can use as a demo for different AI chat patterns.
I want a simple chat page where the answer streams in live, plus separate examples I can switch between for structured answers, a smarter agent that can handle multi step questions, and a mode where I can upload or ingest some text and then ask questions about it. For the retrieval examples, use Supabase so the app can store the document embeddings, and make sure it can show useful source info when answering from the uploaded content.
Please include the basic environment setup for OpenAI, optional LangSmith tracing, SerpAPI for the web searching agent, and Supabase for retrieval. Keep the UI simple but polished, with a small navbar to move between the examples. Make it ready to run locally and easy to deploy on Vercel. Look up the current docs online if you need to.
Want more depth? Deep Reverse