A modern, self-hosted e-commerce platform built with Next.js, Snipcart, and Docker.
- 🛍️ Modern e-commerce storefront
- 🔒 Admin panel for product management
- 💳 Snipcart integration for payments
- 🐳 Docker containerized for easy deployment
- 📱 Responsive design
- 🗄️ PostgreSQL database
- 🔐 User authentication
- 📸 Image upload and management
- Clone the repository
- Configure environment variables
- Start with Docker:
npm run docker:up
Create a .env.local
file with:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/ecommerce_db"
# Snipcart
NEXT_PUBLIC_SNIPCART_API_KEY="your_snipcart_public_key"
SNIPCART_SECRET_KEY="your_snipcart_secret_key"
# JWT
JWT_SECRET="your_jwt_secret_here"
# Admin
ADMIN_EMAIL="[email protected]"
ADMIN_PASSWORD="your_admin_password"
# App
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
# Install dependencies
npm install
# Start development server
npm run dev
# Run database migrations
npm run db:migrate
# Seed database with sample data
npm run db:seed
- Set up your environment variables
- Build and start with Docker:
npm run docker:build npm run docker:up
├── components/ # React components
├── pages/ # Next.js pages
├── prisma/ # Database schema and migrations
├── public/ # Static assets
├── styles/ # CSS styles
├── lib/ # Utility functions
├── types/ # TypeScript types
└── docker-compose.yml # Docker configuration
- Frontend: Next.js, React, Tailwind CSS
- Backend: Node.js, Prisma ORM
- Database: PostgreSQL
- Payments: Snipcart
- Deployment: Docker, Docker Compose