Skip to content

Commit f318258

Browse files
dgellowclaude
andauthored
feat: redesign documentation site with animated logo and improved UX (#7)
* feat: redesign documentation site with animated logo and improved UX Major documentation overhaul: • Simplified navigation from 23 pages to 7 essential pages • OAuth-first approach with bearer tokens as fallback option • Clean red theme matching logo design • Responsive theme switching (light/dark mode) New animated logo mascot: • Eyes look left, right, center with subtle nose rotation • Natural blinking animation with proper easing • 12-second cycle for subtle easter egg effect • Positioned correctly in hero layout Enhanced user experience: • Custom theme toggle (sun/moon icons vs dropdown) • Improved color contrast in both themes • Proper syntax highlighting and formatting • Fixed all configuration examples to match implementation Technical improvements: • Added Prettier formatting with Astro plugin • Created reusable components (CustomHero, AnimatedLogo, ThemeSelect) • Proper component override structure • CSS custom properties for consistent theming Removed overcomplicated structure and fixed content accuracy to match actual Go implementation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * add Makefile with convenience commands for docs * docs: update CLAUDE.md with documentation site guidelines Add comprehensive section covering: - Design philosophy and visual guidelines - Technical implementation details - Animation specifications - Color management and theming - Content guidelines and common issues - Deployment process Includes specific guidance on the animated mascot, proper color usage, and troubleshooting for future documentation work. --------- Co-authored-by: Claude <[email protected]>
1 parent 15b5bab commit f318258

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2071
-8946
lines changed

CLAUDE.md

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,110 @@ staticcheck ./...
196196

197197
# Run locally
198198
./mcp-front -config config.json
199+
200+
# Documentation site (from root)
201+
make doc # Start dev server
202+
make format # Format docs with Prettier
203+
make build # Build static site
199204
```
200205

201-
## Communication & Design Philosophy
206+
## Documentation Site Guidelines
207+
208+
### Design Philosophy
209+
210+
The documentation site follows terse, to-the-point prose style (like early Stripe or Stainless docs):
211+
- No bullet lists or tables in content
212+
- Conversational yet technical tone
213+
- Developer-to-developer communication
214+
- OAuth-first approach with bearer tokens as collapsible fallback
215+
216+
### Visual Design
217+
218+
- **Theme**: Clean red (#FF6B6B) matching logo, with softer red (#FF9999) for dark mode
219+
- **Logo**: Animated mascot that looks left/right/center with nose rotation and natural blinking
220+
- **Navigation**: Simplified from 23 pages to 7 essential pages
221+
- **Components**: Custom hero, theme switcher, and animated logo components
222+
223+
### Technical Implementation
224+
225+
**Structure** (docs-site/):
226+
```
227+
src/
228+
├── components/
229+
│ ├── AnimatedLogo.astro # Mascot with eye movement and blinking
230+
│ ├── CustomHero.astro # Hero layout with logo positioning
231+
│ └── CustomThemeSelect.astro # Sun/moon toggle vs dropdown
232+
├── assets/
233+
│ ├── logo.svg # Dark mode version (lighter strokes)
234+
│ └── logo-light.svg # Light mode version (darker strokes)
235+
└── styles/custom.css # Theme variables and animations
236+
```
237+
238+
**Key Features**:
239+
- Starlight theme with custom components and CSS overrides
240+
- Proper light/dark mode with automatic logo switching
241+
- 12-second animation cycle for subtle mascot behavior
242+
- Mobile-responsive design (needs work)
243+
244+
### Animation Details
245+
246+
The animated logo creates a face-like character:
247+
- **Eyes**: Left/right translation (1px) with synchronized movement
248+
- **Nose**: Subtle rotation (-1deg/+1deg) following eye direction
249+
- **Blinking**: Vertical scale (scaleY 0.1) with step-like timing for natural effect
250+
- **Timing**: 12-second cycle for easter egg discovery, not attention-grabbing
251+
252+
### Color Management
253+
254+
**CSS Custom Properties**:
255+
```css
256+
:root {
257+
--sl-color-accent: #FF6B6B; /* Light mode */
258+
}
259+
260+
[data-theme='dark'] {
261+
--sl-color-accent: #FF6B6B; /* Buttons */
262+
--sl-color-text-accent: #333333; /* Text on red backgrounds */
263+
}
264+
```
265+
266+
**Specific Overrides**:
267+
- GitHub icon: White in dark mode
268+
- Sidebar selection: Readable contrast
269+
- Anchor links: Light gray in dark mode
270+
- Content links: Red in dark mode
271+
- TOC current section: Red highlight
272+
273+
### Content Guidelines
274+
275+
**Configuration Examples**:
276+
- Always use `{"$env": "VAR"}` syntax, never bash `$VAR`
277+
- Match actual Go implementation exactly
278+
- Use realistic service names (e.g., "linear" not "database")
279+
- Include all required fields (version, transportType, etc.)
280+
281+
**Writing Style**:
282+
- Flowing prose, not lists
283+
- Explain the "why" not just "how"
284+
- Assume developer audience
285+
- Keep it concise but complete
286+
287+
### Common Issues
288+
289+
1. **Theme switching breaks**: Check CSS variable inheritance
290+
2. **Logo not animating**: Ensure component is properly imported and classes match
291+
3. **Colors wrong in dark mode**: Verify `[data-theme='dark']` selectors
292+
4. **Build failures**: Usually missing imports or malformed frontmatter
293+
5. **Content not updating**: Astro dev server cache, restart required
294+
295+
### Deployment
296+
297+
- Uses GitHub Pages with workflow in `.github/workflows/`
298+
- Build artifacts in `docs-site/dist/`
299+
- Base path: `/mcp-front` for GitHub Pages
300+
- Prettier formatting enforced
301+
302+
Remember: The mascot is an easter egg, not a distraction. Subtle movements create personality without being annoying.
202303

203304
### Understanding Sam's Standards
204305

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
doc:
2+
cd docs-site && npm run dev
3+
4+
format:
5+
go fmt ./...
6+
cd docs-site && npm run format
7+
8+
build:
9+
go build -o mcp-front ./cmd/mcp-front
10+
cd docs-site && npm run build
11+
12+
.PHONY: doc format build

docs-site/.prettierrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 80,
7+
"plugins": ["prettier-plugin-astro"],
8+
"overrides": [
9+
{
10+
"files": "*.astro",
11+
"options": {
12+
"parser": "astro"
13+
}
14+
},
15+
{
16+
"files": ["*.md", "*.mdx"],
17+
"options": {
18+
"proseWrap": "preserve",
19+
"printWidth": 100
20+
}
21+
}
22+
]
23+
}

docs-site/astro.config.mjs

Lines changed: 11 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,67 +12,30 @@ export default defineConfig({
1212
description: 'OAuth 2.1 authenticated proxy for Model Context Protocol servers',
1313
logo: {
1414
alt: 'MCP Front Logo',
15-
src: './src/assets/logo.svg',
15+
light: './src/assets/logo-light.svg',
16+
dark: './src/assets/logo.svg',
1617
},
1718
social: [
1819
{ icon: 'github', label: 'GitHub', href: 'https://github.com/dgellow/mcp-front' },
1920
],
2021
sidebar: [
22+
{ label: 'Introduction', slug: 'index' },
23+
{ label: 'Quickstart', slug: 'quickstart' },
2124
{
22-
label: 'Start Here',
25+
label: 'Examples',
2326
items: [
24-
{ label: 'Introduction', slug: 'index' },
25-
{ label: 'Getting Started', slug: 'getting-started' },
26-
{ label: 'Architecture', slug: 'architecture' },
27-
],
28-
},
29-
{
30-
label: 'Configuration',
31-
items: [
32-
{ label: 'Overview', slug: 'config/overview' },
33-
{ label: 'Bearer Token Auth', slug: 'config/bearer-token' },
34-
{ label: 'OAuth 2.1 Auth', slug: 'config/oauth' },
35-
{ label: 'MCP Servers', slug: 'config/mcp-servers' },
36-
{ label: 'Environment Variables', slug: 'config/environment' },
37-
],
38-
},
39-
{
40-
label: 'Deployment',
41-
items: [
42-
{ label: 'Docker', slug: 'deployment/docker' },
43-
{ label: 'Docker Compose', slug: 'deployment/docker-compose' },
44-
{ label: 'Google Cloud Run', slug: 'deployment/cloud-run' },
45-
{ label: 'Production Setup', slug: 'deployment/production' },
46-
],
47-
},
48-
{
49-
label: 'OAuth Guide',
50-
items: [
51-
{ label: 'OAuth 2.1 Overview', slug: 'oauth/overview' },
52-
{ label: 'Google Workspace Setup', slug: 'oauth/google-workspace' },
53-
{ label: 'Firestore Configuration', slug: 'oauth/firestore' },
54-
{ label: 'Security Best Practices', slug: 'oauth/security' },
55-
],
56-
},
57-
{
58-
label: 'API Reference',
59-
items: [
60-
{ label: 'Endpoints', slug: 'api/endpoints' },
61-
{ label: 'Authentication', slug: 'api/authentication' },
62-
{ label: 'SSE Protocol', slug: 'api/sse-protocol' },
63-
],
64-
},
65-
{
66-
label: 'Development',
67-
items: [
68-
{ label: 'Testing', slug: 'dev/testing' },
69-
{ label: 'Architecture Decisions', slug: 'dev/architecture-decisions' },
27+
{ label: 'Bearer Token', slug: 'examples/bearer-token' },
28+
{ label: 'OAuth with Google', slug: 'examples/oauth-google' },
29+
{ label: 'Deploy to Cloud Run', slug: 'examples/cloud-run' },
7030
],
7131
},
32+
{ label: 'Configuration', slug: 'configuration' },
33+
{ label: 'API Reference', slug: 'api-reference' },
7234
],
7335
customCss: ['./src/styles/custom.css'],
7436
components: {
7537
Header: './src/components/CustomHeader.astro',
38+
ThemeSelect: './src/components/CustomThemeSelect.astro',
7639
},
7740
}),
7841
],

docs-site/package-lock.json

Lines changed: 61 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs-site/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@
99
"build": "astro build",
1010
"preview": "astro preview",
1111
"astro": "astro",
12-
"deploy": "npm run build && gh-pages -d dist"
12+
"deploy": "npm run build && gh-pages -d dist",
13+
"format": "prettier --write \"src/**/*.{astro,md,mdx,js,ts,json}\"",
14+
"format:check": "prettier --check \"src/**/*.{astro,md,mdx,js,ts,json}\""
1315
},
1416
"dependencies": {
1517
"@astrojs/starlight": "^0.34.3",
1618
"astro": "^5.6.1",
1719
"sharp": "^0.32.5"
1820
},
1921
"devDependencies": {
20-
"gh-pages": "^6.0.0"
22+
"gh-pages": "^6.0.0",
23+
"prettier": "^3.3.3",
24+
"prettier-plugin-astro": "^0.14.1"
2125
}
2226
}

docs-site/public/architecture.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 24 additions & 0 deletions
Loading

docs-site/src/assets/logo.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)