A sleek e-commerce platform showcasing modern web technologies with seamless shopping experience and secure payments
Features β’ Demo β’ Tech Stack β’ Screenshots β’ Getting Started
β Star this repo if you find it useful!
- Premium Product Catalog: Curated selection of high-end tech products (Audio, Wearables, Accessories, Monitors)
- Advanced Search: Real-time product search with instant results
- Smart Filtering: Category-based filtering with smooth animations
- Product Showcase: Beautiful product cards with hover effects and image optimization
- Responsive Grid: Adaptive layout that works perfectly on all devices
- Persistent Cart: Smart localStorage implementation keeps your cart across sessions
- Quantity Management: Intuitive plus/minus controls with real-time updates
- Dynamic Pricing: Live total calculation with shipping information
- Cart Persistence: Never lose your items - cart survives browser refreshes
- Empty State Design: Helpful guidance when cart is empty
- Stripe Integration: Enterprise-grade payment processing with Stripe Checkout
- Secure Checkout: PCI-compliant payment flow with fraud protection
- Payment Status: Real-time feedback for successful and canceled payments
- Error Handling: Comprehensive error handling with user-friendly messages
- Checkout Recovery: Smart handling of payment interruptions
- Dark/Light Mode: Seamless theme switching with preference persistence
- Glassmorphism Design: Modern frosted glass effects and gradient backgrounds
- Smooth Animations: Polished transitions and micro-interactions
- Mobile-First: Optimized experience across all screen sizes
- Accessibility: WCAG-compliant design with keyboard navigation
- Next.js 15: Latest App Router with React Server Components
- Optimized Images: Automatic image optimization and lazy loading
- Type Safety: Full TypeScript coverage with strict type checking
- Modern Stack: React 19 with concurrent features and automatic batching
- Security First: Secure payment handling and input validation
- Framework: Next.js 15 (App Router)
- UI Library: React 19
- Styling: Tailwind CSS 4.0
- Payment: Stripe (Checkout & API)
- UI Components: ShadCN UI + Radix UI
- Icons: Lucide React
- Type Safety: TypeScript 5
- State Management: React Context API + localStorage
- Image Optimization: Next.js Image Component
Live Demo: Visit MiniShop
Note: Make sure to set up Stripe environment variables for the payment functionality to work properly.
This application is built with a modern, scalable architecture:
- Frontend: Next.js 15 with App Router, React 19 Server Components, TypeScript
- Backend: Next.js API Routes (serverless functions)
- Payment: Stripe Checkout integration with webhook support
- State Management: React Context with localStorage persistence
- Styling: Tailwind CSS with custom design system and dark mode
- Deployment: Optimized for Vercel with automatic scaling
Make sure you have the following installed:
- Clone the repository
git clone https://github.com/emreyn1/minishop.git
cd minishop- Install dependencies
npm install- Set up environment variables
Create a .env.local file in the root directory:
# Stripe Configuration
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key_here
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key_here
# Optional: For production deployment
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here- Set up Stripe
- Create a Stripe account
- Get your test API keys from the Stripe Dashboard
- Add them to your
.env.localfile
- Run the development server
npm run devOpen http://localhost:3000 in your browser to view the application.
For detailed instructions on setting up Stripe:
- π Stripe Setup Guide
- π§ Environment Variables
- Browse Products: Explore our curated selection of premium tech products
- Search & Filter: Use the search bar or category filters to find specific items
- Add to Cart: Click "Add to Cart" on any product to start shopping
- Manage Cart: View, update quantities, or remove items from your cart
- Checkout: Secure payment processing with Stripe Checkout
- Confirmation: Receive instant payment confirmation
- Product Discovery: Browse by categories (Audio, Wearables, Accessories, Monitors)
- Smart Search: Find products instantly with real-time search
- Cart Management: Add, remove, and update quantities with visual feedback
- Secure Payments: Stripe-powered checkout with multiple payment methods
- Theme Switching: Toggle between light and dark modes
- Mobile Shopping: Optimized experience on all devices
- Fast Loading: Optimized bundle size with code splitting and lazy loading
- Server Components: React Server Components for better performance
- Image Optimization: Automatic image optimization and WebP conversion
- Caching Strategy: Intelligent caching for improved user experience
- Type Safety: Full TypeScript support for reliability
- Error Boundaries: Comprehensive error handling and recovery
- β Stripe PCI Compliance: Enterprise-grade payment security
- β Input Validation: Form validation and sanitization
- β Error Handling: Comprehensive error handling with user-friendly messages
- β Type Safety: Full TypeScript support for secure development
- β Environment Variables: Secure handling of sensitive payment data
- β HTTPS Only: Secure connections for all payment operations
minishop/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ checkout/ # Stripe checkout endpoint
β βββ cart/ # Shopping cart page
β βββ products/ # Products catalog page
β βββ layout.tsx # Root layout with providers
β βββ page.tsx # Homepage with hero section
β βββ globals.css # Global styles and themes
βββ components/ # React components
β βββ ui/ # ShadCN UI components
β βββ Navbar.tsx # Navigation with cart indicator
β βββ ProductCard.tsx # Product display card
β βββ footer.tsx # Site footer
βββ context/ # React Context providers
β βββ CartContext.tsx # Shopping cart state management
βββ lib/ # Utility libraries
β βββ products.ts # Product data and types
β βββ stripe.ts # Stripe configuration
β βββ utils.ts # Helper functions
βββ public/ # Static assets
β βββ screenshots/ # Project screenshots
βββ next.config.ts # Next.js configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies and scripts
# Development server
npm run dev
# Development with Turbopack
npm run dev:turbo
# Production build
npm run build
# Start production server
npm start
# Lint code
npm run lint- Hot Reload: Instant updates during development
- Type Checking: Real-time TypeScript error checking
- ESLint: Code quality and consistency checks
- Turbopack: Fast refresh and bundling (experimental)
The easiest way to deploy this Next.js app is using Vercel:
- Push your code to GitHub
git add .
git commit -m "Ready for deployment"
git push origin main-
Import to Vercel
- Go to Vercel Dashboard
- Click "Add New Project"
- Import your GitHub repository
- Configure project settings:
- Framework Preset: Next.js
- Build Command:
npm run build - Output Directory: (leave empty)
-
Add Environment Variables
- Add all environment variables from your
.env.localfile - Make sure to add them for all environments (Production, Preview, Development)
- Add all environment variables from your
-
Configure Stripe Webhooks (Optional)
- Set up Stripe webhooks for production order fulfillment
- Add webhook endpoint URL to Stripe Dashboard
-
Deploy!
- Click "Deploy"
- Wait for the build to complete
- Your app will be live at
https://your-project.vercel.app
For detailed Vercel deployment instructions:
- π Vercel Deployment Guide
- π§ Stripe Webhook Setup
- Stripe Setup: You need both publishable and secret keys for payments to work
- Environment Variables: All Stripe keys must be set for the application to function
- Test Mode: Use Stripe test keys for development and testing
- Production: Switch to live keys when deploying to production
- Webhooks: Optional but recommended for production order processing
- β Secure Payments: Stripe handles all payment data securely
- β No Data Storage: No sensitive customer data stored locally
- β HTTPS Required: All connections secured with SSL/TLS
- β Input Sanitization: All user inputs are validated and sanitized
- β Error Handling: Secure error messages that don't expose sensitive data
Contributions are welcome! Please feel free to submit a Pull Request.
- 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 open source and available under the MIT License.
Built with amazing open-source technologies:
- Next.js - The React Framework
- React - UI Library
- Stripe - Payment Processing
- Tailwind CSS - Styling Framework
- TypeScript - Type Safety
- ShadCN UI - UI Components
- Lucide - Beautiful Icons
Star this repo to show your support! β
Built with β€οΈ using Next.js, React, and TypeScript
Features β’ Demo β’ Getting Started β’ License
