Skip to content

Commit 9b952fb

Browse files
feat: add designer onboarding setup script and getting-started guide
Setup script verifies JFrog registry access without exposing tokens, installs deps, and starts dev server. Getting-started guide covers full workflow from GitHub template to designing with Claude.
1 parent 391d5ec commit 9b952fb

File tree

3 files changed

+145
-0
lines changed

3 files changed

+145
-0
lines changed

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Lightweight Vue 3 app for building static prototypes using the Ankorstore Design
99
- CSS design tokens (`src/styles/design-tokens.css`)
1010
- Static JSON fixtures (mock data)
1111

12+
## First-Time Setup
13+
- Run `bash scripts/setup.sh` — verifies registry access, installs deps, starts dev server
14+
- Requires JFrog token in `~/.npmrc` (see `docs/designer-getting-started.md`)
15+
- If setup fails on registry access, guide user to configure their JFrog token (do NOT ask for the token)
16+
1217
## Commands
1318
- `npm run dev` — Start dev server (http://localhost:3000)
1419
- `npm run build` — Type-check + build for static deployment

docs/designer-getting-started.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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

scripts/setup.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
# DS Prototype Template — First-time setup
3+
# Run: bash scripts/setup.sh
4+
5+
set -e
6+
7+
echo "=== DS Prototype Template Setup ==="
8+
echo ""
9+
10+
# Check Node
11+
if ! command -v node &> /dev/null; then
12+
echo "ERROR: Node.js is not installed."
13+
echo "Install it from https://nodejs.org/ (LTS version recommended)."
14+
exit 1
15+
fi
16+
echo "Node: $(node --version)"
17+
18+
# Check npm registry auth
19+
echo ""
20+
echo "Checking access to @ankorstore private registry..."
21+
if npm view @ankorstore/design-system version --silent 2>/dev/null; then
22+
echo "Registry access OK."
23+
else
24+
echo ""
25+
echo "ERROR: Cannot access @ankorstore private registry."
26+
echo ""
27+
echo "You need to configure your JFrog access token in ~/.npmrc"
28+
echo "Follow the Notion guide: \"DS Prototype — Getting Started\""
29+
echo ""
30+
echo "Quick steps:"
31+
echo " 1. Go to https://ankorstore.jfrog.io → Profile → Generate Token"
32+
echo " 2. Add this line to ~/.npmrc (create the file if it doesn't exist):"
33+
echo " //ankorstore.jfrog.io/artifactory/api/npm/npm-virtual/:_authToken=YOUR_TOKEN"
34+
echo ""
35+
echo "Then run this script again."
36+
exit 1
37+
fi
38+
39+
# Install dependencies
40+
echo ""
41+
echo "Installing dependencies..."
42+
npm install
43+
44+
# Start dev server
45+
echo ""
46+
echo "Setup complete! Starting dev server..."
47+
echo "Open http://localhost:3000 in your browser."
48+
echo ""
49+
npm run dev

0 commit comments

Comments
 (0)