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-3.5-turbo
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
![image](https://private-user-images.githubusercontent.com/100045248/378549426-926be902-8bc9-4303-8a41-cb0d5c117403.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDE2NTgsIm5iZiI6MTczOTA0MTM1OCwicGF0aCI6Ii8xMDAwNDUyNDgvMzc4NTQ5NDI2LTkyNmJlOTAyLThiYzktNDMwMy04YTQxLWNiMGQ1YzExNzQwMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOFQxOTAyMzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hMTc3YjVkNjkxMDQwZTU0MzhlZWFjNjkxZDNiMWY2MzdkOGQ0NjY1ODhlYWIxZjRiNWM4YzZlZmY5ZGYyNGQ0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.GWY7pUABWrcFC5PFzP17CQGJDbXm23FqFl77HJKJn2g)