@adonisjs-ecommerce-core/create

Create a new AdonisCommerce e-commerce application (AdonisJS 7 + React) with SOLID principles


Keywords
adonisjs, ecommerce, create, scaffold, react, inertia, typescript, solid, solid-principles, architecture
License
MIT
Install
npm install @adonisjs-ecommerce-core/create@2.3.3

Documentation

๐Ÿ›’ AdonisCommerce

Modern, full-featured e-commerce framework built with AdonisJS 7 + InertiaJS + React 19

Features โ€ข Quick Start โ€ข Documentation โ€ข Contributing

AdonisJS 7 React 19 TypeScript MIT License


โœจ Features

๐Ÿช Storefront

  • ๐Ÿ›๏ธ Product catalog with advanced filtering and search
  • ๐ŸŽจ Product variants (Shopify-style options: size, color, etc.)
  • ๐Ÿ›’ Shopping cart with discount codes
  • ๐Ÿ’ณ Multi-step checkout process
  • ๐Ÿ‘ค Customer accounts & authentication
  • ๐Ÿ“ฆ Order history and tracking
  • โค๏ธ Wishlist functionality
  • โญ Product reviews and ratings
  • ๐Ÿ” Full-text search with filters

๐Ÿ”ง Admin Panel

  • ๐Ÿ“Š Dashboard with real-time analytics
  • ๐Ÿ“ฆ Product management (CRUD, variants, images, bulk actions)
  • ๐Ÿงพ Order management (status, fulfillment, refunds, timeline)
  • ๐Ÿ‘ฅ Customer management with order history
  • ๐Ÿ“ Category management (hierarchical tree)
  • ๐Ÿท๏ธ Discount code management (percentage, fixed, free shipping)
  • ๐Ÿ“ˆ Inventory tracking with low stock alerts
  • โš™๏ธ Store settings (general, tax, shipping, SEO)

๐Ÿ›  Technical Features

  • โšก AdonisJS 7 with TypeScript - Full-featured backend framework
  • โš›๏ธ React 19 + InertiaJS - SPA experience with SSR support
  • ๐ŸŽจ Tailwind CSS v4 - Modern utility-first styling
  • ๐Ÿ—„๏ธ PostgreSQL 16 - Robust database with JSONB support
  • โšก Redis 7 - Caching, sessions, and queue backend
  • ๐Ÿณ Docker - Development and production ready
  • ๐Ÿงช Puppeteer - Comprehensive E2E test suite
  • ๐ŸŒ Multi-tenant - Multiple stores on single installation
  • ๐ŸŒ Multi-language - i18n with locale detection
  • ๐Ÿ’ฑ Multi-currency - Currency conversion with exchange rates
  • ๐Ÿ“ก Event-driven - Async event processing for side effects

๐Ÿš€ Quick Start

Create a New Project

# Using npx (recommended)
npx create-adoniscommerce my-store

# Using pnpm
pnpm create adoniscommerce my-store

# Using yarn
yarn create adoniscommerce my-store

CLI Options

npx create-adoniscommerce my-store --docker    # Include Docker setup
npx create-adoniscommerce my-store --pnpm      # Use pnpm (default)
npx create-adoniscommerce my-store --npm       # Use npm
npx create-adoniscommerce my-store --no-git    # Skip git init
npx create-adoniscommerce my-store --no-install # Skip dependency installation

Start Development

cd my-store

# With Docker (recommended)
make docker-dev
make docker-db-reset

# Without Docker
pnpm install
pnpm dev

Access URLs

Service URL
Storefront http://localhost:3333
Admin Panel http://localhost:3333/admin
Adminer (DB) http://localhost:8080
Redis Commander http://localhost:8081
MailHog http://localhost:8025

๐Ÿ” Default Credentials

Admin Panel

Test Customers

Discount Codes

  • WELCOME10 - 10% off (min $50)
  • SAVE20 - $20 off (min $100)
  • FREESHIP - Free shipping (min $75)

๐Ÿ“ Project Structure

