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
Binary file modified .DS_Store
Binary file not shown.
85 changes: 85 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# CodeRabbit AI Configuration
# Learn more: https://docs.coderabbit.ai/getting-started/configure-coderabbit

# Language and tone of reviews
language: en-US
tone_instructions: "Be concise, technical, and constructive. Focus on code quality, security, and best practices."

# Review settings
reviews:
# Request changes workflow
request_changes_workflow: true

# High level summary
high_level_summary: true

# Poem (fun summary in poem format)
poem: true

# Review status (approve/request changes)
review_status: true

# Auto-review triggers
auto_review:
enabled: true
drafts: false # Don't review draft PRs

# File filters - paths to include/exclude
path_filters:
- "!**/node_modules/**"
- "!**/dist/**"
- "!**/build/**"
- "!**/*.min.js"
- "!**/pnpm-lock.yaml"
- "!**/yarn.lock"
- "!**/package-lock.json"

# Specific instructions for different file types
path_instructions:
- path: "**/*.ts"
instructions: |
- Check for TypeScript best practices
- Verify proper typing (avoid 'any' unless necessary)
- Look for potential null/undefined issues
- Suggest performance improvements

- path: "**/*.tsx"
instructions: |
- Review React component structure and patterns
- Check for proper hooks usage
- Verify accessibility (a11y) considerations
- Look for potential performance issues (unnecessary re-renders)
- Check for proper error boundaries

- path: "**/*.rs"
instructions: |
- Check for Rust best practices and idiomatic code
- Review error handling patterns
- Look for potential security vulnerabilities
- Verify proper memory management
- Check for unnecessary clones or allocations

- path: "**/contracts/**"
instructions: |
- Pay special attention to security vulnerabilities
- Check for proper access controls
- Verify safe math operations
- Review state management carefully
- Look for reentrancy issues
- Check for proper error handling

# Chat settings
chat:
auto_reply: true

# Knowledge base - files that provide context for reviews
knowledge_base:
- "README.md"
- "CONTRIBUTING.md"
- "**/README.md"

# Early access features
early_access: false

# Enable/disable specific review categories
enable_free_tier: true
192 changes: 192 additions & 0 deletions .github/workflows/coderabbit-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
name: CodeRabbit AI Code Review

# This workflow complements CodeRabbit AI for automated code reviews
#
# Setup Instructions for CodeRabbit:
# 1. Visit https://coderabbit.ai and login with GitHub
# 2. Authorize the CodeRabbit GitHub App
# 3. Select this repository to enable automated reviews
# 4. CodeRabbit will automatically review all pull requests
#
# Note: CodeRabbit works as a GitHub App, not a GitHub Action.
# This workflow provides additional automated checks alongside CodeRabbit.

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- production
- 'feat/**'

pull_request_review:
types: [submitted]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
# Pre-review checks that run before/alongside CodeRabbit
code-quality-checks:
name: Code Quality Checks
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for better analysis

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.ts
**/*.tsx
**/*.js
**/*.jsx
**/*.json

- name: List changed files
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "Changed files:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"

- name: Add PR comment with review info
uses: actions/github-script@v7
if: github.event.action == 'opened'
with:
script: |
const comment = `## Automated Review Status

✅ Code quality checks are running
🤖 CodeRabbit AI will provide an automated review shortly

### What's being checked:
- Code quality and linting
- TypeScript type safety
- Build verification
- Test coverage (if applicable)

### CodeRabbit AI Setup
If you haven't set up CodeRabbit yet:
1. Visit [coderabbit.ai](https://coderabbit.ai)
2. Login with GitHub and authorize the app
3. Enable it for this repository

CodeRabbit will then automatically review all PRs with intelligent feedback.`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});

# Linting and formatting checks
lint-check:
name: Lint and Format Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install dependencies
run: pnpm install --frozen-lockfile || echo "No package.json found or install failed"
continue-on-error: true

- name: Run linter
run: pnpm lint || echo "No lint script configured"
continue-on-error: true

# Build verification
build-check:
name: Build Verification
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install dependencies
run: pnpm install --frozen-lockfile || echo "Install failed"
continue-on-error: true

- name: Build project
run: pnpm build || echo "No build script configured"
continue-on-error: true

# Summary job
review-summary:
name: Review Summary
runs-on: ubuntu-latest
needs: [code-quality-checks, lint-check, build-check]
if: always()

steps:
- name: Check job statuses
uses: actions/github-script@v7
with:
script: |
const jobs = [
{ name: 'Code Quality Checks', status: '${{ needs.code-quality-checks.result }}' },
{ name: 'Lint Check', status: '${{ needs.lint-check.result }}' },
{ name: 'Build Check', status: '${{ needs.build-check.result }}' }
];

const summary = jobs.map(job => {
const emoji = job.status === 'success' ? '✅' :
job.status === 'failure' ? '❌' : '⚠️';
return `${emoji} ${job.name}: ${job.status}`;
}).join('\n');

const comment = `## Automated Checks Summary

${summary}

---
*This automated check works alongside CodeRabbit AI for comprehensive code review.*
`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
6 changes: 0 additions & 6 deletions frontend/.env.exmaple

This file was deleted.

29 changes: 0 additions & 29 deletions frontend/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion frontend/README.md

This file was deleted.

28 changes: 0 additions & 28 deletions frontend/eslint.config.js

This file was deleted.

23 changes: 0 additions & 23 deletions frontend/index.html

This file was deleted.

Loading
Loading