A Next.js E-commerce app with Sanity.io and Stripe API. Built with TailwindCSS framework & SASS CSS extension.
Demo live at: nextjs-sanity-ecommerce-loq24.vercel.app
You may use
4242 4242 4242 4242
as card number when paying and futureMM/YY
value and arbitraryCVC
value
To run this app locally, you need to have Sanity.io and Stripe accounts.
sanity/schemas
from this project to your sanity project's schemas
directorysrc/lib/sanity/client.ts
with your own Sanity projectIt is important to provide the following environment variables in order for this project to run properly locally
SANITY_PROJECT_TOKEN
- Found under https://www.sanity.io/manage then select your project and then go to API -> Tokens
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
- This can be found in your Stripe's dashboard
STRIPE_SECRET_KEY
- This can be found in your Stripe's dashboard