A highly performant replica of McMaster-Carr using Next.js and AI generated content by @ethanniser, @RhysSullivan and @armans-code
Check out the detailed twitter thread
- Uses Next.js 15
- All mutations are done via Server Actions
- Partial Prerendering is used to precompute the shells of pages
- When deployed, these are served statically from the edge
- Dynamic data (such as cart information) is then streamed in
- Uses Drizzle ORM on top of Neon Postgres
- Images storied on Vercel Blob
- Used v0 to generate all initial UIs, check out some of the threads we were particularly impressed by:
- Used OpenAI's
gpt-4o-mini
with their batch API and the Vercel AI SDK to generate product categories, names and descriptions - GetImg.ai was used to generate product images via the
stable-diffusion-v1-5
model
- Make sure the Vercel project is connected to a Vercel Postgres (Neon) database and Vercel Blob Storage
- Run
pnpm db:push
to apply schema to your db
- Run
vc env pull
to get a.env.local
file with your db credentials. - Run
pnpm install
&&pnpm dev
to start developing - For DB migrations with
drizzle-kit
:- Make sure
?sslmode=required
is added to thePOSTGRES_URL
env for dev - Run
pnpm db:push
to apply schema to your db
- Make sure
- The data/data.zip includes a ~300 MB data.sql file with the full schema and 1,000,000+ products
![image](https://private-user-images.githubusercontent.com/100045248/378549426-926be902-8bc9-4303-8a41-cb0d5c117403.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTkxNjIsIm5iZiI6MTczODk1ODg2MiwicGF0aCI6Ii8xMDAwNDUyNDgvMzc4NTQ5NDI2LTkyNmJlOTAyLThiYzktNDMwMy04YTQxLWNiMGQ1YzExNzQwMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QyMDA3NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03YzlhMjg1Y2MxNDY4MDQxMjUzYmJmNzkyMDE1MzM0MDUxMzU0OGZmMzYxZDA0MWIxMzAxYWM3N2RkMjkxZDVmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.avx8kPElEDjQn0tMbmoFPlxp1O0ihdTRNyiQsVMAoZo)