My AI tech stack in 2024
Over the past 3 years, I've had the pleasure of building almost exclusively AI-enabled applications. I still remember building an AI brainstorming tool with GPT-3 before the days of ChatGPT (though it wasn't very good!).
After building more than a handful of AI-enabled apps, I have a stack that I'm pretty satisfied with (as of 2024). If you're someone looking to build an AI-based app for the first time, or just want to learn about another engineer's stack for comparison purposes, hopefully this post can be of use to you.
Some quick notes before starting
- This is not necessarily the best stack possible. But it's one I've shipped production apps with, which hopefully helps you make an informed decision if you don't yet have a preferred stack
- As for application requirements, the apps I write typically use LLMs either directly with the user (e.g. a realtime chat interface), or indirectly (e.g. generating content with AI, like an AI report writer). I don't typically work on deep-tech training models and whatnot. A different stack probably works better for those use cases.
Framework
Not an unusual recommendation here — I like Next.js with typescript, like many others.
One important thing to know about App Router vs Page Router is that only App Router Route Handlers support streaming, so if you want to stream responses, you'll at least need to use that portion of App Router.
Libraries
Here's a list of libraries I use regularly:
- Vercel AI SDK — absolutely love this library. I've tried other tools like Langchain and Llamaindex, but just found those abstractions to be a bit overbearing. I find Vercel's AI libraries to have a great tradeoff of simplicity and flexibility for many use cases.
- Zod — nowadays Zod is required for many AI libraries, but thought I'd mention it here anyways
- Temporal — love love love Temporal for workflow orchestration
- Prisma — definitely has some bugs here and there, but overall a great ORM
- Shadcn — technically not a "library", but it's the go-to for many builders wanting to quickly build out UI components that have some customization
- Tailwindcss
Other callouts:
- Remeda for more functional programming tools
- dotenv-flow — for handling environment variables
- Lucide-react — for icons
Deployment and developer experience
- Flightcontrol — A great wrapper over AWS. It's super easy to deploy a Next.JS app and the app runs significantly faster than serverless Vercel. It's also easy to get AWS credits, so basically free to get your app up and running
- Neondb — Probably the best cloud-based Postgres. Super easy to use, has a free tier, and has life-saving features like branching and history
Desktop tools
- Windsurf — Cursor is a generally more polished product, but Windsurf's Cascade mode is so much better than Cursor's composer that I ignore all its other issues (which will undoubtedly be fixed with time)
- Repo Prompt — A tool that helps you paste code and context into your LLM of choice. It sometimes works better than using the tools inside AI code editors.
- ChatGPT app — I've tried all the major LLM desktop apps and ChatGPT is the best in terms of friction.
alt+space
opens a popover chat that you can instantly chat with (much better than, say, Claude which brings you into the app first).