Skip to content

Commit 60d4b19

Browse files
Initial commit
0 parents  commit 60d4b19

24 files changed

+2981
-0
lines changed

.coderabbit.yaml

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
# Enables IDE autocompletion for this config file
2+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
3+
4+
# Language for CodeRabbit's review comments
5+
language: en
6+
7+
# Enable experimental features (currently not using any specific early_access features)
8+
early_access: true
9+
10+
chat:
11+
# CodeRabbit will automatically respond to @coderabbitai mentions in PR comments
12+
auto_reply: true
13+
14+
issue_enrichment:
15+
labeling:
16+
auto_apply_labels: true
17+
labeling_instructions:
18+
- label: bug
19+
instructions: Issues reporting bugs, errors, crashes, incorrect behavior, or unexpected results. This includes runtime errors, logic errors, broken functionality, regressions, and any deviation from expected or documented behavior.
20+
- label: enhancement
21+
instructions: Feature requests, improvements to existing functionality, performance optimizations, refactoring suggestions, UI/UX enhancements, and any suggestions to make the project better or add new capabilities.
22+
- label: documentation
23+
instructions: Documentation updates, additions, corrections, or clarifications needed. This includes missing docs, outdated information, unclear instructions, API documentation, code examples, README improvements, and any requests for better explanations or guides.
24+
planning:
25+
enabled: true
26+
auto_planning:
27+
enabled: true
28+
labels:
29+
- "plan-me" # Auto-plan issues with this label
30+
- "feature" # Also auto-plan these
31+
- "!no-plan" # Never auto-plan issues with this label
32+
33+
reviews:
34+
profile: assertive # Options: chill (focuses on significant issues, less nitpicky about style), assertive (more thorough, flags style issues and minor improvements too)
35+
36+
auto_review:
37+
# Automatically trigger reviews when PRs are opened or updated
38+
enabled: true
39+
# Skip auto-review if PR title contains these keywords
40+
ignore_title_keywords:
41+
- "WIP"
42+
# Don't auto-review draft PRs
43+
drafts: false
44+
# Only auto-review PRs targeting these branches
45+
base_branches:
46+
- main
47+
- develop
48+
49+
# Include a high-level summary at the start of each review
50+
high_level_summary: true
51+
52+
# Generate sequence diagrams for complex code flows
53+
sequence_diagrams: true
54+
55+
# Include poems in reviews
56+
poem: true
57+
58+
# Show review completion status
59+
review_status: true
60+
61+
# Keep the walkthrough section expanded by default
62+
collapse_walkthrough: false
63+
64+
# Include summary of all changed files
65+
changed_files_summary: true
66+
67+
# Automatically request changes on the PR (just leave comments)
68+
request_changes_workflow: true
69+
70+
# Pre-merge checks to enforce before merging PRs
71+
pre_merge_checks:
72+
description:
73+
# Validate that PR has a proper description
74+
mode: warning # Options: off, warning, error
75+
docstrings:
76+
# Disable docstring coverage checks (let's assume we don't need them)
77+
mode: off
78+
79+
# Exclude these paths from reviews (build artifacts and dependencies)
80+
path_filters:
81+
- "!**/node_modules/**" # npm dependencies
82+
- "!**/android/**" # Native Android build files
83+
- "!**/ios/**" # Native iOS build files
84+
- "!**/.expo/**" # Expo build cache
85+
- "!**/.expo-shared/**" # Expo shared config
86+
- "!**/dist/**" # Build output
87+
88+
# Use the following tools when reviewing
89+
tools:
90+
shellcheck:
91+
enabled: true
92+
ruff:
93+
enabled: true
94+
markdownlint:
95+
enabled: true
96+
github-checks:
97+
enabled: true
98+
timeout_ms: 90000
99+
languagetool:
100+
enabled: true
101+
enabled_only: false
102+
level: default
103+
biome:
104+
enabled: true
105+
hadolint:
106+
enabled: true
107+
swiftlint:
108+
enabled: true
109+
phpstan:
110+
enabled: true
111+
level: default
112+
golangci-lint:
113+
enabled: true
114+
yamllint:
115+
enabled: true
116+
gitleaks:
117+
enabled: true
118+
checkov:
119+
enabled: true
120+
detekt:
121+
enabled: true
122+
eslint:
123+
enabled: true
124+
125+
# Apply the following labels to PRs
126+
labeling_instructions:
127+
- label: Python Lang
128+
instructions: Apply when the PR/MR contains changes to python source-code
129+
- label: Solidity Lang
130+
instructions: Apply when the PR/MR contains changes to solidity source-code
131+
- label: Typescript Lang
132+
instructions: Apply when the PR/MR contains changes to javascript or typescript source-code
133+
- label: Ergoscript Lang
134+
instructions: Apply when the PR/MR contains changes to ergoscript source-code
135+
- label: Bash Lang
136+
instructions: >-
137+
Apply when the PR/MR contains changes to shell-scripts or BASH code
138+
snippets
139+
- label: Make Lang
140+
instructions: >-
141+
Apply when the PR/MR contains changes to the file `Makefile` or makefile
142+
code snippets
143+
- label: Documentation
144+
instructions: >-
145+
Apply whenever project documentation (namely markdown source-code) is
146+
updated by the PR/MR
147+
- label: Linter
148+
instructions: >-
149+
Apply when the purpose of the PR/MR is related to fixing the feedback
150+
from a linter
151+
152+
# Review instructions that apply to all files
153+
instructions: >-
154+
- Verify that documentation and comments are free of spelling mistakes
155+
- Ensure that test code is automated, comprehensive, and follows testing best practices
156+
- Verify that all critical functionality is covered by tests
157+
- Confirm that the code meets the project's requirements and objectives
158+
- Confirm that copyright years are up-to date whenever a file is changed
159+
- Point out redundant obvious comments that do not add clarity to the code
160+
- Ensure that comments are concise and suggest more concise comment statements if possible
161+
- Discourage usage of verbose comment styles such as NatSpec
162+
- Look for code duplication
163+
- Suggest code completions when:
164+
- seeing a TODO comment
165+
- seeing a FIXME comment
166+
167+
# Custom review instructions for specific file patterns
168+
path_instructions:
169+
# TypeScript/JavaScript files
170+
- path: "**/*.{ts,tsx,js,jsx}"
171+
instructions: |
172+
NextJS:
173+
- Ensure that "use client" is being used
174+
- Ensure that only features that allow pure client-side rendering are used
175+
- NextJS best practices (including file structure, API routes, and static generation methods) are used.
176+
177+
TypeScript:
178+
- Avoid 'any', use explicit types
179+
- Prefer 'import type' for type imports
180+
- Review for significant deviations from Google JavaScript style guide. Minor style issues are not a priority
181+
- The code adheres to best practices associated with React
182+
- The code adheres to best practices associated with React PWA
183+
- The code adheres to best practices associated with SPA
184+
- The code adheres to best practices recommended by lighthouse or similar tools for performance
185+
- The code adheres to best practices associated with Node.js
186+
- The code adheres to best practices recommended for performance
187+
188+
Security:
189+
- No exposed API keys or sensitive data
190+
- Use expo-secure-store for sensitive storage
191+
- Validate deep linking configurations
192+
- Check for common security vulnerabilities such as:
193+
- SQL Injection
194+
- XSS (Cross-Site Scripting)
195+
- CSRF (Cross-Site Request Forgery)
196+
- Insecure dependencies
197+
- Sensitive data exposure
198+
199+
Internationalization:
200+
- User-visible strings should be externalized to resource files (i18n)
201+
202+
# HTML files
203+
- path: "**/*.html"
204+
instructions: |
205+
Review the HTML code against the google html style guide and point out any mismatches. Ensure that:
206+
- The code adheres to best practices recommended by lighthouse or similar tools for performance
207+
208+
# CSS files
209+
- path: "**/*.css"
210+
instructions: |
211+
Review the CSS code against the google css style guide and point out any mismatches. Ensure that:
212+
- The code adheres to best practices associated with CSS.
213+
- The code adheres to best practices recommended by lighthouse or similar tools for performance.
214+
- The code adheres to similar naming conventions for classes, ids.
215+
216+
# Python files
217+
- path: "**/*.{py}"
218+
instructions: |
219+
Python:
220+
- Check for major PEP 8 violations and Python best practices.
221+
222+
# Solidity Smart Contract files
223+
- path: "**/*.sol"
224+
instructions: |
225+
Solidity:
226+
- Review the Solidity contracts for security vulnerabilities and adherence to best practices.
227+
- Ensure immutability is used appropriately (e.g., `immutable` and `constant` where applicable).
228+
- Ensure there are no unbounded loops that could lead to gas exhaustion.
229+
- Verify correct and explicit visibility modifiers for all state variables and functions.
230+
- Flag variables that are declared but used only once or are unnecessary.
231+
- Identify potential gas optimization opportunities without compromising readability or security.
232+
- Verify that any modification to contract logic includes corresponding updates to automated tests.
233+
- Ensure failure paths and revert scenarios are explicitly handled and validated.
234+
- Validate proper access control enforcement (e.g., Ownable, RBAC, role checks).
235+
- Ensure consistent and correct event emission for all state-changing operations.
236+
- Confirm architectural consistency with existing contracts (no unintended storage layout changes unless clearly documented).
237+
- Flag major feature additions or architectural changes that were implemented without prior design discussion (if applicable).
238+
- Flag pull requests that mix unrelated changes or multiple concerns in a single submission.
239+
- Ensure security-sensitive logic changes are not introduced without adequate test coverage.
240+
- Review for common smart contract vulnerabilities, including but not limited to:
241+
- Reentrancy
242+
- Improper input validation
243+
- Access control bypass
244+
- Integer overflows/underflows (if using unchecked blocks)
245+
- Front-running risks where applicable
246+
247+
248+
# Javascript/Typescript test files
249+
- path: "**/*.test.{ts,tsx,js,jsx}"
250+
instructions: |
251+
Review test files for:
252+
- Comprehensive coverage of component behavior
253+
- Proper use of @testing-library/react-native
254+
- Async behavior is properly tested
255+
- Accessibility testing is included
256+
- Test descriptions are sufficiently detailed to clarify the purpose of each test
257+
- The tests are not tautological
258+
259+
# Solidity test files
260+
- path: "**/*.test.{sol}"
261+
instructions: |
262+
Review test files for:
263+
- Comprehensive coverage of contract behavior.
264+
- Coverage of success paths, edge cases, and failure/revert scenarios.
265+
- Proper validation of access control restrictions.
266+
- Verification of event emissions where applicable.
267+
- Explicit validation of state changes after each relevant function call.
268+
- Adequate test updates whenever contract logic is modified.
269+
- Deterministic behavior (tests should not rely on implicit execution order or shared mutable state).
270+
- Clear and descriptive test names that reflect the intended behavior being validated.
271+
272+
273+
# Asset files (images, fonts, etc.)
274+
- path: "assets/**/*"
275+
instructions: |
276+
Review asset files for:
277+
- Image optimization (appropriate size and format)
278+
- Proper @2x and @3x variants for different screen densities
279+
- SVG assets are optimized
280+
- Font files are licensed and optimized

