15KB โข Zero Dependencies โข Framework Agnostic
Quick Start โข Examples โข Documentation โข Demo
PACE stands for Product, About, Chat, Executive Summary โ a UX pattern designed specifically for AI-powered storefronts and product catalogs.
Traditional e-commerce patterns don't work well for AI tools, MCP servers, and modern SaaS products. PACE solves this by combining four essential components:
๐ฆ Product
Intelligent catalog with filtering and discovery
i๏ธ About
Context and trust-building before commitment
๐ฌ Chat
AI-powered guided discovery
๐ฏ Executive Summary
Real-time insights and recommendations
| Traditional E-commerce | PACE Pattern |
|---|---|
| Product-first | Conversation-first |
| Transactional | Relational |
| Static categories | AI-guided discovery |
| One-size-fits-all | Contextual recommendations |
| Admin-only analytics | Visible insights |
- โก Lightweight โ 15KB minified + gzipped (6x smaller than React)
- ๐ Zero Dependencies โ Pure vanilla JavaScript
- ๐จ Framework Agnostic โ Works standalone or with React, Vue, Svelte
- ๐ค AI-Powered Chat โ Built-in Claude, OpenAI, and custom adapters
- ๐ Executive Summary โ Real-time conversation insights
- ๐ฏ Pattern-Based โ Encodes PACE Pattern into reusable framework
- ๐ Extensible โ Plugin system, themes, and adapters
- ๐ฑ Responsive โ Mobile-first design
- โฟ Accessible โ WCAG 2.1 compliant
- ๐ Academic โ Published on Zenodo with DOI
Via NPM:
npm install @semanticintent/pace-pattern
Via CDN:
<script type="module" src="https://unpkg.com/@semanticintent/pace-pattern@latest/dist/pace.esm.js"></script> <link rel="stylesheet" href="https://unpkg.com/@semanticintent/pace-pattern@latest/dist/pace.min.css">
Create an index.html:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My AI Storefront</title> <!-- Phosphor Icons --> <script src="https://unpkg.com/@phosphor-icons/web"></script> <!-- PACE.js CSS --> <link rel="stylesheet" href="https://unpkg.com/@semanticintent/pace-pattern/dist/pace.min.css"> </head> <body> <div id="app"></div> <script type="module"> import { PACE } from 'https://unpkg.com/@semanticintent/pace-pattern/dist/pace.esm.js'; const pace = new PACE({ container: '#app', products: './products.json' }); pace.mount(); </script> </body> </html>
Create a products.json:
{
"products": [
{
"id": "my-product",
"name": "My First Product",
"tagline": "A great AI tool",
"category": "tools",
"price_display": "free",
"description": "## My Product\n\nThis is amazing!",
"action": "github",
"action_url": "https://github.com/you/product"
}
]
}That's it! Open index.html in your browser. ๐
PACE.js is highly configurable while maintaining sensible defaults:
const pace = new PACE({ // Required container: '#app', products: './products.json', // or inline array // About Page about: { title: 'About Us', subtitle: 'Building the future of AI tools', sections: [ { title: 'Our Mission', content: '<p>...</p>' }, { title: 'Team', content: '<p>...</p>' } ] }, // Chat Widget chat: { enabled: true, provider: 'claude', apiKey: process.env.ANTHROPIC_API_KEY, model: 'claude-3-5-sonnet-20241022', placeholder: 'Ask about our products...', suggestions: [ 'What products do you offer?', 'How do I get started?' ] }, // Executive Summary executiveSummary: { enabled: true, updateInterval: 30000, // 30 seconds insights: ['trends', 'recommendations', 'key_moments'] }, // Theme theme: { primaryColor: '#667eea', accentColor: '#764ba2', font: 'Inter, system-ui, sans-serif' } }); pace.mount();
Products are defined in simple JSON:
{
"products": [
{
"id": "unique-id",
"name": "Product Name",
"tagline": "One-line description",
"category": "mcp_servers",
"price_display": "free",
"icon": "๐",
"description": "## Markdown Description\n\nSupports **markdown** formatting!",
"action": "github",
"action_url": "https://github.com/..."
}
]
}Supported actions:
githubโ Link to GitHub repositorydemoโ Link to live demodownloadโ Download linkbuyโ Purchase link
# Clone and run git clone https://github.com/semanticintent/pace.js cd pace.js/examples/minimal python -m http.server 8000 # Visit http://localhost:8000
import { useEffect, useRef } from 'react'; import { PACE } from '@semanticintent/pace-pattern'; function Store() { const ref = useRef(null); useEffect(() => { const pace = new PACE({ container: ref.current, products: './products.json' }); pace.mount(); return () => pace.destroy(); }, []); return <div ref={ref} />; }
<template> <div ref="container"></div> </template> <script> import { PACE } from '@semanticintent/pace-pattern'; export default { mounted() { this.pace = new PACE({ container: this.$refs.container, products: './products.json' }); this.pace.mount(); }, beforeUnmount() { this.pace.destroy(); } } </script>
class AnalyticsPlugin { init(pace) { pace.on('product-selected', ({ detail }) => { gtag('event', 'view_item', { item_id: detail.product.id }); }); } } pace.use(new AnalyticsPlugin());
class CustomAdapter { async sendMessage(message, context) { const response = await fetch('/api/chat', { method: 'POST', body: JSON.stringify({ message }) }); return response.json(); } } pace.components.chat.adapter = new CustomAdapter();
// Override CSS variables pace.setTheme({ primaryColor: '#ff6b6b', accentColor: '#4ecdc4', font: 'Poppins, sans-serif' });
- DESIGN_PRINCIPLES.md โ Architecture, philosophy, and technical design
- QUICK_START.md โ Get up and running in 5 minutes
- PROJECT_STATUS.md โ Current status and roadmap
- API Reference โ Coming soon
- Chat Adapters โ Coming soon
- Plugin Development โ Coming soon
MillPond Storefront is the official reference implementation of PACE 1.0.1:
- ๐ฏ Interactive Demo: demo.millpond.dev - PACE 1.0.1 pattern showcase
- ๐ช Production Site: millpond.dev - Live storefront with AI chat
- ๐ Source Code: github.com/semanticintent/millpond-storefront
| Feature | PACE.js | React | Vue | Alpine.js |
|---|---|---|---|---|
| Size | 15KB | 42KB | 34KB | 15KB |
| Dependencies | 0 | 2+ | 1+ | 0 |
| Build Required | โ | โ | โ | โ |
| Learning Curve | 5 min | Hours | Hours | 15 min |
| AI-Native | โ | โ | โ | โ |
| Pattern-Based | โ | โ | โ | โ |
PACE.js implements the PACE Pattern published on Zenodo. If you use this in your research or project, please cite:
@software{pace_pattern_2024, author = {Semantic Intent}, title = {PACE Pattern: Product, About, Chat, Executive Summary}, year = {2024}, publisher = {Zenodo}, version = {1.0.1}, doi = {10.5281/zenodo.18049371}, url = {https://doi.org/10.5281/zenodo.18049371} }
- Core framework
- Four main components
- Basic theming
- Plugin system
- Working examples
- NPM package published
- Build system (Rollup)
- TypeScript definitions
- Claude API adapter
- OpenAI API adapter
- Advanced analytics
- A/B testing
- Multi-language support
- Mobile app wrappers
- Headless CMS integration
See PROJECT_STATUS.md for detailed roadmap.
Contributions are welcome! Here's how you can help:
- ๐ Report bugs โ Open an issue
- ๐ก Suggest features โ Start a discussion
- ๐ Improve docs โ Submit a PR
- ๐จ Create themes โ Share with community
- ๐ Build plugins โ Extend functionality
See CONTRIBUTING.md for guidelines.
MIT ยฉ Semantic Intent
See LICENSE for details.
- Built with inspiration from Alpine.js, Preact, and the PACE Pattern
- Powered by Phosphor Icons
- Published on Zenodo
- ๐ Documentation
- ๐ฌ Discussions
- ๐ Issues
- ๐ Website
Built with โค๏ธ using the PACE Pattern
โญ Star this repo if you find it useful!