A modern e-commerce application with Razorpay payment gateway integration and admin panel for order management.
- 🛒 Shopping cart functionality
- 💳 Online payments via Razorpay
- 💰 Cash on Delivery (COD) option
- 📦 Order management system
- 👨💼 Admin dashboard
- 📱 Responsive design
- Node.js 14.x or later
- MongoDB Atlas account or local MongoDB instance
- Razorpay account (for payment processing)
-
Clone the repository
git clone <repository-url> cd sunnydayy
-
Install dependencies
npm install
-
Set up environment variables
- Copy
.env.local.exampleto.env.local - Fill in your Razorpay API keys and MongoDB connection string
- Copy
-
Set up Razorpay
- Sign up at Razorpay
- Get your API keys from the Razorpay Dashboard
- Add the webhook URL in Razorpay Dashboard:
https://yourdomain.com/api/webhooks/razorpay
-
Run the development server
npm run dev
-
Build for production
npm run build npm start
Create a .env.local file in the root directory with the following variables:
# Razorpay Configuration
NEXT_PUBLIC_RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
# MongoDB Configuration
MONGODB_URI=your_mongodb_connection_string
MONGODB_DB=your_database_name
sunnydayy/
├── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Next.js pages
│ │ ├── api/ # API routes
│ │ └── admin/ # Admin panel pages
│ └── utils/ # Utility functions
├── public/ # Static files
└── styles/ # Global styles
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm test- Run testsnpm run lint- Run ESLint
This project is licensed under the MIT License - see the LICENSE file for details.