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
66 changes: 66 additions & 0 deletions .coderabbit.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# CodeRabbit ignore patterns
# Files and directories that should be excluded from CodeRabbit reviews

# Dependencies and build outputs
node_modules/
.next/
dist/
build/
coverage/

# Lock files
yarn.lock
package-lock.json
pnpm-lock.yaml

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

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

# OS files
.DS_Store
Thumbs.db

# Logs
*.log
logs/

# Temporary files
*.tmp
*.temp

# Generated files
*.min.js
*.min.css

# Documentation images (but allow README.md)
public/project-images/
*.png
*.jpg
*.jpeg
*.gif
*.svg
!src/**/*.svg

# Database and migration files
migrations/
*.db
*.sqlite

# Test coverage reports
coverage/
.nyc_output/

# Storybook
storybook-static/

# Miscellaneous
.cache/
.parcel-cache/
125 changes: 125 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# CodeRabbit Configuration
# https://docs.coderabbit.ai/guides/review-configuration

# Language and framework-specific settings
language: typescript
frameworks:
- nextjs
- react
- supabase

# Review settings
reviews:
# Enable automatic reviews on pull requests
auto_review: true

# Enable draft PR reviews
draft_reviews: true

# Review scope
scope:
- "src/**"
- "*.ts"
- "*.tsx"
- "*.js"
- "*.jsx"
- "*.json"
- "*.md"
- ".github/**"

# Exclude patterns
exclude:
- "node_modules/**"
- ".next/**"
- "dist/**"
- "build/**"
- "coverage/**"
- "*.min.js"
- "yarn.lock"
- "package-lock.json"

# Code quality checks
quality:
# Security checks
security: true

# Performance analysis
performance: true

# Best practices
best_practices: true

# Code style and formatting
style: true

# Type safety (TypeScript)
type_safety: true

# Test coverage analysis
test_coverage: true

# Specific rules for this project
rules:
# React/Next.js specific
react:
- prefer_function_components
- use_proper_hooks_dependencies
- avoid_inline_styles
- proper_key_props

# TypeScript specific
typescript:
- strict_type_checking
- no_any_types
- proper_interface_naming
- consistent_return_types

# Security specific
security:
- no_hardcoded_secrets
- secure_api_endpoints
- proper_authentication_checks
- validate_user_inputs

# Performance specific
performance:
- optimize_database_queries
- minimize_re_renders
- proper_memoization
- lazy_loading_components

# Integration settings
integrations:
github:
# Enable PR comments
pr_comments: true

# Enable status checks
status_checks: true

# Auto-approve minor changes (optional)
auto_approve_minor: false

# Request reviews for major changes
request_human_review: true

# Notification settings
notifications:
# Notify on high-priority issues
high_priority: true

# Notify on security issues
security_issues: true

# Summary reports
summary_reports: true

# Custom prompts for this project
custom_prompts:
- "Focus on real-time collaboration features and ensure proper handling of concurrent users"
- "Pay attention to Supabase integration and PostgREST query optimization"
- "Review authentication and authorization implementation carefully"
- "Check for proper error handling in async operations"
- "Ensure proper cleanup of real-time subscriptions and connections"
- "Validate proper use of React hooks and state management"
- "Review test coverage and quality of unit tests"
104 changes: 16 additions & 88 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,108 +1,36 @@
name: CI Pipeline
name: CI

on:
push:
branches: main, develop ]
branches: [main, develop, refactor/postgrest-api]
pull_request:
branches: [ main, develop ]

env:
NODE_VERSION: 18
branches: [main, develop, refactor/postgrest-api]

jobs:
lint-and-type-check:
name: Lint and Type Check
build-and-test:
runs-on: ubuntu-latest

env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup Node.js
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
node-version: 22

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run ESLint
- name: Lint
run: yarn lint

- name: Run TypeScript type check
run: yarn tsc --noEmit

# test:
# name: Test
# runs-on: ubuntu-latest

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

# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: ${{ env.NODE_VERSION }}
# cache: 'yarn'

# - name: Install dependencies
# run: yarn install --frozen-lockfile

# - name: Run tests
# run: yarn test
# env:
# CI: true

build:
name: Build
runs-on: ubuntu-latest
# needs: [lint-and-type-check, test]
needs: [lint-and-type-check]

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run unit tests (Vitest)
run: yarn test:unit

- name: Build application
- name: Build
run: yarn build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }}

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-files
path: .next/
retention-days: 1
security-scan:
name: Security Scan
runs-on: ubuntu-latest

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run security audit
run: yarn audit --audit-level moderate
# - name: Run E2E tests (Playwright)
# run: yarn test:e2e
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- develop

env:
NODE_VERSION: 18
NODE_VERSION: 22

jobs:
deploy:
Expand Down Expand Up @@ -40,4 +40,4 @@ jobs:
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: ${{ github.ref == 'refs/heads/main' && '--prod' || '' }}
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ next-env.d.ts
certificates
scripts/

tsconfig.tsbuildinfo
public_schema_dump.sql
tsconfig.tsbuildinfo
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"editor.defaultFormatter": "denoland.vscode-deno"
},
"deno.enable": true,
"deno.enablePaths": [
"supabase/functions"
],
"deno.enablePaths": ["supabase/functions"],
"deno.lint": true,
"deno.suggest.imports.hosts": {
"https://cdn.nest.land": true,
Expand Down
Loading