Fast Marketplace is a case study of a eCommerce platform implemented using Next.js, TypeScript, Tailwind CSS, Redux, NextAuth, Cloud Firestore Database, Webhooks, and Stripe Payments Checkout.
Includes eCommerce features like Shopping Cart, Checkout Payment, and Customer Order History.
First, clone the project and open it with Visual Studio Code:
git clone https://github.com/javigong/travel-nextjs-typescript-tailwind-mapbox-calendar-date-picker.git
cd travel-nextjs-typescript-tailwind-mapbox-calendar-date-picker
code .
Then, create a .env.local file in the root of the project and configure the following environment variables:
# Authentication
# Need to add Authorized redirect URIs to Google Cloud
# http://localhost:3000/api/auth/callback/google
# https://your.deployment.url.com/api/auth/callback/google
GOOGLE_ID=
GOOGLE_SECRET=
NEXTAUTH_URL=http://localhost:3000
# Firebase
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=
# Firebase Admin SDK
FIREBASE_ADMIN_PROJECT_ID=
FIREBASE_ADMIN_PRIVATE_KEY=
FIREBASE_ADMIN_CLIENT_EMAIL=
# Stripe Payments
# More info: https://stripe.com/docs/payments/accept-a-payment
STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
# Stripe Terminal/CLI
STRIPE_SIGNING_SECRET=
HOST=http://localhost:3000
To send Stripe events to a local webhook install Stripe CLI, login into your Stripe account, and use the --forward-to flag pointing to the webhook endpoint, and create a trigger for successful customer payments :
brew install stripe/stripe-cli/stripe
stripe login
stripe listen --forward-to localhost:3000/api/webhook
stripe trigger checkout.session.completed
Finally, install all the Fast Marketplace dependencies and run the application:
yarn
yarn dev
Now the application is running on http://localhost:3000 š
The current Stripe Checkout implementation simulates payments in test mode.
āļø Please, do not use real card details. Use the following test card details:
Fast Marketplace deployed using Vercel: