Shopio is a feature-rich e-commerce app built with Next.js, TypeScript, Tailwind CSS, NextAuth for authentication, Firestore as the database, and Stripe for payment processing. This application offers a delightful shopping experience, featuring product discovery, a responsive cart system, and a secure checkout process.
- Getting Started
- Features
- Usage
- Technologies Used
- Authentication
- Firestore Integration
- Stripe Integration
- Contributing
- Demo
- Live URL
Ensure you have the following software installed on your machine:
- Node.js (version 18.16.0 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/sahupratik30/shopio.git
cd shopio
- Install dependencies:
npm install
# or
yarn
- Authentication: Utilized NextAuth for implementing secure user authentication.
- Product Browsing: Implemented a search bar for exploring a diverse range of products with a user-friendly interface.
- Shopping Cart: Enabled users to easily manage their selected items in the shopping cart.
- Wishlist: Added the ability for users to create and manage a wishlist of their favorite products.
- Database: Implemented Firestore, a flexible and scalable NoSQL database, to store and retrieve data.
- Payment Gateway: Implemented a secure purchase process with Stripe integration for payment processing.
To run the app in development mode, use the following command:
npm run dev
# or
yarn dev
Visit http://localhost:3000 in your browser to interact with the development version.
To create production build of the app, use the following commands:
npm run build
# or
yarn build
- Next.js
- TypeScript
- Tailwind CSS
- Redux-Toolkit
- NextAuth
- Firestore
- Stripe
Shopio uses NextAuth for authentication. To set up authentication:
Configure NextAuth in the app/api/auth/[...nextauth]/route.ts file and update environment variables in the .env.local file:
NEXTAUTH_SECRET=your_nextauth_secret
For more info, follow the official documentation.
Firestore is used as the database for Shopio. To integrate Firestore:
- Set up a Firestore project on the Firebase Console.
- Obtain your Firestore credentials.
- Update the .env.local file with Firestore credentials:
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
FIREBASE_MESSAGING_ID=your_firebase_messaging_id
FIREBASE_APP_ID=your_firebase_app_id
FIREBASE_PRIVATE_KEY=your_firebase_private_key
FIREBASE_CLIENT_EMAIL=your_firebase_client_email
Shopio leverages the Stripe API for secure and seamless payment processing. To integrate your own Stripe account:
- Create a Stripe account.
- Obtain your Stripe API keys.
- Update the .env.local file with your Stripe API keys:
STRIPE_PUBLIC_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
Run the below commands in your terminal to obtain the STRIPE_WEBHOOK_SECRET
:
stripe login
stripe listen --forward-to localhost:3000/api/webhook
Make sure you have Stripe CLI installed before using above commands. To install Stripe CLI follow the docs.
Any contributions are welcome. If make like this repo make sure you drop a ⭐.
Shopio.1.mp4
You can view the live demo of the app in this link -> https://shopio-xi.vercel.app/