Building an AI Directory with Astro, Drizzle and PostgreSQL
Every AI startup seems to begin with the same stack:
- Next.js
- React
- Prisma
- PostgreSQL
- Tailwind
For a long time, we did exactly the same.
Then we started building AI products that weren't just applications. They were content-heavy platforms:
- AI directories
- AI tool databases
- Blog-driven SaaS products
- Alternative pages
- Comparison pages
- Programmatic SEO content
And that's where things became interesting.
The majority of our pages didn't actually need React.
They needed speed.
They needed SEO.
They needed to rank.
They needed to load instantly.
So we started experimenting with Astro.
A year later, Astro became our default choice for almost every AI product we launch.
In this article I'll explain the exact stack we use today, why we replaced parts of our previous architecture, and what we'd choose if we had to build a new AI SaaS from scratch in 2026.
Why AI Products Have Different Requirements
Many AI startups make the mistake of treating everything as an application.
But when you look at successful AI businesses, a huge percentage of their traffic comes from content:
- Tool pages
- Category pages
- Blog articles
- Comparison pages
- Alternative pages
- Documentation
These pages don't need hydration.
They don't need client-side JavaScript.
They don't need React running everywhere.
They need to be fast.
Astro's "ship zero JavaScript by default" philosophy turned out to be exactly what we needed.
...
The Stack We Use Today
Frontend
- Astro
- TypeScript
- Tailwind CSS
- MDX
Backend
- Astro API Routes
- PostgreSQL
- Drizzle ORM
Infrastructure
- Vercel
- Neon
- Cloudflare
Authentication
- Better Auth
- Resend
Analytics
- Umami
Nothing revolutionary.
Nothing trendy.
Just tools that let us move quickly.
...
Why We Chose Drizzle Over Prisma
One thing we learned after multiple projects is that abstraction has a cost.
Prisma is excellent.
But for teams comfortable with SQL, Drizzle often feels closer to the database and easier to reason about.
A schema definition looks like SQL instead of an entirely separate layer of abstractions.
That simplicity becomes valuable as projects grow.
...
PostgreSQL Is Still Winning
Every year there's a new database trend.
Every year PostgreSQL remains the safest bet.
For an AI directory or AI SaaS, PostgreSQL can handle:
- Search
- Categories
- Tags
- User collections
- Reviews
- Favorites
- Analytics
Without introducing additional infrastructure.
In many cases, adding Elasticsearch or another search engine is simply unnecessary.
...
The Biggest Growth Lever Isn't AI
This might be controversial.
But the biggest growth lever for most AI startups isn't AI.
It's SEO.
Thousands of founders spend weeks improving prompts while completely ignoring their content architecture.
One well-ranked page can generate traffic for years.
That's why our architecture prioritizes:
- Static generation
- Fast page loads
- Clean HTML
- Structured content
- Programmatic SEO
Astro excels at all of these.
...
What We'd Build Today
If we were starting from zero tomorrow:
- Astro
- TypeScript
- PostgreSQL
- Drizzle ORM
- Better Auth
- Tailwind CSS
- Resend
- Vercel
That's it.
No microservices.
No Kubernetes.
No distributed systems.
No unnecessary complexity.
The goal isn't to build impressive infrastructure.
The goal is to build something users actually want.
Final Thoughts
The most valuable lesson we've learned is that simplicity compounds.
Every dependency adds maintenance.
Every service adds operational overhead.
Every abstraction eventually leaks.
The stack above isn't exciting.
That's exactly why it works.
It lets small teams ship quickly, iterate rapidly, and focus on solving real problems instead of maintaining infrastructure.
By the way, this exact architecture powers our AI discovery platform:
👉 NextWeekAI Directory
If you're building an AI SaaS, AI wrapper, AI directory, or content-driven startup, Astro is worth a serious look.

Top comments (0)