.editorconfig

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# EditorConfig helps maintain consistent coding styles across different editors and IDEs
2+
# Documentation: https://editorconfig.org/
3+
4+
# Top-most EditorConfig file
5+
root = true
6+
7+
# Universal settings for all files
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
indent_style = space
14+
indent_size = 4
15+
16+
# Markdown files
17+
[*.md]
18+
# Trailing whitespace is significant in Markdown (two spaces = line break)
19+
trim_trailing_whitespace = false
20+
21+
# JavaScript / TypeScript / Web / Config files (2-space indentation)
22+
[*.{js,jsx,ts,tsx,json,yml,yaml}]
23+
indent_size = 2
24+
25+
# Shell scripts (2 spaces common practice)
26+
[*.sh]
27+
indent_size = 2
28+
29+
# Makefiles (must use tabs)
30+
[{Makefile,*.mk}]
31+
indent_style = tab
32+
tab_width = 4
33+
34+
35+
36+
# For full list of Supported Editors: https://editorconfig.org/#pre-installed
37+
#
38+
# Common Properties:
39+
# ------------------
40+
# - indent_style: "space" or "tab"
41+
# - indent_size: number of columns for each indentation level
42+
# - end_of_line: "lf", "cr", or "crlf"
43+
# - charset: "utf-8", "utf-16be", "utf-16le", "latin1"
44+
# - trim_trailing_whitespace: true or false
45+
# - insert_final_newline: true or false
46+
# - max_line_length: number (not supported by all editors)
47+
#
48+
# File Pattern Matching:
49+
# ----------------------
50+
# - * : matches any string of characters (except path separator)
51+
# - ** : matches any string of characters
52+
# - ? : matches any single character
53+
# - [name] : matches any single character in name
54+
# - [!name] : matches any single character not in name
55+
# - {s1,s2,s3} : matches any of the strings given (comma-separated)
56+
#
57+
# For more information and queries:
58+
# - Official Documentation: https://editorconfig.org/
59+
# - Specification: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
60+
# - Plugin Downloads: https://editorconfig.org/#download

0 commit comments

Comments
 (0)