Thanks for taking the time to contribute. This guide covers everything you need to get a working local environment, run the test suite, and get your PR reviewed.
- Node.js 20.x (see
.nvmrcor usenvm use 20) - npm 10+ (bundled with Node 20)
- PostgreSQL 16 (or use the provided Docker Compose setup)
- Git
Optional but recommended:
- Docker + Docker Compose (simplifies database setup)
- k6 for load tests
git clone https://github.com/Ethereal-Future/FuTuRe.git
cd FuTuRe
npm installcd backend
cp .env.example .envOpen backend/.env and fill in the required values. At minimum you need:
DATABASE_URL— PostgreSQL connection stringJWT_SECRET— any strong random string for local devSTREAM_SECRET_ENCRYPTION_KEY— 32-byte hex key (see comment in.env.example)
See backend/CONFIGURATION.md for the full reference.
Using Docker (recommended):
# from the repo root
docker compose up db -dOr point DATABASE_URL at an existing local PostgreSQL 16 instance.
cd backend
npx prisma migrate deployFrom the repo root:
npm run devThis starts both servers concurrently:
| Service | URL |
|---|---|
| Backend | http://localhost:3001 |
| Frontend | http://localhost:3000 |
The backend uses --watch for hot-reload. The frontend uses Vite HMR.
npm run test:coveragenpm run test --workspace=backendRequires a running PostgreSQL instance (use docker compose up db -d):
npm run test:db --workspace=backendnpm run test:contractsnpm run test:propertyRequires k6 and a running backend:
npm run load-test:endpoints --workspace=backend
npm run load-test:concurrent --workspace=backend
npm run load-test:regression --workspace=backendThe backend connects to the Stellar testnet by default. To run against it:
- Set these values in
backend/.env:
STELLAR_NETWORK=testnet
HORIZON_URL=https://horizon-testnet.stellar.org- Start the backend:
npm run dev:backend- Create a test account via the frontend or the API — new accounts are automatically funded by Friendbot.
Never use real Stellar mainnet keys in development. The testnet is reset periodically; any balances will be lost.
-
Fork the repo and create a branch from
main:git checkout -b feat/your-feature-name
-
Make your changes. Keep commits focused — one logical change per commit.
-
Ensure all checks pass locally before pushing:
npm run test:coverage npm audit --audit-level=high
-
Push your branch and open a pull request against
main. -
Fill in the PR template. Include:
- What the change does and why
- How you tested it
- Any follow-up work or known limitations
-
A maintainer will review within a few business days. Address feedback by pushing new commits — do not force-push after review has started.
-
Once approved, a maintainer will squash-merge your PR.
- Tests added or updated for new behaviour
-
npm run test:coveragepasses - No new high/critical vulnerabilities (
npm audit --audit-level=high) - Code formatted with
npm run format - PR description explains the change clearly