Thank you for your interest in contributing to Stellar Goal Vault!
- Fork the repository on GitHub.
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/stellar-goal-vault.git - Install dependencies:
npm run install:all - Create a branch:
git checkout -b feature/my-feature - Make your changes and test them.
- Commit using conventional commits (e.g.,
feat: add new endpoint). - Push and open a Pull Request against the
mainbranch.
- Read the README.md for project overview and architecture.
- Check the FAQ.md for answers to common questions.
- See the Troubleshooting Guide for solutions to common development issues.
- Browse
OPEN_SOURCE_ISSUES.mdfor curated contribution ideas. - To test the pledge flow with a real wallet, follow the Freighter Pledge Signing Walkthrough.
- Node.js 18+ (check with
node --version) - npm 9+ (comes with Node.js)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Copy the environment file:
cp .env.example .env
-
Configure environment variables in
.env:DB_PATH: Path to SQLite database file (default:../../data/campaigns.db)NODE_ENV: Set todevelopmentfor local developmentPORT: Server port (default: 3000)CORS_ALLOWED_ORIGINS: Comma-separated list of allowed originsCONTRACT_ID: Stellar contract ID (required for pledge operations)SOROBAN_RPC_URL: URL to Soroban RPC endpointNETWORK_PASSPHRASE: Stellar network (default:Test SDF Network ; September 2015for testnet)
-
Development mode (with auto-reload):
npm run dev
Server listens on
http://localhost:3000by default. -
Production mode (build and run):
npm run build npm start
-
Watch mode (for editing and testing):
npm run dev
-
Run all tests once:
npm test -
Run tests in watch mode (re-run on file changes):
npm run test:watch
-
Run with coverage:
npm test -- --coverage
-
Seeding: The application automatically initializes the SQLite database with the schema on first run. To seed deterministic test campaigns:
npm test -- tests/services/seedDeterministic.test.ts -
Viewing the database:
- Use SQLite CLI:
sqlite3 ../../data/campaigns.db - Or use a GUI tool like DB Browser for SQLite
- Use SQLite CLI:
-
Resetting the database (for testing):
- Delete the database file:
rm ../../data/campaigns.db - Next run will recreate it with the schema
- Delete the database file:
See the Troubleshooting Guide for a comprehensive list of common issues.
- Ensure the directory specified in
DB_PATHexists - Check file permissions on the database directory
- If the directory doesn't exist, create it:
mkdir -p data
- This indicates concurrent access issues. Ensure only one test process is running.
- Try clearing the test database:
rm test-temp-*.db* - Run tests serially:
npm test -- --no-coverage
- Run
npm installin thebackenddirectory - Clear node_modules and reinstall:
rm -rf node_modules && npm install
- Change the
PORTin.envto an available port (e.g., 3001) - Or kill the process on the current port
- Ensure
.envfile is in thebackenddirectory - Restart the development server after editing
.env - Check for syntax errors in
.env(no spaces around=)
- Backend:
cd backend && npm test - Contract:
cd contracts && cargo test - E2E:
npm run test:e2e
- TypeScript: ESLint + Prettier (pre-commit via Husky + lint-staged)
- Rust:
cargo fmt
The GET /api/open-issues endpoint serves a statically seeded list of contribution ideas
that are displayed in the frontend Contribution Backlog panel.
To add a new issue:
- Open
backend/src/services/openIssues.ts. - Append a new entry to the
seededIssuesarray:{ id: 'SGV-4', // continue the SGV-N sequence title: 'Short, descriptive title', labels: ['frontend', 'good first issue'], summary: 'One or two sentences describing the work.', complexity: 'Trivial', // Trivial | Medium | High points: 100, // 100 | 150 | 200 }
- Match
pointstocomplexity: Trivial → 100, Medium → 150, High → 200. - No migration or server restart is needed — the endpoint reads the array directly.
Full endpoint documentation (example response, field table, complexity/points enum): docs/API.md — GET /api/open-issues
Check the FAQ.md before opening an issue. If your question isn't covered there, feel free to open a GitHub Discussion.