Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI

on:
push:
pull_request:

jobs:
test:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v12

- name: Run tests in Nix dev shell
run: nix develop -c bash -lc "cd app && pnpm install --frozen-lockfile && pnpm test"
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v12

- name: Validate release version
shell: bash
run: |
set -euo pipefail

TAG_VERSION="${GITHUB_REF_NAME#v}"
PACKAGE_VERSION="$(grep -m1 '"version"' app/package.json | sed -E 's/.*"version": "([^"]+)".*/\1/')"
CARGO_VERSION="$(grep -m1 '^version = ' app/src-tauri/Cargo.toml | sed -E 's/version = "([^"]+)"/\1/')"
TAURI_VERSION="$(grep -m1 '"version"' app/src-tauri/tauri.conf.json | sed -E 's/.*"version": "([^"]+)".*/\1/')"

if [[ "$TAG_VERSION" != 1* ]]; then
echo "Release tag version must start with '1' or higher. Found: $TAG_VERSION" >&2
exit 1
fi

if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ] || [ "$TAG_VERSION" != "$CARGO_VERSION" ] || [ "$TAG_VERSION" != "$TAURI_VERSION" ]; then
echo "Version mismatch detected:" >&2
echo "tag=$TAG_VERSION package=$PACKAGE_VERSION cargo=$CARGO_VERSION tauri=$TAURI_VERSION" >&2
exit 1
fi

- name: Build release bundle
run: ./build-app.sh --release

- name: Package macOS artifacts
shell: bash
run: |
set -euo pipefail

VERSION_TAG="${GITHUB_REF_NAME}"
ARTIFACT_DIR="release-artifacts"
APP_PATH="app/src-tauri/target/release/bundle/macos/Ponder.app"

mkdir -p "$ARTIFACT_DIR"

if [ ! -d "$APP_PATH" ]; then
echo "Expected app bundle missing: $APP_PATH" >&2
exit 1
fi

ZIP_PATH="$ARTIFACT_DIR/Ponder-macOS-${VERSION_TAG}.zip"
ditto -c -k --sequesterRsrc --keepParent "$APP_PATH" "$ZIP_PATH"

DMG_PATH="$(find app/src-tauri/target/release/bundle -type f -name '*.dmg' | head -n 1 || true)"
if [ -n "$DMG_PATH" ]; then
cp "$DMG_PATH" "$ARTIFACT_DIR/"
fi

shasum -a 256 "$ARTIFACT_DIR"/* > "$ARTIFACT_DIR/SHA256SUMS.txt"

- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
release-artifacts/*
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
/.opencode
.opencode/

# OS files
.DS_Store

# Environment files
.env
.env.*
!.env.example

# Build artifacts and dependencies
dist/
node_modules/
app/dist/
app/node_modules/
app/src-tauri/target/
app/src-tauri/gen/

# Logs
*.log
39 changes: 4 additions & 35 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
# Agents

Project-level instructions for coding agents working in this repository.

## Nix (Builds and Dependencies)

Use Nix as the source of truth for tooling, builds, and dependencies.

- Prefer entering the dev environment via `nix develop` (or `nix develop .#<devShell>`) before running repo commands.
- Enter the dev environment with `nix develop` (or `nix develop .#<devShell>`) before running project commands.
- Prefer `nix build`, `nix run`, and `nix flake check` over ad-hoc install flows.
- Avoid installing tooling via Homebrew, npm/pnpm, or `cargo install` outside the Nix environment unless explicitly requested.
- Run the build script `./build-app.sh` after codings.

## References

- Figma MCP usage and handshake: `FIGMA_MCP.md`
- MCP examples: `FIGMA_MCP_EXAMPLES.md`

## UI Implementation

### Core principles

- Treat Figma MCP output as design reference, not final code style.
- Use existing components
- Replace Tailwind utilities with project tokens/utilities when applicable.
- Use the project's color system, typography scale, and spacing tokens consistently.
- Ask the user to select the frames and components you are interested in for `get_design_context`
- Asking really is better than guessing

### Visual fidelity

- Aim for 1:1 parity with Figma.
- Prefer design-system tokens and adjust spacing or sizes minimally to match visuals.
- Validate against screenshots for both look and behavior.

### Layout and responsiveness

- Implement responsiveness based on Figma Auto Layout.
- Respect min-width and max-width settings of frames, if set
- Parent frames are adaptive unless Figma specifies a fixed width.

### Interaction and states

- Implement component interaction states when defined in Figma (hover, focus, active, disabled).
- Honor any annotations provided in Figma
- Run `./build-app.sh` after code changes (defaults to `--debug`; use `--release` when needed).
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributing

## Setup and Build

See the developer guide:

- `docs/developer/BUILD_AND_RELEASE.md`

## Pull requests

1. Keep changes scoped and focused.
2. Update documentation if behavior or developer workflow changes.
3. Ensure tests pass before opening a PR.
18 changes: 0 additions & 18 deletions FIGMA-DEVIATIONS.md

This file was deleted.

73 changes: 0 additions & 73 deletions FIGMA_MCP.md

This file was deleted.

32 changes: 0 additions & 32 deletions FIGMA_MCP_EXAMPLES.md

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Alexander Lehmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading