Get the Stellar Micro-Donation API running locally in under 10 minutes.
- Node.js v14+
- npm
- Git
git clone https://github.com/Manuel1234477/Stellar-Micro-Donation-API.git
cd Stellar-Micro-Donation-API
npm installcp .env.example .envMinimum .env for local development:
PORT=3000
STELLAR_NETWORK=testnet
MOCK_STELLAR=true
API_KEYS=dev_key_123MOCK_STELLAR=true skips all real blockchain calls — no Stellar account needed.
npm run init-db
npm startThe API is now available at http://localhost:3000.
curl http://localhost:3000/healthExpected response:
{ "status": "ok" }curl -X POST http://localhost:3000/api/v1/donations \
-H "Content-Type: application/json" \
-H "X-API-Key: dev_key_123" \
-d '{
"senderPublicKey": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN",
"recipientPublicKey": "GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H",
"amount": "10.00"
}'npm test- API Reference — all endpoints with request/response examples
- Authentication Guide — API key setup and permissions
- Architecture Overview — how the system fits together
- Stellar Concepts — blockchain background for new contributors
- Deployment Guide — Docker, bare metal, and cloud
| Problem | Fix |
|---|---|
| Port in use | Set PORT=3001 in .env |
API_KEYS missing error |
Add API_KEYS=dev_key_123 to .env |
| Database errors | Run npm run init-db |
| Stellar network errors | Set MOCK_STELLAR=true in .env |
| Dependency issues | rm -rf node_modules && npm install |