A modern, production-ready e-commerce platform built with Next.js 13+, Prisma, and a comprehensive web stack. Features include authentication, secure payments, image management, and a polished UI powered by Tailwind CSS and Radix UI.
- 🔐 Authentication - Secure user management with NextAuth.js
- 🛍️ Product Management - Full CRUD operations with Prisma ORM
- 📦 Shopping Cart - Real-time cart management with optimistic updates
- 💳 Payments - Secure checkout with Stripe integration
- 🖼️ Image Uploads - Cloud storage with AWS S3
- 📱 Responsive Design - Mobile-first UI with Tailwind CSS
- 📧 Transactional Emails - Automated emails with React Email
- 📊 Analytics - Performance monitoring with Sentry
- Framework: Next.js 13+
- Database: Prisma with PostgreSQL
- Authentication: NextAuth.js
- UI: Tailwind CSS, Radix UI
- Payments: Stripe
- Email: React Email + Resend
- Monitoring: Sentry
- Storage: AWS S3
- Node.js 18+ and npm
- PostgreSQL database
- Stripe account
- AWS account (for S3)
-
Clone the repository:
git clone https://github.com/yourusername/nextjs-prisma-ecommerce.git cd nextjs-prisma-ecommerce
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
-
Update
.env
with your credentials:DATABASE_URL="postgresql://user:password@localhost:5432/mydb" NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key" STRIPE_SECRET_KEY="sk_test_..." STRIPE_PUBLIC_KEY="pk_test_..." AWS_ACCESS_KEY_ID="..." AWS_SECRET_ACCESS_KEY="..." AWS_S3_BUCKET_NAME="..."
-
Initialize the database:
npm run db:push
Start the development server:
npm run dev
Visit http://localhost:8080 to view the application.
Build and start the production server:
npm run build
npm start
src/
├── app/ # Next.js 13+ app directory
├── components/ # React components
├── lib/ # Utility functions
├── hooks/ # Custom React hooks
├── prisma/ # Database schema and migrations
└── styles/ # Global styles
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.