Amazon Clone

An Amazon-clone project, which is built by Next.js, and bootstrapped with create-next-app.

Products data come from Fake Store API

See Demo on vercel

See Github source code

Functional Parts

  • SignIn with Google or Github account with NextAuth on top right side Main SignIn
  • SignOut on top right side SignOut
  • Add items to Cart Cart
  • Payment with Stripe Payment Payment Success
    • See test card here
  • See Orders while SignIn Orders

Tec

Development Notes

Local Getting Started

$ yarn install
$ yarn dev
# need .env.local file to make it work fine

Open http://localhost:3000 with your browser to see the result.

Variables in .env.local

  • NEXTAUTH_SECRET, for NextAuth
  • GOOGLE_CLIENT_ID, for NextAuth GoogleProvider
  • GOOGLE_CLIENT_SECRET, for NextAuth GoogleProvider
  • GITHUB_ID, for NextAuth GitHubProvider
  • GITHUB_SECRET, for NextAuth GitHubProvider
  • STRIPE_PUBLIC_KEY, for Stripe
  • STRIPE_SECRET_KEY, for Stripe
  • STRIPE_SIGNING_SECRET, for Stripe verify the HOST
  • SERVICE_ACCOUNT_KEY, for Stripe webhook
  • FIREBSE_CONFIG, for firebase
  • HOST, host url

Next steps

  • Keep Cart data after SignIn
  • More Orders detail
  • Upload product by user
  • Authenticated routing
  • Unit test