|
| 1 | +# CLAUDE.md - Phase Nexa Website |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +This is the source for [phasenexa.github.io](https://phasenexa.github.io), the public website for Phase Nexa - developer tools for European energy trading professionals. The site is built with [Retype](https://retype.com/) and deployed to GitHub Pages. |
| 6 | + |
| 7 | +## Build & Run |
| 8 | + |
| 9 | +```bash |
| 10 | +# Install Retype |
| 11 | +npm install retypeapp --global |
| 12 | + |
| 13 | +# Local development (auto-reload) |
| 14 | +retype start |
| 15 | + |
| 16 | +# Production build |
| 17 | +retype build |
| 18 | +``` |
| 19 | + |
| 20 | +The site deploys automatically via GitHub Actions to the `retype` branch, which GitHub Pages serves. |
| 21 | + |
| 22 | +## Repository Structure |
| 23 | + |
| 24 | +``` |
| 25 | +phasenexa.github.io/ |
| 26 | +├── .github/workflows/ |
| 27 | +│ ├── build.yml # Manual trigger: clone repos, update content, build, deploy |
| 28 | +│ └── claude.yml # @claude interaction for issues/PRs |
| 29 | +├── _includes/ |
| 30 | +│ └── head.html # Injects custom CSS into all pages |
| 31 | +├── static/ |
| 32 | +│ ├── css/custom.css # Phase Nexa theme overrides |
| 33 | +│ └── images/logo.png # Logo file |
| 34 | +├── libraries/ # Per-library documentation pages |
| 35 | +│ ├── index.md # Library overview |
| 36 | +│ ├── nexa-marketdata.md |
| 37 | +│ ├── nexa-bidkit.md |
| 38 | +│ ├── nexa-connect.md |
| 39 | +│ └── nexa-mcp.md |
| 40 | +├── index.md # Landing page (hero, CTA) |
| 41 | +├── getting-started.md # Quick start guide |
| 42 | +├── premium.md # Premium tiers (coming soon) |
| 43 | +├── community.md # Community page, logos, contributing |
| 44 | +├── retype.yml # Retype project configuration |
| 45 | +└── CLAUDE.md # This file |
| 46 | +``` |
| 47 | + |
| 48 | +## Content Update Workflow |
| 49 | + |
| 50 | +When the `build.yml` workflow runs with `update_content: true`, Claude Code is invoked to: |
| 51 | + |
| 52 | +1. Read each sibling repo cloned into `.repos/` (nexa-marketdata, nexa-bidkit, nexa-connect, nexa-mcp, etc.) |
| 53 | +2. Analyse their README.md, CHANGELOG.md, pyproject.toml/go.mod, source code, and tests |
| 54 | +3. Update the corresponding `libraries/*.md` pages with current information |
| 55 | +4. Update the landing page stats or messaging if anything material has changed |
| 56 | +5. Commit changes back to `main` before the Retype build runs |
| 57 | + |
| 58 | +### How to update library pages |
| 59 | + |
| 60 | +Each library page in `libraries/` follows a consistent structure: |
| 61 | +- YAML frontmatter with `label`, `icon`, `order`, and `description` |
| 62 | +- Hero section with library name, one-line description, and install command |
| 63 | +- "What it does" section with key features |
| 64 | +- Quick start code example |
| 65 | +- API reference highlights |
| 66 | +- Link to full GitHub repo |
| 67 | + |
| 68 | +When updating these pages, pull information from: |
| 69 | +- The repo's `README.md` for description and examples |
| 70 | +- `pyproject.toml` or `go.mod` for version and dependencies |
| 71 | +- `CHANGELOG.md` or git tags for latest version |
| 72 | +- `src/` or source directories for module/package structure |
| 73 | +- Test files for usage patterns |
| 74 | + |
| 75 | +### What NOT to change automatically |
| 76 | + |
| 77 | +- `index.md` hero copy and CTA (marketing copy, change only if instructed) |
| 78 | +- `premium.md` pricing or tier details |
| 79 | +- `community.md` company logos or testimonials |
| 80 | +- `retype.yml` configuration |
| 81 | +- `static/css/custom.css` styling |
| 82 | + |
| 83 | +## Writing Style |
| 84 | + |
| 85 | +- Professional but approachable. Not corporate, not overly casual. |
| 86 | +- Write for developers and quants who are sceptical of marketing. |
| 87 | +- Show code first, explain second. These people want to see `pip install` before they want to read about "our vision". |
| 88 | +- British English spelling throughout (colour, analyse, optimise, licence). |
| 89 | +- No em-dashes. Use standard punctuation. |
| 90 | +- No sycophantic language. No "revolutionary", "cutting-edge", "game-changing". |
| 91 | +- Keep it honest. If a feature is coming soon, say "coming soon", don't imply it exists. |
| 92 | + |
| 93 | +## Design & Styling |
| 94 | + |
| 95 | +The site uses Phase Nexa's design system. Key principles: |
| 96 | +- **Less, but better** (Dieter Rams). Every element justifies its existence. |
| 97 | +- **Colour is functional**. Green = positive/success. Red = negative/error. Violet = action. Cyan = active. Gold = value. |
| 98 | +- **Dark theme preferred**. The Retype dark theme is configured with Phase Nexa colours. |
| 99 | + |
| 100 | +### Colour Reference |
| 101 | + |
| 102 | +| Name | Hex | Use | |
| 103 | +|----------------|-----------|--------------------------------| |
| 104 | +| Deep Space | `#0A1E36` | Sidebar, recessed areas | |
| 105 | +| Quantum Blue | `#0E2A47` | Page background | |
| 106 | +| Nebula | `#122F4D` | Cards, elevated surfaces | |
| 107 | +| Pulse Violet | `#8A6CFF` | Primary action, buttons, links | |
| 108 | +| Cyber Cyan | `#00E5FF` | Active state, info, highlights | |
| 109 | +| Neon Gold | `#FFD700` | Value display, emphasis | |
| 110 | +| Mint | `#4DFFC3` | Positive, success, buy | |
| 111 | +| Electric Coral | `#FF6B6B` | Negative, sell, decline | |
| 112 | +| Neon Rose | `#FF4D6A` | Error, destructive actions | |
| 113 | +| Amber Flux | `#FFAA33` | Warning, caution | |
| 114 | + |
| 115 | +### Retype Components |
| 116 | + |
| 117 | +Use Retype's built-in components where appropriate: |
| 118 | +- `!!!` callouts for warnings, tips, info |
| 119 | +- `===` panels for grouped content |
| 120 | +- `+++` tabs for language/platform alternatives |
| 121 | +- `[!badge]` for version badges |
| 122 | +- Code blocks with language identifiers |
| 123 | + |
| 124 | +## Sibling Repositories |
| 125 | + |
| 126 | +These are the repos Claude should analyse when updating content: |
| 127 | + |
| 128 | +| Repository | Language | Description | |
| 129 | +|-------------------|----------|--------------------------------------------------| |
| 130 | +| nexa-marketdata | Python | Unified API client for European power market data | |
| 131 | +| nexa-bidkit | Python | Day-ahead and intraday auction bid generation | |
| 132 | +| nexa-connect | Go | Exchange connectivity SDK | |
| 133 | +| nexa-mcp | Python | MCP server for LLM clients | |
| 134 | + |
| 135 | +More repositories will be added over time. The workflow dynamically discovers repos in the `phasenexa` GitHub organisation. |
| 136 | + |
| 137 | +## CI/CD |
| 138 | + |
| 139 | +- **build.yml**: Manually triggered. Clones sibling repos, optionally runs Claude Code to update content, builds with Retype, deploys to `retype` branch for GitHub Pages. |
| 140 | +- **claude.yml**: Responds to `@claude` mentions in issues and PR comments. |
| 141 | +- GitHub Pages serves from the `retype` branch. |
| 142 | + |
| 143 | +## Important Notes |
| 144 | + |
| 145 | +- Never introduce colours outside the Phase Nexa palette. |
| 146 | +- All numerical data in examples should use realistic European energy market values (EUR/MWh, bidding zones like NO1, DE-LU, FR, etc.). |
| 147 | +- Code examples must be correct and runnable. Do not fabricate API responses. |
| 148 | +- Keep page count under 100 (Retype free tier limit, unless Community Key is configured). |
0 commit comments