|
| 1 | +# Contributing to YieldVault-RWA |
| 2 | + |
| 3 | +First off, thank you for considering contributing to YieldVault-RWA! It's people like you that make this project great. |
| 4 | + |
| 5 | +## Branch Naming Convention |
| 6 | + |
| 7 | +To keep our repository organized, we follow a strict branch naming convention. Please name your branch according to the type of work you are doing: |
| 8 | + |
| 9 | +- **Features**: `feat/<issue-number>-<short-description>` |
| 10 | + - Example: `feat/349-add-user-login` |
| 11 | +- **Bug Fixes**: `fix/<issue-number>-<short-description>` |
| 12 | + - Example: `fix/350-resolve-auth-crash` |
| 13 | + |
| 14 | +## Pull Request Conventions |
| 15 | + |
| 16 | +When submitting a Pull Request, please ensure the title is descriptive and follows the format of the issue. The PR body **must** include the following sections: |
| 17 | + |
| 18 | +### PR Title Format |
| 19 | +`<Type>: <Short description>` |
| 20 | +Examples: |
| 21 | +- `Feature: Add user login flow` |
| 22 | +- `Fix: Resolve authentication crash on mobile` |
| 23 | + |
| 24 | +### Required PR Sections |
| 25 | + |
| 26 | +Please use the following template for your PR description: |
| 27 | + |
| 28 | +```markdown |
| 29 | +### Goal |
| 30 | +[Describe the goal of this PR and the problem it solves. Link to the relevant issue, e.g., "Closes #349".] |
| 31 | + |
| 32 | +### Changes |
| 33 | +- [List out the specific changes made in this PR] |
| 34 | +- [Keep it concise but detailed enough for reviewers to understand the scope] |
| 35 | + |
| 36 | +### Testing |
| 37 | +- [Explain how the changes were tested] |
| 38 | +- [Include steps for reviewers to verify the fix/feature locally] |
| 39 | +``` |
| 40 | + |
| 41 | +## Local Development Setup |
| 42 | + |
| 43 | +YieldVault-RWA is composed of three main packages: Frontend, Backend, and Contracts. Follow the steps below to set up your local development environment end-to-end. |
| 44 | + |
| 45 | +### Prerequisites |
| 46 | +- Node.js (v18+) |
| 47 | +- npm, pnpm, or yarn |
| 48 | +- Rust and Cargo (for contracts) |
| 49 | + |
| 50 | +### 1. Contracts Setup |
| 51 | +The smart contracts are written in Rust. |
| 52 | +```bash |
| 53 | +cd contracts |
| 54 | +# Install dependencies and build contracts |
| 55 | +cargo build |
| 56 | + |
| 57 | +# Run contract tests |
| 58 | +cargo test |
| 59 | +``` |
| 60 | + |
| 61 | +### 2. Backend Setup |
| 62 | +The backend handles API requests and application logic. |
| 63 | +```bash |
| 64 | +cd backend |
| 65 | +# Install dependencies |
| 66 | +npm install |
| 67 | + |
| 68 | +# Set up your environment variables |
| 69 | +cp .env.example .env |
| 70 | + |
| 71 | +# Start the backend development server |
| 72 | +npm run dev |
| 73 | +``` |
| 74 | + |
| 75 | +### 3. Frontend Setup |
| 76 | +The frontend contains the user interface. |
| 77 | +```bash |
| 78 | +cd frontend |
| 79 | +# Install dependencies |
| 80 | +npm install |
| 81 | + |
| 82 | +# Set up your environment variables |
| 83 | +cp .env.example .env |
| 84 | + |
| 85 | +# Start the frontend development server |
| 86 | +npm run dev |
| 87 | +``` |
| 88 | + |
| 89 | +Thank you for your contributions! |
0 commit comments