A highly performant e-commerce template rebuilt with TanStack Start, based on the original NextFaster by @ethanniser, @RhysSullivan and @armans-code.
This project demonstrates the capabilities of TanStack Start including server-side rendering and Server functions.
Check out the detailed twitter thread for the original NextFaster
- Uses TanStack Start
- Server-side rendering
- Tanstack's Server Functions
- File-based routing
- Uses Drizzle ORM on top of Neon Postgres
- Images stored on Vercel Blob (from the original project)
- Make sure the Vercel project is connected to a Vercel Postgres (Neon) database and Vercel Blob Storage
- Run
pnpm db:pushto apply schema to your db - Run
pnpm buildto build the production bundle
- Run
vc linkto link your project to Vercel. - Run
vc env pullto get a.env.localfile with your db credentials. - Run
pnpm install&&pnpm devto start developing. - The data/data.zip includes a ~300 MB data.sql file with the full schema and 1,000,000+ products (Note, the data exceeds the size limit allowed by the free tier for Neon see more). To seed Vercel Postgres with this data:
- Unzip data.zip to data.sql.
- Run
psql "YOUR_CONNECTION_STRING" -f data/data.sql.
- Create the default roles in your database.
- Run
psql "YOUR_CONNECTION_STRING" - Now run CREATE ROLE default; and CREATE ROLE cloud_admin;
- Run
- For DB migrations with
drizzle-kit:- Make sure
?sslmode=requiredis added to thePOSTGRES_URLenv for dev - Run
pnpm db:pushto apply schema to your db
- Make sure
The TanstackFaster project is currently running on the Vercel free tier with negligible Neon DB costs.