Skip to content

About

A highly performant e-commerce template using Tanstack

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

TanstackFaster

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.

Design notes

Check out the detailed twitter thread for the original NextFaster

Deployment

  • 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 pnpm build to build the production bundle

Local dev

  • Run vc link to link your project to Vercel.
  • Run vc env pull to get a .env.local file with your db credentials.
  • Run pnpm install && pnpm dev to 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;
  • For DB migrations with drizzle-kit:
    • Make sure ?sslmode=required is added to the POSTGRES_URL env for dev
    • Run pnpm db:push to apply schema to your db

Performance

PageSpeed Report

speedreport

Costs

The TanstackFaster project is currently running on the Vercel free tier with negligible Neon DB costs.

About

A highly performant e-commerce template using Tanstack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages