|
| 1 | +# DS Prototype — Getting Started |
| 2 | + |
| 3 | +Guide for designers to set up a prototype project. One-time setup takes ~10 minutes. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- **GitHub account** with access to `ankorstore` org |
| 8 | +- **Claude** desktop app or terminal (already includes Node.js) |
| 9 | + |
| 10 | +## Step 1: JFrog Access (one-time) |
| 11 | + |
| 12 | +Our design system is a private npm package. You need a token to download it. |
| 13 | + |
| 14 | +1. Open [ankorstore.jfrog.io](https://ankorstore.jfrog.io) |
| 15 | +2. Log in with your Ankorstore SSO |
| 16 | +3. Click your **profile icon** (top right) → **Edit Profile** |
| 17 | +4. Scroll to **Authentication Settings** → Click **Generate Token** |
| 18 | +5. Copy the token (you won't see it again) |
| 19 | + |
| 20 | +Now add it to your machine. Open **Terminal** and paste this command (replace `YOUR_TOKEN`): |
| 21 | + |
| 22 | +```bash |
| 23 | +echo '//ankorstore.jfrog.io/artifactory/api/npm/npm-virtual/:_authToken=YOUR_TOKEN' >> ~/.npmrc |
| 24 | +``` |
| 25 | + |
| 26 | +**Important:** Never share this token with anyone or paste it into Claude. |
| 27 | + |
| 28 | +## Step 2: Create Your Project |
| 29 | + |
| 30 | +1. Go to [ds-prototype-template on GitHub](https://github.com/ankorstore/ds-prototype-template) |
| 31 | +2. Click the green **"Use this template"** button → **"Create a new repository"** |
| 32 | +3. Name it: `{feature}-prototype` (e.g., `checkout-prototype`) |
| 33 | +4. Set owner to **ankorstore**, visibility **Private** |
| 34 | +5. Click **Create repository** |
| 35 | + |
| 36 | +## Step 3: Clone & Setup |
| 37 | + |
| 38 | +In Terminal, run: |
| 39 | + |
| 40 | +```bash |
| 41 | +git clone git@github.com:ankorstore/{your-repo-name}.git |
| 42 | +cd {your-repo-name} |
| 43 | +bash scripts/setup.sh |
| 44 | +``` |
| 45 | + |
| 46 | +The setup script checks your access, installs dependencies, and starts the dev server. |
| 47 | + |
| 48 | +If it says "Cannot access registry" → go back to Step 1. |
| 49 | + |
| 50 | +## Step 4: Start Designing with Claude |
| 51 | + |
| 52 | +Open Claude (desktop app or terminal) in your project folder. Claude knows: |
| 53 | +- All available DS components and their props |
| 54 | +- How to create pages and routes |
| 55 | +- The two layout options (Default and Connected) |
| 56 | +- Design tokens (colors, spacing, typography) |
| 57 | + |
| 58 | +**Example prompts:** |
| 59 | +- "Create a new page for the checkout flow" |
| 60 | +- "Add a data table showing transaction history" |
| 61 | +- "Show me what DS components are available for forms" |
| 62 | +- "Switch this page to use the Connected layout" |
| 63 | + |
| 64 | +## Layouts |
| 65 | + |
| 66 | +| Layout | Description | When to use | |
| 67 | +|--------|-------------|-------------| |
| 68 | +| **Default** | Simple sidebar + breadcrumb topbar | Landing pages, simple prototypes | |
| 69 | +| **Connected** | Backoffice sidebar + topbar shell | Authenticated/dashboard pages | |
| 70 | + |
| 71 | +## Design Token Showcase |
| 72 | + |
| 73 | +Browse all available tokens at: |
| 74 | +- `http://localhost:3000/showcase/colors` |
| 75 | +- `http://localhost:3000/showcase/typography` |
| 76 | +- `http://localhost:3000/showcase/spacing` |
| 77 | + |
| 78 | +## Troubleshooting |
| 79 | + |
| 80 | +| Problem | Fix | |
| 81 | +|---------|-----| |
| 82 | +| "Cannot access registry" | Re-do Step 1, check token in `~/.npmrc` | |
| 83 | +| "command not found: git" | Install Git: `xcode-select --install` (Mac) | |
| 84 | +| "permission denied" on clone | Add SSH key to GitHub: [guide](https://docs.github.com/en/authentication/connecting-to-github-with-ssh) | |
| 85 | +| Dev server won't start | Run `npm install` first, then `npm run dev` | |
| 86 | + |
| 87 | +## Getting Help |
| 88 | + |
| 89 | +- Ask Claude — it has full context of this project |
| 90 | +- Slack: `#product-design-system` channel |
| 91 | +- Your tech lead can help with git/terminal issues |
0 commit comments