my-store/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”œโ”€โ”€ admin/           # Admin panel controllers (10)
โ”‚   โ”‚   โ””โ”€โ”€ storefront/      # Storefront controllers (5)
โ”‚   โ”œโ”€โ”€ models/              # Lucid ORM models (40+)
โ”‚   โ”œโ”€โ”€ services/            # Business logic layer (11)
โ”‚   โ”œโ”€โ”€ validators/          # VineJS validators (8)
โ”‚   โ”œโ”€โ”€ middleware/          # HTTP middleware (7)
โ”‚   โ”œโ”€โ”€ events/              # Event definitions
โ”‚   โ””โ”€โ”€ listeners/           # Event listeners
โ”œโ”€โ”€ config/                  # AdonisJS configuration
โ”‚   โ”œโ”€โ”€ commerce.ts          # E-commerce settings
โ”‚   โ”œโ”€โ”€ database.ts
โ”‚   โ””โ”€โ”€ redis.ts
โ”œโ”€โ”€ database/
โ”‚   โ”œโ”€โ”€ migrations/          # 55 database migrations
โ”‚   โ””โ”€โ”€ seeders/             # Database seeders
โ”œโ”€โ”€ docker/                  # Docker configuration
โ”œโ”€โ”€ inertia/
โ”‚   โ”œโ”€โ”€ components/          # React components
โ”‚   โ”‚   โ”œโ”€โ”€ admin/           # Admin UI components
โ”‚   โ”‚   โ”œโ”€โ”€ storefront/      # Storefront UI components
โ”‚   โ”‚   โ””โ”€โ”€ shared/          # Shared components
โ”‚   โ”œโ”€โ”€ lib/                 # Utilities
โ”‚   โ””โ”€โ”€ pages/               # React pages
โ”‚       โ”œโ”€โ”€ admin/           # Admin panel (10+ pages)
โ”‚       โ””โ”€โ”€ storefront/      # Storefront (10+ pages)
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ e2e/                 # Puppeteer E2E tests (6 suites)
โ”œโ”€โ”€ docker-compose.yml       # Docker development stack
โ”œโ”€โ”€ Dockerfile               # Production build
โ””โ”€โ”€ Makefile                 # Convenience commands

๐Ÿ›  Tech Stack

Category Technology
Backend AdonisJS 7 (Node.js)
Frontend React 19 + InertiaJS 4
Database PostgreSQL 16+
Cache/Session Redis 7+
Styling Tailwind CSS v4
ORM Lucid ORM 22
Validation VineJS 4
Build Tool Vite 7
Testing Japa 5 + Puppeteer
Package Manager pnpm 9+

๐Ÿณ Docker Commands

# Development
make docker-dev           # Start development environment
make docker-dev-tools     # Start with admin tools
make docker-stop          # Stop all containers
make docker-logs          # View app logs
make docker-shell         # Open shell in container

# Database
make docker-db-migrate    # Run migrations
make docker-db-seed       # Seed database
make docker-db-reset      # Fresh database with seeds

# Cleanup
make docker-clean         # Remove all containers and volumes

๐Ÿงช Testing

# Unit tests
pnpm test

# E2E tests (headless)
pnpm test:e2e

# E2E tests (with browser)
pnpm test:e2e:headed

# E2E tests (debug mode - slow motion)
pnpm test:e2e:debug

๐Ÿ“Š Database Schema

55+ tables organized by domain:

  • Core: stores, settings, admins, roles, permissions
  • Catalog: products, variants, categories, tags, attributes, collections
  • Sales: carts, orders, order_items, transactions, fulfillments, refunds
  • Customers: customers, addresses, wishlists, reviews
  • Pricing: discounts, tax_rates, tax_classes
  • Shipping: shipping_zones, shipping_methods
  • Content: pages, menus, banners
  • System: notifications, webhooks, analytics, locales, currencies

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/haliltoma/adonisjs-ecommerce-core.git
cd adonisjs-ecommerce-core

# Install dependencies
pnpm install

# Build CLI
pnpm build:cli

# Run template in development
pnpm dev

Publishing CLI

# Build and publish
pnpm publish:cli

# Version bump
pnpm version:patch  # 1.0.0 -> 1.0.1
pnpm version:minor  # 1.0.0 -> 1.1.0
pnpm version:major  # 1.0.0 -> 2.0.0

๐Ÿ“ฆ Monorepo Structure

adonisjs-ecommerce-core/
โ”œโ”€โ”€ packages/
โ”‚   โ””โ”€โ”€ create-adoniscommerce/  # CLI tool (npm package)
โ”œโ”€โ”€ templates/
โ”‚   โ””โ”€โ”€ default/                # Default project template
โ”œโ”€โ”€ docs/                       # Documentation
โ”œโ”€โ”€ package.json                # Root workspace
โ””โ”€โ”€ pnpm-workspace.yaml

๐Ÿ“ License

MIT License - see LICENSE for details.


๐Ÿ™ Acknowledgments

Inspired by:

  • MedusaJS - Modular backend architecture
  • Shopify - Product variant structure, admin UX
  • Bagisto - Open-source e-commerce features

Made with โค๏ธ by the AdonisCommerce Team