A powerful e-commerce engine built with Node.js, TypeScript, and GraphQL. This is the official starter template for the Unchained commerce platform.
- Overview
- Features
- Quick Start
- What's Next
- AI Integration
- Docker
- API Endpoints
- Configuration
- Development
- Contributing
This starter project combines the Unchained Engine — a modular, high-performance headless e-commerce backend — with the Unchained Admin UI, a powerful web-based interface for managing your store.
Together, they provide a complete out-of-the-box solution for building and running scalable e-commerce applications using modern technologies like Fastify, GraphQL, TypeScript, and Docker.
- 🚀 GraphQL API - Modern GraphQL API with GraphQL Yoga
- 🏪 Complete E-commerce - Products, orders, payments, delivery, and user management
- 💳 Payment Integration - Built-in Stripe integration and extensible payment plugins
- 📦 Delivery Management - Flexible delivery and shipping options
- 🎫 Ticketing System - Event and ticket management capabilities
- 🧠 Built-in LLM Chat Support - Easily enable AI-powered chat assistants via the Admin UI using providers like OpenAI or Anthropic
- 🔧 Admin UI - Built-in administration interface (admin-ui)
- 🐳 Docker Ready - Production-ready Docker configuration
- 🔒 Security - Session management, cookies, and secure authentication
- ⚡ Performance - Built with Fastify for high performance
- 🚀 Fastify
- 🧬 GraphQL Yoga
- 💠 MongoDB
- ⚙️ TypeScript (ESNext, NodeNext)
- 🧩 Plugin-based architecture
- Node.js >= 22.0.0
- npm >= 10.0.0
- MongoDB (for data storage)
-
Clone the repository
git clone https://github.com/unchainedshop/unchained.git cd unchained-app -
Install dependencies
npm install
-
Set up environment variables
cp .env.defaults .env # Edit .env with your configuration -
Start development server
npm run dev
The application will start on http://localhost:3000
npm run dev- Start development server with hot reloadnpm run build- Build the TypeScript applicationnpm start- Start production servernpm run lint- Format code with Prettiernpm run clean- Clean TypeScript build artifactsnpm run integration-test- Run integration tests
Once the application is running, here are the recommended next steps to get your store fully set up and ready to go:
Visit http://localhost:4010 to access the Admin Dashboard.
- 👤 Create your first admin user (this user will have full access)
- 🌍 Configure essential settings:
- Add supported currencies, languages, and countries
- 💳 Set up your commerce infrastructure:
- Add payment providers (e.g. Stripe)
- Add delivery providers (e.g. flat rate, zones)
- 🛒 Organize your catalog:
- Create assortments and categories
- Start adding products to your store
🎉 Once these steps are completed, your store backend is fully functional and ready for customers.
To build the storefront, you can use the official Unchained Storefront starter built with Next.js:
👉 https://github.com/unchainedshop/unchained-storefront
It connects directly to your GraphQL API and provides a customizable, production-ready frontend experience.
💡 The Admin UI uses secure, session-based authentication. The first user you create will automatically be assigned admin privileges.
The Unchained Admin UI includes built-in support for AI chat assistants using large language models (LLMs). With a few lines of code, you can enable an in-app assistant powered by providers like Anthropic (Claude) or OpenAI (GPT, DALL·E) for summarization, Q&A, or image generation.
You can manage your store using the built-in admin tools for products, orders, payments, and more — and with LLM integration enabled, the AI assistant can help automate or assist with these operations by providing intelligent summaries and suggestions directly inside the Admin UI.
Example integration using @unchainedshop/admin-ui/fastify:
import { connectChat, fastifyRouter } from "@unchainedshop/admin-ui/fastify";
import { anthropic } from '@ai-sdk/anthropic';
import { openai } from '@ai-sdk/openai';
if (process.env?.ANTHROPIC_API_KEY) {
fastify.log.info('Using ANTHROPIC_API_KEY, chat functionality will be available.');
connectChat(fastify, {
system:
'do not include the data in your summary, just write a summary about it in one short paragraph and never list all the fields of a result, just summarize paragraph about your findings, if necessary',
model: anthropic('claude-4-sonnet-20250514'),
maxSteps: 1,
imageGenerationTool: process.env?.OPENAI_API_KEY ? {
model: openai.image('dall-e-3'),
} : null,
});
}
## Docker
### Build and Run
```bash
# Build the Docker image
docker build -t unchained-app .
# Run the container
docker run -p 4010:4010 unchained-appThe Docker container includes a health check that queries the GraphQL endpoint to ensure the application is running properly.
- GraphQL Playground:
http://localhost:4010/graphql - Admin UI:
http://localhost:4010
The application uses a modular architecture with the following key components:
- Fastify - High-performance web framework
- GraphQL Yoga - GraphQL server implementation
- Unchained Platform - Core e-commerce engine
- Plugin System - Extensible plugin architecture
Environment variables are loaded from:
.env.defaults(default values).env(local overrides)
Key configuration options:
PORT- Server port (default: 3000)NODE_ENV- Environment (development/production)MONGODB_URL- MongoDB connection string
The starter includes all default plugins for:
- Payment processing (Stripe, etc.)
- Delivery providers
- User authentication
- Product management
- Order processing
The project uses modern TypeScript with:
- ES modules
- NodeNext module resolution
- Declaration generation
- Source maps for debugging
src/
├── boot.ts # Application entry point
tsconfig.json # TypeScript configuration
Dockerfile # Docker configuration
package.json # Dependencies and scripts
This project is part of the larger Unchained ecosystem. For contribution guidelines, please visit:
This project is licensed under the EUPL-1.2 License.
- Homepage: unchained.shop
- Documentation: Visit the official Unchained documentation
- Issues: GitHub Issues
- Vedran Rudelj vedran@unchained.shop
- Pascal Kaufmann pascal@unchained.shop
- Marco Wettstein maw@panter.ch
- Simon Emanuel Schmid simon@unchained.shop
- Mikael Araya Mengistu mikaeln@unchained.shop
Built with ❤️ by the Unchained team