The Next.js shopping app is a simple e-commerce application that uses Next.js, React, Tailwind CSS, MongoDB, TypeScript and Next Auth. It allows users to browse products, add them to the cart, and checkout using Stripe. The app also has authentication and authorization features using Next Auth and custom hooks.
To run the app locally, you need to have Node.js, npm, and MongoDB installed on your machine.
git clone https://github.com/tehseen01/nextjs-shopping-app.git
cd nextjs-shopping-app
npm install
.env.local
file in the root directory and add the following environment variables:MONGODB_URI= # your MongoDB connection string
NEXT_PUBLIC_FIREBASE_API_KEY= # your firebase api key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= # your firebase auth domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID= # your firebase project id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= # your firebase storage bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= # your firebase messaging sender id
NEXT_PUBLIC_FIREBASE_APP_ID= # your firebase app id
PAYMENT_URL= # http://localhost:3000
STRIPE_SECRET_KEY= # your Stripe secret key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= # your Stripe public key
npm run dev
To test the app, you can use the following credentials:
You can also use any email address and password to sign up as a new user.
To test the payment functionality, you can use the following test card details:
You can view the live demo of the app deployed on Vercel here: (https://dev-shopp.vercel.app/)
If you want to contribute to this project, please follow these guidelines:
feature/add-product-rating
)This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or feedback, feel free to contact me at tehseen.type@gmail.com.
Thank you for your interest in contributing to the nextjs-shopping-app. We appreciate your efforts to make this project better.