Skip to content

Commit 3bcc0f4

Browse files
Initial commit
0 parents  commit 3bcc0f4

47 files changed

Lines changed: 5522 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 337 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
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+
# Multi-repo analysis: lets CodeRabbit use other repositories as context when reviewing PRs.
11+
# Most useful when linking tightly coupled repos, e.g.:
12+
# - Frontend ↔ backend (API contract changes)
13+
# - Service ↔ shared library (ripple-effect on consumers)
14+
# - Microservices sharing a database schema
15+
# Avoid configuring this at org level — link only the repos relevant to this project.
16+
# See: https://docs.coderabbit.ai/knowledge-base/multi-repo-analysis
17+
#
18+
# To enable, uncomment the block below and replace the example values with your repos.
19+
# knowledge_base:
20+
# linked_repositories:
21+
# - repository: "AOSSIE-Org/backend-api"
22+
# instructions: "Contains REST API endpoints and database models"
23+
24+
chat:
25+
# CodeRabbit will automatically respond to @coderabbitai mentions in PR comments
26+
auto_reply: true
27+
28+
issue_enrichment:
29+
labeling:
30+
auto_apply_labels: true
31+
labeling_instructions:
32+
- label: bug
33+
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.
34+
- label: enhancement
35+
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.
36+
- label: documentation
37+
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.
38+
planning:
39+
enabled: true
40+
auto_planning:
41+
enabled: true
42+
labels:
43+
- "plan-me" # Auto-plan issues with this label
44+
- "feature" # Also auto-plan these
45+
- "!no-plan" # Never auto-plan issues with this label
46+
47+
reviews:
48+
profile: assertive # Options: chill (focuses on significant issues, less nitpicky about style), assertive (more thorough, flags style issues and minor improvements too)
49+
50+
auto_review:
51+
# Automatically trigger reviews when PRs are opened or updated
52+
enabled: true
53+
# Skip auto-review if PR title contains these keywords
54+
ignore_title_keywords:
55+
- "WIP"
56+
# Don't auto-review draft PRs
57+
drafts: false
58+
# Only auto-review PRs targeting these branches
59+
base_branches:
60+
- main
61+
- develop
62+
63+
# Include a high-level summary at the start of each review
64+
high_level_summary: true
65+
66+
# Generate sequence diagrams for complex code flows
67+
sequence_diagrams: true
68+
69+
# Include poems in reviews
70+
poem: true
71+
72+
# Show review completion status
73+
review_status: true
74+
75+
# Keep the walkthrough section expanded by default
76+
collapse_walkthrough: false
77+
78+
# Include summary of all changed files
79+
changed_files_summary: true
80+
81+
# Automatically request changes on the PR (just leave comments)
82+
request_changes_workflow: true
83+
84+
# Pre-merge checks to enforce before merging PRs
85+
pre_merge_checks:
86+
description:
87+
# Validate that PR has a proper description
88+
mode: warning # Options: off, warning, error
89+
docstrings:
90+
# Disable docstring coverage checks (let's assume we don't need them)
91+
mode: off
92+
93+
# Exclude these paths from reviews (build artifacts and dependencies)
94+
path_filters:
95+
- "!**/node_modules/**" # npm dependencies
96+
- "!**/android/**" # Native Android build files
97+
- "!**/ios/**" # Native iOS build files
98+
- "!**/.expo/**" # Expo build cache
99+
- "!**/.expo-shared/**" # Expo shared config
100+
- "!**/dist/**" # Build output
101+
102+
# Use the following tools when reviewing
103+
tools:
104+
shellcheck:
105+
enabled: true
106+
ruff:
107+
enabled: true
108+
markdownlint:
109+
enabled: true
110+
github-checks:
111+
enabled: true
112+
timeout_ms: 90000
113+
languagetool:
114+
enabled: true
115+
enabled_only: false
116+
level: default
117+
biome:
118+
enabled: true
119+
hadolint:
120+
enabled: true
121+
swiftlint:
122+
enabled: true
123+
phpstan:
124+
enabled: true
125+
level: default
126+
golangci-lint:
127+
enabled: true
128+
yamllint:
129+
enabled: true
130+
gitleaks:
131+
enabled: true
132+
checkov:
133+
enabled: true
134+
detekt:
135+
enabled: true
136+
eslint:
137+
enabled: true
138+
139+
# Apply the following labels to PRs
140+
labeling_instructions:
141+
- label: Python Lang
142+
instructions: Apply when the PR/MR contains changes to python source-code
143+
- label: Solidity Lang
144+
instructions: Apply when the PR/MR contains changes to solidity source-code
145+
- label: Typescript Lang
146+
instructions: Apply when the PR/MR contains changes to javascript or typescript source-code
147+
- label: Ergoscript Lang
148+
instructions: Apply when the PR/MR contains changes to ergoscript source-code
149+
- label: Bash Lang
150+
instructions: >-
151+
Apply when the PR/MR contains changes to shell-scripts or BASH code
152+
snippets
153+
- label: Make Lang
154+
instructions: >-
155+
Apply when the PR/MR contains changes to the file `Makefile` or makefile
156+
code snippets
157+
- label: Documentation
158+
instructions: >-
159+
Apply whenever project documentation (namely markdown source-code) is
160+
updated by the PR/MR
161+
- label: Linter
162+
instructions: >-
163+
Apply when the purpose of the PR/MR is related to fixing the feedback
164+
from a linter
165+
166+
# Review instructions that apply to all files
167+
instructions: >-
168+
- Verify that documentation and comments are free of spelling mistakes
169+
- Ensure that test code is automated, comprehensive, and follows testing best practices
170+
- Verify that all critical functionality is covered by tests
171+
- Confirm that the code meets the project's requirements and objectives
172+
- Confirm that copyright years are up-to date whenever a file is changed
173+
- Point out redundant obvious comments that do not add clarity to the code
174+
- Ensure that comments are concise and suggest more concise comment statements if possible
175+
- Discourage usage of verbose comment styles such as NatSpec
176+
- Look for code duplication
177+
- Suggest code completions when:
178+
- seeing a TODO comment
179+
- seeing a FIXME comment
180+
181+
# Custom review instructions for specific file patterns
182+
path_instructions:
183+
# TypeScript/JavaScript files
184+
- path: "**/*.{ts,tsx,js,jsx}"
185+
instructions: |
186+
NextJS:
187+
- Ensure that "use client" is being used
188+
- Ensure that only features that allow pure client-side rendering are used
189+
- NextJS best practices (including file structure, API routes, and static generation methods) are used.
190+
191+
TypeScript:
192+
- Avoid 'any', use explicit types
193+
- Prefer 'import type' for type imports
194+
- Review for significant deviations from Google JavaScript style guide. Minor style issues are not a priority
195+
- The code adheres to best practices associated with React
196+
- The code adheres to best practices associated with React PWA
197+
- The code adheres to best practices associated with SPA
198+
- The code adheres to best practices recommended by lighthouse or similar tools for performance
199+
- The code adheres to best practices associated with Node.js
200+
- The code adheres to best practices recommended for performance
201+
202+
Security:
203+
- No exposed API keys or sensitive data
204+
- Use expo-secure-store for sensitive storage
205+
- Validate deep linking configurations
206+
- Check for common security vulnerabilities such as:
207+
- SQL Injection
208+
- XSS (Cross-Site Scripting)
209+
- CSRF (Cross-Site Request Forgery)
210+
- Insecure dependencies
211+
- Sensitive data exposure
212+
213+
Internationalization:
214+
- User-visible strings should be externalized to resource files (i18n)
215+
216+
# HTML files
217+
- path: "**/*.html"
218+
instructions: |
219+
Review the HTML code against the google html style guide and point out any mismatches. Ensure that:
220+
- The code adheres to best practices recommended by lighthouse or similar tools for performance
221+
222+
# CSS files
223+
- path: "**/*.css"
224+
instructions: |
225+
Review the CSS code against the google css style guide and point out any mismatches. Ensure that:
226+
- The code adheres to best practices associated with CSS.
227+
- The code adheres to best practices recommended by lighthouse or similar tools for performance.
228+
- The code adheres to similar naming conventions for classes, ids.
229+
230+
# Python files
231+
- path: "**/*.{py}"
232+
instructions: |
233+
Python:
234+
- Check for major PEP 8 violations and Python best practices.
235+
236+
# Solidity Smart Contract files
237+
- path: "**/*.sol"
238+
instructions: |
239+
Solidity:
240+
- Review the Solidity contracts for security vulnerabilities and adherence to best practices.
241+
- Ensure immutability is used appropriately (e.g., `immutable` and `constant` where applicable).
242+
- Ensure there are no unbounded loops that could lead to gas exhaustion.
243+
- Verify correct and explicit visibility modifiers for all state variables and functions.
244+
- Flag variables that are declared but used only once or are unnecessary.
245+
- Identify potential gas optimization opportunities without compromising readability or security.
246+
- Verify that any modification to contract logic includes corresponding updates to automated tests.
247+
- Ensure failure paths and revert scenarios are explicitly handled and validated.
248+
- Validate proper access control enforcement (e.g., Ownable, RBAC, role checks).
249+
- Ensure consistent and correct event emission for all state-changing operations.
250+
- Confirm architectural consistency with existing contracts (no unintended storage layout changes unless clearly documented).
251+
- Flag major feature additions or architectural changes that were implemented without prior design discussion (if applicable).
252+
- Flag pull requests that mix unrelated changes or multiple concerns in a single submission.
253+
- Ensure security-sensitive logic changes are not introduced without adequate test coverage.
254+
- Review for common smart contract vulnerabilities, including but not limited to:
255+
- Reentrancy
256+
- Improper input validation
257+
- Access control bypass
258+
- Integer overflows/underflows (if using unchecked blocks)
259+
- Front-running risks where applicable
260+
261+
262+
# Javascript/Typescript test files
263+
- path: "**/*.test.{ts,tsx,js,jsx}"
264+
instructions: |
265+
Review test files for:
266+
- Comprehensive coverage of component behavior
267+
- Proper use of @testing-library/react-native
268+
- Async behavior is properly tested
269+
- Accessibility testing is included
270+
- Test descriptions are sufficiently detailed to clarify the purpose of each test
271+
- The tests are not tautological
272+
273+
# Solidity test files
274+
- path: "**/*.test.{sol}"
275+
instructions: |
276+
Review test files for:
277+
- Comprehensive coverage of contract behavior.
278+
- Coverage of success paths, edge cases, and failure/revert scenarios.
279+
- Proper validation of access control restrictions.
280+
- Verification of event emissions where applicable.
281+
- Explicit validation of state changes after each relevant function call.
282+
- Adequate test updates whenever contract logic is modified.
283+
- Deterministic behavior (tests should not rely on implicit execution order or shared mutable state).
284+
- Clear and descriptive test names that reflect the intended behavior being validated.
285+
286+
287+
# Asset files (images, fonts, etc.)
288+
- path: "assets/**/*"
289+
instructions: |
290+
Review asset files for:
291+
- Image optimization (appropriate size and format)
292+
- Proper @2x and @3x variants for different screen densities
293+
- SVG assets are optimized
294+
- Font files are licensed and optimized
295+
296+
# Dependency manifest and lock files (e.g. updated by Dependabot, Renovate)
297+
- path: >-
298+
**/{package.json,package-lock.json,yarn.lock,pnpm-lock.yaml,npm-shrinkwrap.json,requirements.txt,Pipfile,Pipfile.lock,pyproject.toml,poetry.lock,go.mod,go.sum,Cargo.toml,Cargo.lock,pom.xml,build.gradle,build.gradle.kts,gradle.lockfile,*.gemspec,Gemfile,Gemfile.lock}
299+
instructions: |
300+
This file may be modified by a dependency bot (e.g., Dependabot, Renovate).
301+
Perform a structured dependency upgrade analysis:
302+
303+
**1. Version Change Assessment**
304+
- Identify all version bumps (major, minor, patch) and flag major/minor upgrades explicitly.
305+
- Check the official release notes, changelog, or migration guide for each upgraded package.
306+
307+
**2. Breaking Change Detection**
308+
- Breaking changes: removed or renamed APIs, changed function signatures, altered behavior.
309+
- Deprecated APIs: warn if the codebase uses anything deprecated in the new version.
310+
- Configuration changes: new required env vars, config keys, or file structure changes.
311+
- Security fixes: highlight CVE patches and confirm they address known vulnerabilities.
312+
313+
**3. Codebase Compatibility Check**
314+
- Locate all files in the repo that import or use the upgraded dependency.
315+
- For each usage, verify:
316+
- No removed or renamed imports/functions are referenced.
317+
- Constructor/function call signatures are compatible.
318+
- Any default behavior changes do not silently break existing logic.
319+
320+
**4. Risk Analysis**
321+
- Runtime errors: type mismatches, missing attributes, changed return types.
322+
- API incompatibility: breaking interface/type changes (critical for TypeScript).
323+
- Logical bugs: subtle behavior changes that don't throw errors but alter outcomes.
324+
- Performance regressions: flag if release notes mention perf impacts.
325+
326+
**5. Edge Cases to Verify**
327+
- Backward compatibility with currently pinned peer dependencies.
328+
- Changes in default behavior or environment assumptions.
329+
- Peer requirement conflicts introduced by the new version.
330+
- For TypeScript: type/interface changes that may require type assertion updates.
331+
332+
**6. Migration Guidance**
333+
- If official docs provide migration steps, summarize the required changes and flag
334+
specific files in this repo that need updates.
335+
- If no migration is required, confirm this explicitly.
336+
337+
Conclude with a **risk level**: Low / Medium / High, with justification.

.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)