Skip to content

unchainedshop/unchained-storefront

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Unchained Storefront

Next.js TypeScript Tailwind CSS GraphQL Node.js

A blazing-fast, modern e-commerce storefront built with Next.js and powered by Unchained Engine

Documentation


✨ Features

πŸ›οΈ Complete E-commerce Experience

  • Product Catalog - Browse products in different modes
  • Shopping Cart - Real-time cart management with persistent state
  • Multi-step Checkout - Streamlined checkout flow with guest checkout support
  • Order Management - Track orders and view order history
  • User Accounts - Registration, login, and profile management

πŸ’³ Payment Integrations

  • Stripe - Credit/debit card payments
  • Datatrans - Swiss payment method
  • Cryptopay - Cryptocurrency payments
  • Invoice - Traditional invoice payment

🎨 Modern UI/UX

  • Responsive Design - Mobile-first approach that works on all devices
  • Dark Mode - Built-in dark theme support
  • Glass Morphism - Modern frosted glass effects
  • Smooth Animations - Delightful micro-interactions and transitions

πŸ”§ Developer Experience

  • TypeScript - Full type safety with generated GraphQL types
  • Modular Architecture - Clean, maintainable code structure
  • Hot Reload - Fast development with Next.js Fast Refresh
  • Internationalization - Multi-language support out of the box

πŸš€ Quick Start

Prerequisites

  • Node.js 22.x (check .nvmrc)
  • npm or yarn
  • An Unchained Engine instance (or use our staging server)

Installation

  1. Clone the repository

    git clone https://github.com/unchainedshop/unchained-storefront.git
    cd unchained-storefront
  2. Install dependencies

    npm install
  3. Configure environment

    Create a .env file:

    UNCHAINED_ENDPOINT=https://your-unchained-instance.com/graphql
    SKIP_INVALID_REMOTES=true
  4. Start development server

    npm run dev

    Your storefront is now running at http://localhost:3000 πŸŽ‰

πŸ“¦ Available Scripts

# Development
npm run dev              # Start development server (staging backend)
npm run dev:local        # Start with local Unchained instance

# Production
npm run build           # Build for production
npm run start           # Start production server

# Code Quality
npm run lint            # Run ESLint and Prettier
npm run typecheck       # Run TypeScript compiler check

# GraphQL
npm run update-schema   # Update GraphQL schema from backend

# Internationalization
npm run extract-translation    # Extract translatable strings
npm run compile-translation    # Compile translation files

πŸ—οΈ Project Structure

unchained-storefront/
β”œβ”€β”€ πŸ“ modules/                 # Feature modules
β”‚   β”œβ”€β”€ apollo/                # GraphQL client configuration
β”‚   β”œβ”€β”€ assortment/            # Product categories
β”‚   β”œβ”€β”€ auth/                  # Authentication (password, WebAuthn)
β”‚   β”œβ”€β”€ cart/                  # Shopping cart logic
β”‚   β”œβ”€β”€ checkout/              # Checkout flow
β”‚   β”œβ”€β”€ common/                # Shared components
β”‚   β”œβ”€β”€ products/              # Product pages
β”‚   β”œβ”€β”€ orders/                # Order management
β”‚   └── layout/                # Layout components
β”œβ”€β”€ πŸ“ pages/                   # Next.js pages (routes)
β”œβ”€β”€ πŸ“ public/                  # Static assets
β”œβ”€β”€ πŸ“ i18n/                    # Translation files
β”œβ”€β”€ πŸ“ styles/                  # Global styles

🎨 Theming & Customization

Example Storefront Customization

In storefront/styles/globals.css:

:root {
  --primary-color: #0070f3;
  --secondary-color: #ff6b6b;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
}

🌍 Internationalization

The storefront comes with built-in i18n support:

  1. Add translations in i18n/[locale].json
  2. Extract new strings: npm run extract-translation
  3. Use in components:
    const { formatMessage } = useIntl();
    formatMessage({ id: 'welcome', defaultMessage: 'Welcome!' })

πŸ”Œ Payment Configuration

Stripe

STRIPE_PUBLIC_KEY=pk_test_...

Datatrans

DATATRANS_MERCHANT_ID=your_merchant_id
DATATRANS_TEST_MODE=true

🀝 Contributing

We love contributions! Please see our Contributing Guide for details.

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

πŸ™ Acknowledgments

πŸ’¬ Support


Built with ❀️ by the Unchained Team

⭐ Star us on GitHub β€” it motivates us!

About

E-Commerce Storefront Template

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6