https://e-commerce-site-coral-delta.vercel.app/
This project uses Vercel and Neon for hosting and database management. Follow these steps to set up your environment:
- Create a new project on Vercel.
- Connect your GitHub repository to Vercel (or create new repo + project directly from vercel).
- Naviagate to Dashboard.
- Navigate to Storage and select Neon Serverless Postgres from Marketplace.
- Fill out the form to create a new Neon database.
- Create a new account on Stripe.
- Create a new project and get your API keys.
- Add the Stripe publishable key and secret key to your environment variables.
- Create webhooks in Stripe to handle events like payment success, failure, etc. You can do this in the Stripe dashboard under Developers > Webhooks using your Vercel URL.
- Create a new account on PayPal Developer.
- Create a new app in the PayPal Developer dashboard and get your client ID and secret.
- Add the PayPal client ID and secret to your environment variables.
- Create a new account on Resend.
- Create a new project and get your API key.
Create a .env file in the root directory and add the following variables:
NEXT_PUBLIC_APP_NAME=
NEXT_PUBLIC_APP_DESCRIPTION=
NEXT_PUBLIC_SERVER_URL=
LATEST_PRODUCTS_LIMIT=
DATABASE_URL=
NEXTAUTH_URL=
NEXTAUTH_SECRET=
NEXTAUTH_URL_INTERNAL=
PAYMENT_METHODS="PayPal, Stripe, CashOnDelivery"
DEFAULT_PAYMENT_METHOD=
// PAYPAL
PAYPAL_CLIENT_ID=
PAYPAL_APP_SECRET=
PAYPAL_API_URL="https://api-m.sandbox.paypal.com"
// UPLOADTHING
UPLOADTHING_TOKEN=
UPLOADTHING_SECRET=
UPLOADTHING_APPID=
// STRIPE
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
//RESEND
RESEND_API_KEY=
SENDER_EMAIL=