Skip to content

Multi-tenant e-commerce SaaS platform built with Next.js, React, and NestJS. Features include storefront, admin dashboard, invoicing, payments (Stripe, PayPal, M-Pesa), and multi-currency support.

License

Notifications You must be signed in to change notification settings

Arnoldsteve/artisan-base

Repository files navigation

ArtisanBase 🎨

Empowering artisans with professional e-commerce solutions

Build and launch your online store without technical complexity


Storefront Dashboard Docs


ArtisanBase Platform


🌟 Overview

ArtisanBase is a full-stack multi-tenant SaaS platform that enables independent artisans and craftspeople to launch professional online storefronts. Built with enterprise-grade architecture, it provides secure, isolated environments for each creator while maintaining simplicity and ease of use.


Why ArtisanBase?

For Artisans
Focus on your craft, not technology. Get a professional online presence with zero technical knowledge required.

For Developers
Experience modern full-stack architecture with multi-tenancy, advanced security patterns, and scalable design.


πŸš€ Live Demos

πŸ›οΈ Customer Storefront βš™οΈ Admin Dashboard
Browse products, shopping cart, mobile responsive Analytics, inventory management, customization
artisan-base-storefront.vercel.app artisan-base-dashboard.vercel.app

πŸ“– Documentation β€’ πŸ› Report Issues β€’ πŸ’¬ Discussions


✨ Key Features

πŸͺ Multi-Tenant Architecture

  • Isolated database schemas per store
  • Enterprise-level data security
  • Handle thousands of stores seamlessly

πŸ” Enterprise Security

  • JWT authentication with httpOnly cookies
  • Role-based access control
  • End-to-end data encryption

🌐 Professional Storefronts

  • SEO-optimized with server-side rendering
  • Mobile-first responsive design
  • Custom branding for each store

⚑ Developer Experience

  • Full TypeScript type safety
  • Modern tooling and frameworks
  • Organized monorepo architecture

πŸ› οΈ Technology Stack

Frontend

Next.js 14+      App Router, SSR, modern React patterns
TypeScript       Type safety across the stack
Tailwind CSS     Utility-first styling
shadcn/ui        Beautiful, accessible components
React Hook Form  Performant form validation
TanStack Query   Server state management
Zod              Runtime type validation

Backend

NestJS           Scalable Node.js framework
Prisma ORM       Type-safe database access
Passport.js      Authentication middleware
PostgreSQL       Robust relational database

DevOps & Infrastructure

pnpm Workspaces  Monorepo package management
Turborepo        Build optimization and caching
Supabase         Managed PostgreSQL hosting
Vercel           Edge deployment platform

πŸ—οΈ Architecture Highlights

Schema-Per-Tenant Multi-Tenancy

Revolutionary data isolation where each store gets its own PostgreSQL schema (tenant_[storeId]):

tenant_001.products
tenant_001.orders
tenant_002.products
tenant_002.orders

Benefits:

  • βœ… Maximum security through complete data isolation
  • βœ… Independent scaling per tenant
  • βœ… Simplified compliance with data regulations

Dynamic Tenant Resolution

Request-scoped database connections with automatic tenant detection:

const tenantPrisma = await this.tenantPrismaService.getTenantClient(storeId);
const products = await tenantPrisma.product.findMany();

Seamless Development

  • Next.js proxies API requests (no CORS issues)
  • Hot reloading across the entire stack
  • Shared types and schemas between frontend and backend

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • pnpm package manager
  • PostgreSQL database (Supabase recommended)

Installation

# Clone repository
git clone https://github.com/Arnoldsteve/artisan-base.git
cd artisan-base

# Install dependencies
pnpm install

# Setup environment
cd packages/api
cp .env.example .env
# Edit .env with your configuration

# Setup database
pnpm exec prisma migrate dev
pnpm exec prisma generate

# Start development servers
cd ../..
pnpm dev

πŸŽ‰ You're ready!

  • Storefront: http://localhost:3000
  • Dashboard: http://localhost:3001
  • API: http://localhost:4000

πŸ“š Project Structure

artisan-base/
β”‚
β”œβ”€β”€ packages/
β”‚   β”‚
β”‚   β”œβ”€β”€ api/                    # NestJS Backend Server
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/           # Authentication & authorization
β”‚   β”‚   β”‚   β”œβ”€β”€ store/          # Store management
β”‚   β”‚   β”‚   β”œβ”€β”€ product/        # Product CRUD operations
β”‚   β”‚   β”‚   └── tenant/         # Multi-tenancy logic
β”‚   β”‚   └── prisma/             # Database schemas & migrations
β”‚   β”‚
β”‚   β”œβ”€β”€ dashboard/              # Admin Dashboard (Next.js)
β”‚   β”‚   β”œβ”€β”€ app/                # App Router pages
β”‚   β”‚   β”œβ”€β”€ components/         # Admin UI components
β”‚   β”‚   └── lib/                # Utilities & configurations
β”‚   β”‚
β”‚   β”œβ”€β”€ storefront/             # Customer Storefront (Next.js)
β”‚   β”‚   β”œβ”€β”€ app/                # App Router pages
β”‚   β”‚   β”œβ”€β”€ components/         # Storefront UI components
β”‚   β”‚   └── lib/                # Utilities & configurations
β”‚   β”‚
β”‚   └── common/                 # Shared Resources
β”‚       β”œβ”€β”€ types/              # TypeScript type definitions
β”‚       β”œβ”€β”€ schemas/            # Zod validation schemas
β”‚       └── utils/              # Helper functions
β”‚
β”œβ”€β”€ turbo.json                  # Turborepo configuration
└── package.json                # Workspace configuration

πŸ—ΊοΈ Roadmap

  • Dynamic Subdomains – Custom store.artisanbase.com URLs
  • Payment Integration – Stripe & PayPal checkout
  • Order Management – Complete order lifecycle
  • Analytics Dashboard – Sales insights & reporting
  • Theme Customization – Visual store builder
  • Mobile App – React Native companion
  • Email Notifications – Transactional emails
  • Inventory Alerts – Low stock warnings
  • Multi-Currency – International sales support
  • Shipping Integration – Real-time rates & tracking

🀝 Contributing

We welcome contributions from the community!

Getting Started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.


πŸ“„ License

This project is licensed under the MIT License – see LICENSE for details.

Free for personal and commercial use.


πŸ™ Acknowledgments

Built with ❀️ for the artisan community.

Special thanks to all the open-source projects and contributors who make this possible.


Made with 🎨 by Arnold Steve


⭐ Star this repo if you find it helpful! ⭐


GitHub stars GitHub forks

About

Multi-tenant e-commerce SaaS platform built with Next.js, React, and NestJS. Features include storefront, admin dashboard, invoicing, payments (Stripe, PayPal, M-Pesa), and multi-currency support.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •