simple-shop
v1.0.0
Published
A complete e-commerce template with Payload CMS, products, orders, and store management
Readme
ShopNex Simple Shop Template
A complete e-commerce solution built with Payload CMS 3.0, featuring products, orders, collections, payment processing, and comprehensive store management functionality.
Features
- Complete E-commerce Setup: Products, orders, collections, carts, and checkout sessions
- Payment Processing: Stripe integration with gift cards and payment tracking
- Store Management: Inventory, shipping, locations, and store settings
- CMS Integration: Rich content management with Payload CMS
- Theme Support: Customizable themes and page templates
- Analytics: Built-in analytics and reporting
- Email Integration: Easy email campaign management
- Plugin System: Extensible with ShopNex plugins
Quick Start
Create a new project using the ShopNex CLI:
npx create-shopnex-app my-shop --template simple-shop
cd my-shopManual Setup
If you prefer to set up manually:
Clone and setup environment:
git clone <your-repo-url> cd my-shop cp .env.example .envConfigure your environment variables:
DATABASE_URI: Your SQLite database pathPAYLOAD_SECRET: A secure secret for PayloadNEXT_PUBLIC_SERVER_URL: Your CMS URL (default: http://localhost:3000)NEXT_PUBLIC_STOREFRONT_URL: Your storefront URL (default: http://localhost:3020)STRIPE_SECRET_KEY: Your Stripe secret keySTRIPE_PUBLISHABLE_KEY: Your Stripe publishable key
Install dependencies and start development:
pnpm install pnpm devAccess your admin panel: Open
http://localhost:3000and create your first admin user.
Collections
This template includes the following pre-configured collections:
Core E-commerce
- Products: Product catalog with variants, pricing, and inventory
- Collections: Product groupings and categories
- Orders: Order management with status tracking
- Carts: Shopping cart functionality
- Checkout Sessions: Secure checkout process
Store Management
- Payments: Payment processing and tracking
- Shipping: Shipping methods and rates
- Locations: Store locations and warehouses
- Policies: Store policies and terms
Content & Marketing
- Media: Image and file management with optimization
- Campaigns: Marketing campaigns and promotions
- Themes: Customizable store themes
- Hero Pages: Landing page content
- Footer Pages: Footer content management
System
- Users: Admin user management
- Gift Cards: Digital gift card system
- Plugins: Plugin management system
Database Seeding
Populate your store with sample data:
pnpm db:seedThis will create sample products, collections, and store settings to get you started.
Development Scripts
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm format- Format code with Prettierpnpm db:seed- Seed database with sample datapnpm generate:types- Generate TypeScript typespnpm generate:schema- Generate database schema
Docker (Optional)
For containerized development:
- Ensure your
.envfile is configured - Run
docker-compose up - Access the admin panel at
http://localhost:3000
Plugin System
This template includes several ShopNex plugins:
- Analytics Plugin: Track store performance
- Store Plugin: Core e-commerce functionality
- Stripe Plugin: Payment processing
- Import/Export Plugin: Data management
- Email Plugin: Campaign management
- Builder.io Plugin: Visual page building
Customization
Adding Products
- Navigate to
/admin/collections/products - Click "Create New" to add products
- Configure variants, pricing, and inventory
Store Configuration
- Go to
/admin/globals/store-settings - Configure your store details, currency, and policies
- Set up shipping methods and payment options
Theme Customization
- Modify the theme configuration in
/admin/collections/themes - Customize colors, fonts, and layout options
- Create custom page templates
Production Deployment
Build the application:
pnpm buildSet production environment variables:
- Configure your production database
- Set up Stripe live keys
- Configure your domain URLs
Deploy using your preferred platform:
- Vercel, Netlify, or custom hosting
- Ensure environment variables are set
- Run database migrations if needed
Support
For issues and questions:
