A modern e-commerce platform built with Next.js, TypeScript, and Stripe integration.

- 🛍️ Product browsing and search
- 🛒 Shopping cart functionality
- 💳 Secure checkout with Stripe
- 🔐 User authentication
- 📱 Responsive design
- 🔔 Real-time notifications
- 📦 Order management
- 🎨 Modern UI with Tailwind CSS
- Frontend: Next.js 14, React, TypeScript
- Styling: Tailwind CSS
- Payment: Stripe
- Icons: Lucide Icons
- State Management: React Context
- Authentication: NextAuth.js
- Node.js 18+
- npm or yarn
- Stripe account
Create a .env.local file in the root directory with the following variables:
# Stripe
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
# NextAuth
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000
# Database (if using)
DATABASE_URL=your_database_url- Clone the repository:
git clone https://github.com/yourusername/e-commerce.git
cd e-commerce- Install dependencies:
npm install
# or
yarn install- Run the development server:
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser.
src/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── checkout/ # Checkout pages
│ └── products/ # Product pages
├── components/ # React components
│ ├── client/ # Client-side components
│ └── server/ # Server-side components
├── context/ # React Context providers
├── lib/ # Utility functions
└── types/ # TypeScript type definitions
- Persistent cart state using React Context
- Add/remove items
- Update quantities
- Price calculations
- Cart review
- Shipping information
- Payment with Stripe
- Order confirmation
- Email notifications
- Toast notifications for:
- Successful payments
- Order updates
- Error messages
- Real-time updates using webhooks
# Run tests
npm run test
# or
yarn testThe project can be deployed to Vercel:
npm run build
# or
yarn build- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.