A modern, full-stack e-commerce platform for contemporary fashion, built with Next.js and Express.
- Modern UI/UX: Glassmorphism design, smooth animations with Framer Motion
- Product Management: Full CRUD operations with Cloudinary image hosting
- Shopping Cart: Real-time cart with smooth slide-in animations
- Checkout Flow: Dedicated checkout page with M-Pesa integration
- M-Pesa Payments: STK Push and QR Code payment options
- Admin Dashboard: Product, order, and career management with analytics
- SEO Optimized: Dynamic sitemap, robots.txt, Open Graph tags
- Responsive Design: Mobile-first approach with Tailwind CSS
- Security: Rate limiting, input sanitization, CORS protection
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- Animations: Framer Motion
- State Management: React Context API
- Icons: Lucide React
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose
- File Upload: Cloudinary
- Payment: Safaricom M-Pesa API
- Security: Helmet, express-rate-limit, xss-clean
Nova/
├── client/ # Next.js frontend
│ ├── app/
│ │ ├── components/ # React components
│ │ ├── context/ # Context providers
│ │ ├── admin/ # Admin dashboard
│ │ ├── checkout/ # Checkout page
│ │ └── shop/ # Shop page
│ └── public/ # Static assets
├── src/
│ ├── models/ # Mongoose models
│ ├── routes/ # Express routes
│ └── middleware/ # Custom middleware
├── Dockerfile # Docker configuration
├── render.yaml # Render deployment config
└── netlify.toml # Netlify deployment config
- Node.js 18+
- MongoDB Atlas account
- Cloudinary account
- M-Pesa Sandbox credentials
- Clone the repository
git clone <your-repo-url>
cd Nova- Install backend dependencies
npm install- Install frontend dependencies
cd client
npm install
cd ..- Configure environment variables
Create .env in root directory:
MONGO_URI=your_mongodb_uri
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
MPESA_CONSUMER_KEY=your_consumer_key
MPESA_CONSUMER_SECRET=your_consumer_secret
MPESA_SHORTCODE=174379
MPESA_PASSKEY=your_passkey
ADMIN_API_KEY=your_admin_key
PORT=5000Create client/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:5000- Run development servers
Backend:
npm run dev
# or
node server.jsFrontend (in new terminal):
cd client
npm run devVisit:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Admin Dashboard: http://localhost:3000/admin
See DEPLOYMENT.md for detailed deployment instructions.
Backend (Render):
- Push to GitHub
- Connect repository to Render
- Select Docker environment
- Add environment variables
- Deploy
Frontend (Netlify):
- Connect repository to Netlify
- Set base directory to
client - Add
NEXT_PUBLIC_API_URLenvironment variable - Deploy
Access the admin dashboard at /admin with the configured ADMIN_API_KEY in the x-admin-api-key header.
The platform supports two M-Pesa payment methods:
- STK Push: Direct phone payment prompt
- QR Code: Scannable QR code for payment
Currently configured for Sandbox environment. Update URLs in .env for production.
- Glassmorphism effects
- Smooth page transitions
- Hover animations
- Responsive grid layouts
- Dark mode support (coming soon)
Admin dashboard includes:
- Revenue tracking
- Top products analysis
- Order statistics
- Customer insights
- Rate limiting on all routes
- Input sanitization
- XSS protection
- CORS configuration
- Helmet security headers
- MongoDB injection prevention
MIT License - feel free to use this project for your own purposes.
Contributions are welcome! Please feel free to submit a Pull Request.
For support or inquiries, visit novawears.tech