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
50 changes: 50 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Claude Code Review

on:
pull_request_target:
types: [opened, synchronize, ready_for_review, reopened]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: read

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# Allow workflow to run for all users, including those without write access
# ⚠️ Security Note: This bypasses the write permission requirement check.
# The workflow is still secured by pull_request_target which runs in the base repo context
# and only reviews code without executing it. See:
# https://github.com/anthropics/claude-code-action/blob/main/docs/security.md#access-control
allowed_non_write_users: "*"
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm run check-format

backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/
~/.cargo/git/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo clippy --all-targets -- -D warnings
25 changes: 25 additions & 0 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check Formatting

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
rustfmt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Check formatting
run: cargo fmt -- --check
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test ${{ matrix.os }} (${{ matrix.rust }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, beta, nightly]

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.rust }}-
${{ runner.os }}-cargo-

- name: Build
shell: bash
run: |
cargo build --verbose --no-default-features

- name: Run tests
shell: bash
run: |
cargo test --verbose --no-default-features

- name: Check documentation
shell: bash
run: |
cargo doc --no-deps --no-default-features
env:
RUSTDOCFLAGS: -D warnings
7 changes: 7 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
build
dist
package-lock.json
pnpm-lock.yaml
.DS_Store
*.log
5 changes: 3 additions & 2 deletions frontend/app/app.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@import "tailwindcss";

@theme {
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-sans:
"Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

html,
Expand Down
36 changes: 21 additions & 15 deletions frontend/app/components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Link, useLocation } from "react-router-dom"
import { Link, useLocation } from "react-router-dom";

export default function Nav() {
const location = useLocation()
const isActive = (path: string) => location.pathname === path
const location = useLocation();

const isActive = (path: string) => location.pathname === path;

return (
<nav className="bg-gray-900 border-b border-gray-800">
Expand All @@ -14,26 +14,32 @@ export default function Nav() {
Coinswap
</Link>
<div className="hidden sm:flex gap-1">
<Link
to="/"
<Link
to="/"
className={`px-4 py-2 rounded-lg transition-all ${
isActive('/') ? 'bg-gray-800 text-orange-500' : 'text-gray-400 hover:text-gray-100'
isActive("/")
? "bg-gray-800 text-orange-500"
: "text-gray-400 hover:text-gray-100"
}`}
>
Dashboard
</Link>
<Link
to="/maker"
<Link
to="/maker"
className={`px-4 py-2 rounded-lg transition-all ${
isActive('/maker') ? 'bg-gray-800 text-orange-500' : 'text-gray-400 hover:text-gray-100'
isActive("/maker")
? "bg-gray-800 text-orange-500"
: "text-gray-400 hover:text-gray-100"
}`}
>
Makers
</Link>
<Link
to="/settings"
<Link
to="/settings"
className={`px-4 py-2 rounded-lg transition-all ${
isActive('/settings') ? 'bg-gray-800 text-orange-500' : 'text-gray-400 hover:text-gray-100'
isActive("/settings")
? "bg-gray-800 text-orange-500"
: "text-gray-400 hover:text-gray-100"
}`}
>
Settings
Expand All @@ -43,5 +49,5 @@ export default function Nav() {
</div>
</div>
</nav>
)
}
);
}
2 changes: 1 addition & 1 deletion frontend/app/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ createRoot(document.getElementById("root")!).render(
<Route path="/settings" element={<Settings />} />
</Routes>
</BrowserRouter>
</StrictMode>
</StrictMode>,
);
Loading