Skip to content

Commit 1f04e65

Browse files
authored
Merge branch 'main' into feat/251
2 parents cb24bae + ebf878a commit 1f04e65

31 files changed

Lines changed: 1854 additions & 59 deletions

.github/workflows/backend-governance.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ jobs:
4242
echo "❌ openapi.json is out of date. Run 'npm run generate:openapi' locally and commit the changes."
4343
git diff openapi.json
4444
exit 1
45-
fi
45+
fi
46+
47+
- name: Check for database schema drift
48+
run: npm run db:check-drift

.github/workflows/cypress.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Cypress Smoke Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'frontend/**'
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- 'frontend/**'
12+
13+
jobs:
14+
cypress-run:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20'
24+
cache: 'npm'
25+
cache-dependency-path: frontend/package-lock.json
26+
27+
- name: Install dependencies
28+
working-directory: frontend
29+
run: npm ci
30+
31+
- name: Cypress run
32+
uses: cypress-io/github-action@v6
33+
with:
34+
working-directory: frontend
35+
start: npm run dev
36+
wait-on: 'http://localhost:5173'
37+
browser: chrome
38+
spec: cypress/e2e/smoke.cy.ts
39+
env:
40+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
41+
42+
- name: Upload screenshots on failure
43+
uses: actions/upload-artifact@v4
44+
if: failure()
45+
with:
46+
name: cypress-screenshots
47+
path: frontend/cypress/screenshots

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Generate changelog and publish release
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
# Generate the full CHANGELOG.md (all releases, written to file)
24+
- name: Generate full CHANGELOG.md
25+
uses: orhun/git-cliff-action@v4
26+
with:
27+
config: cliff.toml
28+
args: --verbose
29+
env:
30+
OUTPUT: CHANGELOG.md
31+
GITHUB_REPO: ${{ github.repository }}
32+
33+
# Generate release-only notes for the GitHub Release body
34+
- name: Generate release notes for this tag
35+
id: cliff
36+
uses: orhun/git-cliff-action@v4
37+
with:
38+
config: cliff.toml
39+
args: --latest --strip all
40+
env:
41+
OUTPUT: /tmp/release-notes.md
42+
GITHUB_REPO: ${{ github.repository }}
43+
44+
# Commit the updated CHANGELOG.md back to the default branch
45+
- name: Commit CHANGELOG.md
46+
run: |
47+
git config user.name "github-actions[bot]"
48+
git config user.email "github-actions[bot]@users.noreply.github.com"
49+
git add CHANGELOG.md
50+
# Only commit if there are changes
51+
if ! git diff --cached --quiet; then
52+
git commit -m "chore(release): update CHANGELOG.md for ${{ github.ref_name }}"
53+
git push origin HEAD:refs/heads/main
54+
fi
55+
56+
# Create the GitHub Release with the generated notes
57+
- name: Create GitHub Release
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
name: ${{ github.ref_name }}
61+
tag_name: ${{ github.ref_name }}
62+
body_path: /tmp/release-notes.md
63+
draft: false
64+
prerelease: ${{ contains(github.ref_name, '-') }}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
All notable changes to YieldVault-RWA are documented here.
4+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5+
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
<!-- next-release -->
8+
9+
## [Unreleased]
10+
11+
### Features
12+
- CORS configuration for cross-origin API access
13+
- Structured logging, graceful shutdown, caching, and API key authentication
14+
- Network badge showing testnet vs mainnet status in the frontend
15+
16+
### Bug Fixes
17+
- Vault performance dynamic date filter
18+
19+
### Chores
20+
- Resolve merge conflict in Skeleton and dateUtils imports

CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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!

backend/.env.example

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
2222
# Vault Configuration
2323
VAULT_CONTRACT_ID=
2424

25-
# Optional: Database Configuration (for future use)
26-
# DATABASE_URL=
27-
# DATABASE_POOL_SIZE=10
28-
29-
# Redis Configuration
30-
# Set REDIS_URL to enable Redis-backed rate limiting.
31-
# If unset, the rate limiter falls back to an in-memory store (suitable for local dev).
32-
REDIS_URL=redis://localhost:6379
33-
34-
# Per-endpoint rate limit overrides (optional — compiled-in defaults shown below)
35-
# Deposits endpoint: max 10 requests per 60-second window
36-
DEPOSITS_RATE_LIMIT_MAX=10
37-
DEPOSITS_RATE_LIMIT_WINDOW_MS=60000
38-
39-
# Summary endpoint: max 30 requests per 60-second window
40-
SUMMARY_RATE_LIMIT_MAX=30
41-
SUMMARY_RATE_LIMIT_WINDOW_MS=60000
25+
# Optional: Database Configuration
26+
DATABASE_URL=
27+
DATABASE_REPLICA_URL=
28+
DATABASE_POOL_SIZE=10
29+
30+
# Optional: Cache Configuration (for future use)
31+
# REDIS_URL=redis://localhost:6379
32+
# CACHE_TTL=300
33+
34+
# CORS Configuration
35+
# Comma-separated list of allowed origins. Supports strings or regex like /https?:\/\/.*\.yieldvault\.finance/
36+
CORS_ALLOWED_ORIGINS=http://localhost:3000,https://app.yieldvault.finance
37+
38+
# Email Notification Configuration
39+
EMAIL_PROVIDER=resend
40+
EMAIL_API_KEY=
41+
EMAIL_FROM_ADDRESS=notifications@yieldvault.finance

0 commit comments

Comments
 (0)