Skip to content

Commit 5729f29

Browse files
committed
Initial commit
0 parents  commit 5729f29

18 files changed

Lines changed: 1480 additions & 0 deletions

.github/workflows/build.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Build and deploy the Phase Nexa website.
2+
#
3+
# Manually triggered. Optionally runs Claude Code to analyse sibling
4+
# repositories and update library documentation before building.
5+
6+
name: Build & Deploy Website
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
update_content:
12+
description: "Run Claude Code to update library docs from repos"
13+
type: boolean
14+
default: true
15+
model:
16+
description: "Claude model to use for content updates"
17+
type: choice
18+
options:
19+
- claude-sonnet-4-6
20+
- claude-opus-4-6
21+
default: claude-sonnet-4-6
22+
23+
permissions:
24+
contents: write
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout website repo
31+
uses: actions/checkout@v4
32+
with:
33+
ref: main
34+
35+
# ---------------------------------------------------------------
36+
# Clone all Phase Nexa repositories (except this website)
37+
# ---------------------------------------------------------------
38+
- name: Discover and clone sibling repos
39+
env:
40+
GH_TOKEN: ${{ github.token }}
41+
run: |
42+
mkdir -p .repos
43+
echo "Discovering repositories in phasenexa org..."
44+
45+
repos=$(gh repo list phasenexa --json name --jq '.[].name' 2>/dev/null || echo "")
46+
47+
if [ -z "$repos" ]; then
48+
echo "No repos found via API, falling back to known list"
49+
repos="nexa-marketdata nexa-bidkit nexa-connect nexa-mcp"
50+
fi
51+
52+
for repo in $repos; do
53+
# Skip the website repo itself
54+
if [ "$repo" = "phasenexa.github.io" ]; then
55+
continue
56+
fi
57+
echo "Cloning $repo..."
58+
git clone --depth 1 "https://github.com/phasenexa/${repo}.git" ".repos/${repo}" 2>/dev/null || \
59+
echo "Warning: could not clone $repo (may not exist yet)"
60+
done
61+
62+
echo "Cloned repos:"
63+
ls -1 .repos/ 2>/dev/null || echo "(none)"
64+
65+
# ---------------------------------------------------------------
66+
# Run Claude Code to update content from repos
67+
# ---------------------------------------------------------------
68+
- name: Update content with Claude Code
69+
if: inputs.update_content
70+
uses: anthropics/claude-code-action@v1
71+
with:
72+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
73+
prompt: |
74+
You are updating the Phase Nexa website. Read CLAUDE.md for full instructions.
75+
76+
The sibling repositories have been cloned into .repos/ - analyse each one:
77+
1. Read their README.md, CHANGELOG.md, pyproject.toml or go.mod, and source code
78+
2. Update the corresponding libraries/*.md page with current, accurate information
79+
3. Keep the existing page structure and Retype frontmatter
80+
4. Update version numbers, feature lists, and code examples if they have changed
81+
5. Do NOT change index.md marketing copy, premium.md, or community.md unless instructed
82+
83+
If a repo directory in .repos/ has no corresponding libraries/ page yet, create one
84+
following the pattern of existing library pages.
85+
86+
After updating, commit your changes to the current branch with the message:
87+
"docs: update library pages from repo analysis"
88+
89+
Important:
90+
- Use British English spelling
91+
- All code examples must be realistic and correct
92+
- Follow the Phase Nexa styling guidelines in CLAUDE.md
93+
claude_args: |
94+
--model ${{ inputs.model }}
95+
--max-turns 30
96+
--allowedTools "Read,Write,Edit,Bash(git:*),Bash(ls:*),Bash(cat:*),Bash(find:*),Bash(head:*),Bash(tail:*),Bash(grep:*),Bash(wc:*)"
97+
98+
# ---------------------------------------------------------------
99+
# Build with Retype
100+
# ---------------------------------------------------------------
101+
- name: Build Retype website
102+
uses: retypeapp/action-build@latest
103+
104+
# ---------------------------------------------------------------
105+
# Deploy to retype branch for GitHub Pages
106+
# ---------------------------------------------------------------
107+
- name: Deploy to GitHub Pages
108+
uses: retypeapp/action-github-pages@latest
109+
with:
110+
update-branch: true

.github/workflows/claude.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Responds to @claude mentions in issues and PR comments.
2+
3+
name: Claude Code
4+
5+
on:
6+
issue_comment:
7+
types: [created]
8+
pull_request_review_comment:
9+
types: [created]
10+
issues:
11+
types: [opened, assigned]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'issues' && github.event.action == 'assigned' && github.event.assignee.login == 'claude[bot]')
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
issues: write
23+
pull-requests: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: anthropics/claude-code-action@v1
27+
with:
28+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Retype build output
2+
.retype/
3+
4+
# Cloned repos (workflow only)
5+
.repos/
6+
7+
# Node
8+
node_modules/
9+
10+
# OS
11+
.DS_Store
12+
Thumbs.db
13+
14+
# IDE
15+
.vscode/
16+
.idea/
17+
*.swp
18+
*.swo
19+
20+
# Temp
21+
*.tmp
22+
*.bak

CLAUDE.md

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

Comments
 (0)