Skip to content

Latest commit

 

History

History
140 lines (108 loc) · 2.72 KB

File metadata and controls

140 lines (108 loc) · 2.72 KB

PACE.js - Quick Start Guide

Installation

Option 1: NPM (Recommended)

npm install @semanticintent/pace-pattern

Option 2: CDN

<script src="https://unpkg.com/@semanticintent/pace-pattern@latest/dist/pace.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@semanticintent/pace-pattern@latest/dist/pace.min.css">

Option 3: Local Development

git clone https://github.com/semanticintent/pace.js
cd pace.js
npm install
npm run dev

Minimal Example

Create an index.html:

<!DOCTYPE html>
<html>
<head>
  <title>My PACE Store</title>
  <script src="https://unpkg.com/@phosphor-icons/web"></script>
  <link rel="stylesheet" href="https://unpkg.com/@semanticintent/pace-pattern/dist/pace.min.css">
</head>
<body>
  <div id="pace-app"></div>

  <script type="module">
    import { PACE } from 'https://unpkg.com/@semanticintent/pace-pattern/dist/pace.esm.js';

    const pace = new PACE({
      container: '#pace-app',
      products: './products.json'
    });

    pace.mount();
  </script>
</body>
</html>

Create a products.json:

{
  "products": [
    {
      "id": "product-1",
      "name": "My First Product",
      "tagline": "A great product",
      "category": "tools",
      "price_display": "free",
      "description": "## My First Product\n\nThis is a great product!",
      "action": "github",
      "action_url": "https://github.com/you/product"
    }
  ]
}

Open index.html in your browser. Done! 🎉

Configuration

const pace = new PACE({
  // Required
  container: '#pace-app',
  products: './products.json', // or inline array

  // Optional
  about: {
    title: 'About Us',
    subtitle: 'We build cool stuff',
    sections: [...]
  },

  chat: {
    enabled: true,
    provider: 'claude',
    apiKey: 'YOUR_KEY',
    placeholder: 'Ask anything...'
  },

  executiveSummary: {
    enabled: true,
    updateInterval: 30000
  },

  theme: {
    primaryColor: '#667eea',
    accentColor: '#764ba2'
  }
});

Running Examples

cd examples/minimal
python -m http.server 8000
# or
npx serve .

Visit http://localhost:8000

Next Steps

Need Help?

Citation

Built using the PACE Pattern (v1.0.1):

DOI