Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
1251e4b
feat: Implement portfolio aggregation endpoint
jobbykings Feb 19, 2026
3848f47
feat: Add pagination for vaults endpoint
jobbykings Feb 19, 2026
cf470e7
feat: Add pagination for vaults endpoint
jobbykings Feb 19, 2026
0cab8c1
Merge pull request #22 from jobbykings/issue-16-portfolio-aggregation
JerryIdoko Feb 19, 2026
65ce439
Merge branch 'main' into issue-18-pagination-only
jobbykings Feb 19, 2026
ba172a2
fix: Add proper test suite for pipeline
jobbykings Feb 19, 2026
82c5c6e
Merge branch 'issue-18-pagination-only' of https://github.com/jobbyki…
jobbykings Feb 19, 2026
fa8636b
Merge pull request #23 from jobbykings/issue-18-pagination-only
JerryIdoko Feb 19, 2026
28b8e38
health check and test
dijangh904 Feb 19, 2026
c23e783
health check and test
dijangh904 Feb 19, 2026
644ddef
Merge branch 'Vesting-Vault:main' into main
dijangh904 Feb 19, 2026
8ab0c3b
Merge branch 'main' into health-check
dijangh904 Feb 20, 2026
c8c434e
Merge pull request #24 from dijangh904/health-check
JerryIdoko Feb 20, 2026
f3916d4
Merge pull request #26 from akordavid373/feature/docker-setup-guide-new
JerryIdoko Feb 20, 2026
88e2253
Merge pull request #25 from dijangh904/main
JerryIdoko Feb 20, 2026
c25ef2c
Merge pull request #27 from akordavid373/feature/historical-price-tra…
JerryIdoko Feb 20, 2026
755fe0e
Merge pull request #28 from akordavid373/feature/admin-audit-trail
JerryIdoko Feb 20, 2026
1814a60
feat: implement delegate claiming functionality
Feb 20, 2026
5183ad4
feat: Add Docker setup guide and contributing documentation
Feb 20, 2026
6ffacc1
feat: implement historical price tracking for realized gains calculation
Feb 20, 2026
62813d9
docs: add local development setup guide
Feb 20, 2026
1fb576e
feat: Implement Admin Audit Trail for Issue 19
Feb 20, 2026
6842f51
feat: Implement secure admin key update with two-step process
Feb 20, 2026
29ef9d9
feat: Implement vesting cliffs on top-ups
Feb 20, 2026
9bc194b
Update PR description for vesting cliffs on top-ups feature
Feb 20, 2026
3f85f49
feat: Implement vesting cliffs for top-ups
Feb 20, 2026
d47e92e
Merge pull request #31 from akordavid373/feature/vesting-cliffs-topups
JerryIdoko Feb 20, 2026
eec7ae8
Merge pull request #30 from akordavid373/feature/delegate-claiming
JerryIdoko Feb 20, 2026
0b956ff
feat: Implement comprehensive GraphQL API alongside existing REST API
Feb 20, 2026
22027ab
Merge branch 'main' into feature/graphql-api-implementation
akordavid373 Feb 21, 2026
cbff295
Merge pull request #32 from akordavid373/feature/graphql-api-implemen…
JerryIdoko Feb 21, 2026
a54c2fc
docs api swager
shamoo53 Feb 22, 2026
a042c56
Merge pull request #33 from shamoo53/Docs-API-Swagger
JerryIdoko Feb 22, 2026
759bbb7
Created and implemented Bot Integration
KAMALDEEN333 Feb 22, 2026
5b2ccf0
Created the Cache-Vault-Query
KAMALDEEN333 Feb 22, 2026
e65b7e0
Added the Large-Claim-Alert
KAMALDEEN333 Feb 22, 2026
bac8104
Merge pull request #36 from KAMALDEEN333/Large-Claim-Alert
JerryIdoko Feb 22, 2026
044a282
Database-Organization-Metadata
shamoo53 Feb 22, 2026
d70a23c
Merge branch 'main' into Database-Organization-Metadata
shamoo53 Feb 22, 2026
5200800
Merge pull request #37 from shamoo53/Database-Organization-Metadata
JerryIdoko Feb 22, 2026
0183ed7
Created the Total Value Locked
KAMALDEEN333 Feb 22, 2026
e3d0174
Merge branch 'main' into Total-Value-Locked
KAMALDEEN333 Feb 22, 2026
c122eeb
Merge pull request #38 from KAMALDEEN333/Total-Value-Locked
JerryIdoko Feb 22, 2026
2a28457
feat: Add CSV export endpoint for vault data
lifewithbigdamz Feb 22, 2026
fb49650
Merge pull request #39 from lifewithbigdamz/main
JerryIdoko Feb 22, 2026
b1342de
feat: add automated cliff end email notifications and .gitignore
nonso7 Feb 22, 2026
0ae021b
feat: WebSocket real-time claim updates with Redis scaling (NestJS, s…
OthmanImam Feb 22, 2026
e3464ac
Merge pull request #51 from OthmanImam/feat/WebSockets
JerryIdoko Feb 22, 2026
824fe00
feat(security): add API key authentication middleware for /api/admin …
DIFoundation Feb 23, 2026
9078b17
docs: add backend architecture diagram
cokehill Feb 23, 2026
b2d969a
feat: add rate limiting to claim endpoints (1 req/min per IP)
JojoFlex1 Feb 23, 2026
d76bee1
feat: add upcoming unlocks calendar endpoint GET /api/user/:address/c…
JojoFlex1 Feb 23, 2026
55a368c
Feat/added rate limit to the export route
codesmiles Feb 23, 2026
73d591e
feat: Token metadata worker for Stellar tokens (detect, fetch, persist)
OthmanImam Feb 23, 2026
b96e394
ops: automated Postgres backup script with S3 retention
OthmanImam Feb 23, 2026
a674400
feat: DAO webhook registration and claim event trigger
OthmanImam Feb 23, 2026
a227679
Merge pull request #57 from OthmanImam/feat/TokenMeta
JerryIdoko Feb 23, 2026
f2ba681
Merge pull request #59 from OthmanImam/feat/Issue44
JerryIdoko Feb 23, 2026
f5b1855
feat(security): Enforce multi-tenant data isolation for vaults and we…
OthmanImam Feb 23, 2026
e83ee42
Merge pull request #60 from OthmanImam/feat/MultiTallent
JerryIdoko Feb 23, 2026
448a011
Merge pull request #52 from DIFoundation/main
JerryIdoko Feb 23, 2026
815b16f
Merge pull request #53 from cokehill/docs/backend-architecture-diagram
JerryIdoko Feb 23, 2026
abbf09e
Merge pull request #56 from codesmiles/feat/handle_rate_limit_in_expo…
JerryIdoko Feb 23, 2026
7f0d996
feat(vault): add projection endpoint with vesting schedule calculations
El-swaggerito Feb 23, 2026
744fb76
Merge branch 'main' into Fixed-Issue---API]-Generate-Vesting-Schedule…
El-swaggerito Feb 23, 2026
194cccb
feat(report): add monthly claims report generation and email delivery
El-swaggerito Feb 23, 2026
324430d
Merge branch 'main' into Fixed-Issue---Cron]-Monthly-'Vesting-Report'…
El-swaggerito Feb 23, 2026
6a965e2
feat: add circulating supply API endpoint
cokehill Feb 23, 2026
9aab34c
Feat: Implement production level error monitoring with sentry capturi…
Adedayo-Data Feb 23, 2026
a2764fe
Add tests to Sentry Error Monitoring integration
Adedayo-Data Feb 23, 2026
3b3e563
[Security] Enforce multi-tenant data isolation: scoped queries, admin…
OthmanImam Feb 23, 2026
f65748c
Merge pull request #65 from OthmanImam/feat/MultiT
JerryIdoko Feb 23, 2026
f95f339
Merge branch 'main' into main
Adedayo-Data Feb 23, 2026
5e47863
Merge pull request #63 from cokehill/docs/api-circulating-supply
JerryIdoko Feb 23, 2026
a92cdab
Merge branch 'main' into main
JerryIdoko Feb 23, 2026
c6599a0
Merge pull request #50 from nonso7/main
JerryIdoko Feb 23, 2026
364d0cb
Merge branch 'main' into feat/rate-limit-claims
JerryIdoko Feb 23, 2026
637553a
Merge pull request #54 from JojoFlex1/feat/rate-limit-claims
JerryIdoko Feb 23, 2026
544ccc1
Merge branch 'main' into feat/upcoming-unlocks-calendar
JerryIdoko Feb 23, 2026
591a866
Merge pull request #55 from JojoFlex1/feat/upcoming-unlocks-calendar
JerryIdoko Feb 23, 2026
bf1ceef
Merge branch 'main' into Fixed-Issue---API]-Generate-Vesting-Schedule…
JerryIdoko Feb 23, 2026
7d639b0
Merge pull request #61 from El-swaggerito/Fixed-Issue---API]-Generate…
JerryIdoko Feb 23, 2026
495c6ea
Merge branch 'main' into Fixed-Issue---Cron]-Monthly-'Vesting-Report'…
JerryIdoko Feb 23, 2026
b109b2a
Merge pull request #62 from El-swaggerito/Fixed-Issue---Cron]-Monthly…
JerryIdoko Feb 23, 2026
6a21302
Merge branch 'main' into main
JerryIdoko Feb 23, 2026
7c60bb3
Merge pull request #64 from Adedayo-Data/main
JerryIdoko Feb 23, 2026
f0465c9
feat: implement historical price tracking for tax compliance
Emmy123222 Feb 24, 2026
48c43ef
feat: implement push notifications for vesting cliff alerts
Emmy123222 Feb 24, 2026
82aca6c
feat: implement wallet-based rate limiting to prevent Sybil attacks
ekumamatthew Feb 24, 2026
ac16c8f
feat: implement real-time TVL WebSocket updates
Emmy123222 Feb 24, 2026
d52d674
Merge pull request #87 from Emmy123222/feature/historical-price-tracking
JerryIdoko Feb 24, 2026
e88694e
Merge pull request #90 from Emmy123222/feature/tvl-websocket-realtime…
JerryIdoko Feb 24, 2026
231daf6
Merge branch 'main' into feature/push-notifications
Emmy123222 Feb 24, 2026
153274f
feat: :sparkles: implement graphql interface
laryhills Feb 24, 2026
61d0c6e
Merge branch 'main' into feat/implement-graphql-interface
laryhills Feb 24, 2026
29c4c48
AWS SES Email Bounce Handling
Feb 25, 2026
5328065
Token Distribution
Feb 25, 2026
6750c41
PDF Generation
Feb 25, 2026
27b67c6
jwt
Feb 25, 2026
4f2101a
Merge pull request #92 from Tebrihk/AWS
JerryIdoko Feb 25, 2026
6afa01f
Merge pull request #93 from Tebrihk/Token-Distribution
JerryIdoko Feb 25, 2026
7a76d88
Merge branch 'main' into PDF_generation
JerryIdoko Feb 25, 2026
3d3e076
Merge pull request #94 from Tebrihk/PDF_generation
JerryIdoko Feb 25, 2026
83cab28
Merge branch 'main' into JWT
JerryIdoko Feb 25, 2026
69799ed
Merge branch 'main' into feature/push-notifications
JerryIdoko Feb 25, 2026
942cb3c
Merge branch 'main' into main
JerryIdoko Feb 25, 2026
23bc68d
Merge pull request #89 from ekumamatthew/main
JerryIdoko Feb 25, 2026
6b7cf15
Merge pull request #88 from Emmy123222/feature/push-notifications
JerryIdoko Feb 25, 2026
5ca1688
Merge pull request #91 from laryhills/feat/implement-graphql-interface
JerryIdoko Feb 25, 2026
08330ba
Merge branch 'main' into JWT
JerryIdoko Feb 25, 2026
bc8f4e9
Merge pull request #95 from Tebrihk/JWT
JerryIdoko Feb 25, 2026
9c155dc
feat: implement auto-retry mechanism for RPC calls (fixes #36)
AlAfiz Feb 25, 2026
c03ac25
Merge pull request #96 from AlAfiz/ops/issue-36-rpc-retry
JerryIdoko Feb 25, 2026
d5a5cbf
Issue: [Bug] Handle Re-orgs for Event Indexing
El-swaggerito Feb 25, 2026
6019c43
Issue: [Bug] Handle Re-orgs for Event Indexing
El-swaggerito Feb 25, 2026
19a6dae
Merge branch 'main' into Fixed-Issue---Bug]-Handle-Re-orgs-for-Event-…
El-swaggerito Feb 25, 2026
1725868
Merge pull request #97 from El-swaggerito/Fixed-Issue---Bug]-Handle-R…
JerryIdoko Feb 25, 2026
0f77946
Merge pull request #98 from LaGodxy/feature/portfolio-cache-invalidation
JerryIdoko Feb 25, 2026
db6e52b
Merge pull request #99 from LaGodxy/feature/configurable-stellar-rpc
JerryIdoko Feb 25, 2026
65acdb8
Merge pull request #100 from LaGodxy/feature/vault-reconciliation-script
JerryIdoko Feb 25, 2026
5f2c260
Merge pull request #101 from LaGodxy/feature/xero-quickbooks-csv-export
JerryIdoko Feb 25, 2026
87210e8
Token Distribution Endpoint
Feb 26, 2026
c2ad569
feat: Add Redis portfolio cache invalidation after claim processing
LaGodxy Feb 26, 2026
1ce353c
feat: Make Stellar RPC URLs configurable via environment variable
LaGodxy Feb 26, 2026
dac7e6a
feat: Create vault reconciliation script to detect missing vaults
LaGodxy Feb 26, 2026
97c8abb
feat: Implement Xero/QuickBooks CSV export endpoint
LaGodxy Feb 26, 2026
70af25a
feat: Create load testing script for TGE scenario
LaGodxy Feb 26, 2026
3bea4d1
Merge pull request #102 from LaGodxy/feature/tge-load-testing
JerryIdoko Feb 25, 2026
42e68ac
feat(security): Encrypt Beneficiary emails at rest (Issue #84)
soomtochukwu Feb 26, 2026
202b5ff
bug fixes and updates
Junman140 Feb 26, 2026
4adfdf2
build: add merkle vault contract
Junman140 Feb 26, 2026
daccb1f
feat: implement dynamic balance tokens support
johnsmccain Feb 26, 2026
38d0886
test(docs): add jest-openapi schema assertions for API tests
David-patrick-chuks Feb 26, 2026
15bcb5e
Merge pull request #108 from Tebrihk/Token-Distribution
JerryIdoko Feb 26, 2026
62aa98e
Merge branch 'main' into feature/issue-84-encrypt-pii-email
JerryIdoko Feb 26, 2026
dc0fc00
Merge pull request #109 from soomtochukwu/feature/issue-84-encrypt-pi…
JerryIdoko Feb 26, 2026
d4ba76a
Merge pull request #110 from Junman140/main
JerryIdoko Feb 26, 2026
829e644
Merge pull request #111 from johnsmccain/main
JerryIdoko Feb 26, 2026
9f587fa
Merge branch 'main' into issue-50-openapi-schema-validation
JerryIdoko Feb 26, 2026
7a8b017
Merge pull request #112 from Bug-Hunter-X/issue-50-openapi-schema-val…
JerryIdoko Feb 26, 2026
58fff0b
fix: resolve model and service layer bugs, add ci pipeline tests
JamesEjembi Mar 21, 2026
2db4383
Fix: Resolve all pipeline test failures (162/162). Harmonize API para…
JamesEjembi Mar 22, 2026
e0acfdb
feat(config): implement multi-network environment support (#38)
El-swaggerito Mar 23, 2026
ba28e71
feat(database): implement cold storage for completed vaults (#37)
El-swaggerito Mar 23, 2026
edb9dc9
feat(database): implement cold storage for completed vaults (#37)
AlAfiz Mar 23, 2026
b7c9098
feat: Implement multi-cloud database failover strategy (#116, #60)
Mar 23, 2026
17d21a3
Merge branch 'main' into main
jobbykings Mar 23, 2026
955bd1c
Merge pull request #165 from jobbykings/main
JerryIdoko Mar 23, 2026
0e99047
Add vault liquidity risk alert system
David-patrick-chuks Mar 23, 2026
2bf31f6
Implement RWA legal document hashing service
David-patrick-chuks Mar 23, 2026
e3c8914
Real-Time_Ledger_Sync_Consistency_Checker
Mar 23, 2026
690a3a2
Support for Multi-Sig_Vault_Clawback_Authorization_Flow
Mar 23, 2026
46863f0
Automated_Dividend_Distribution_Calculator
Mar 23, 2026
ecf1a47
Merge branch 'main' into fix/issue-38-multi-network-config
JerryIdoko Mar 23, 2026
44197be
Merge pull request #163 from AlAfiz/fix/issue-38-multi-network-config
JerryIdoko Mar 23, 2026
24f8996
Merge pull request #164 from AlAfiz/feat/issue-37-cold-storage
JerryIdoko Mar 23, 2026
28120da
Merge branch 'main' into Real-Time_Ledger
JerryIdoko Mar 23, 2026
98ad821
Merge pull request #169 from Tebrihk/Real-Time_Ledger
JerryIdoko Mar 23, 2026
3a9f174
Merge branch 'main' into Clawback_Authorization
JerryIdoko Mar 23, 2026
0b89cea
Merge pull request #170 from Tebrihk/Clawback_Authorization
JerryIdoko Mar 23, 2026
b87a668
Merge branch 'main' into Automated_Dividend
JerryIdoko Mar 23, 2026
cde6543
Merge pull request #171 from Tebrihk/Automated_Dividend
JerryIdoko Mar 23, 2026
9172e4d
Merge branch 'main' into feat/liquidity-risk-alert-system
JerryIdoko Mar 23, 2026
e74960f
Merge pull request #167 from David-patrick-chuks/feat/liquidity-risk-…
JerryIdoko Mar 23, 2026
d4f6a1a
feat(backend): implement HSM signer gateway for secure transaction si…
BarryArinze Mar 23, 2026
3548125
Merge pull request #172 from BarryArinze/feat/hsm-signer-gateway
JerryIdoko Mar 24, 2026
9711f53
created consistency worker
keljoshX Mar 24, 2026
2e11902
feat: implement historical price tracking for tax reporting
Henrichy Mar 24, 2026
a7e33e1
Merge branch 'main' into feat/rwa-legal-document-hashing-service
JerryIdoko Mar 24, 2026
7925976
Merge pull request #168 from David-patrick-chuks/feat/rwa-legal-docum…
JerryIdoko Mar 24, 2026
4181b81
Merge pull request #173 from keljoshX/feature/wasm-hash-consistency-w…
JerryIdoko Mar 24, 2026
4de5988
feat(vault): implement vesting position NFTs (vNFTs) with ownership-b…
BarryArinze Mar 24, 2026
79c2308
Merge pull request #175 from BarryArinze/feat/vnft-vesting-positions
JerryIdoko Mar 24, 2026
7e25955
Create Vesting-to-Fiat_Off-Ramp_Estimation_API
Prz-droid Mar 24, 2026
bde1a7b
Calculation engine development
nanaabdul1172 Mar 24, 2026
482801d
Fix dust loss from integer division truncation in claiming mechanism
frankosakwe Mar 24, 2026
94992d8
Merge pull request #176 from Prz-droid/estimation-API
JerryIdoko Mar 24, 2026
449d320
Merge branch 'main' into nana-clean-break
JerryIdoko Mar 24, 2026
f1ec06c
Merge pull request #177 from nanaabdul1172/nana-clean-break
JerryIdoko Mar 24, 2026
9fcd343
Merge branch 'main' into fix/dust-loss-prevention
JerryIdoko Mar 24, 2026
91fc018
Merge pull request #178 from frankosakwe/fix/dust-loss-prevention
JerryIdoko Mar 24, 2026
75a21d6
Merge branch 'main' into main
JerryIdoko Mar 24, 2026
cd9f256
Merge pull request #174 from Henrichy/main
JerryIdoko Mar 24, 2026
40b0d40
Implement observability and resilience features
sandrawillow001-afk Apr 26, 2026
85be25f
Add pull request template for observability and resilience features
sandrawillow001-afk Apr 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
15 changes: 15 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DATABASE_URL=postgresql://username:password@localhost:5432/vesting_vault
DB_HOST=localhost
DB_PORT=5432
DB_NAME=vesting_vault
DB_USER=username
DB_PASSWORD=password

STELLAR_RPC_URL=https://horizon-testnet.stellar.org
STELLAR_NETWORK=testnet
SOROBAN_RPC_URL=https://soroban-rpc.testnet.stellar.org
VAULT_CONTRACT_ADDRESS=CD5QF6KBAURVUNZR2EVBJISWSEYGDGEEYVH2XYJJADKT7KFOXTTIXLHU

APPROVED_VAULT_WASM_HASH=7792a624b562b3d9414792f5fb5d72f53b9838fef2ed9a901471253970bc3b15

PORT=3000
30 changes: 23 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Vesting API Tests
name: Vesting Vault Tests

on:
push:
Expand All @@ -9,11 +9,27 @@ on:
jobs:
test:
runs-on: ubuntu-latest

defaults:
run:
working-directory: backend

env:
NODE_ENV: test

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm ci
- run: npm test
node-version: '20'
cache: 'npm'
cache-dependency-path: backend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

61 changes: 61 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Dependencies
node_modules/
backend/node_modules/

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

#
node_modules
Coverage directory used by tools like istanbul
coverage/
*.lcov

# nyc test coverage
.nyc_output

# Dependency directories
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env.test
node_modules
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"kiroAgent.configureMCP": "Disabled"
}
18 changes: 18 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Backend Architecture

## Data Flow Overview

```mermaid
flowchart TD
A[Stellar Horizon API] --> B[RPC Indexer]
B --> C[PostgreSQL Database]
C --> D[Express API]
D --> E[Dashboard UI]
```

## Explanation

1. The RPC Indexer fetches vesting-related data from the Stellar Horizon API.
2. The RPC Indexer processes and stores the data in the PostgreSQL database.
3. The Express API reads data from the PostgreSQL database.
4. The Dashboard UI consumes data from the Express API.
206 changes: 206 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
# Contributing to Vesting Vault

Thank you for your interest in contributing to Vesting Vault! This guide will help you get the development environment set up and running quickly.

## Prerequisites

Before you begin, ensure you have the following installed:

- [Docker](https://docs.docker.com/get-docker/) (v20.10 or later)
- [Docker Compose](https://docs.docker.com/compose/install/) (v2.0 or later)
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

## Quick Start (Recommended)

The fastest way to get started is using Docker Compose:

1. **Clone the repository**
```bash
git clone <repository-url>
cd Vesting-Vault
```

2. **Start all services**
```bash
docker-compose up -d
```

3. **Verify services are running**
```bash
# Check backend health
curl http://localhost:3000/health

# Check all services status
docker-compose ps
```

That's it! Your development environment is now running with:
- Backend API: http://localhost:3000
- PostgreSQL Database: localhost:5432
- Redis Cache: localhost:6379

## Development Workflow

### Running Services

```bash
# Start all services in detached mode
docker-compose up -d

# Start services with logs
docker-compose up

# Stop all services
docker-compose down

# Stop services and remove volumes (clean slate)
docker-compose down -v
```

### Viewing Logs

```bash
# View all logs
docker-compose logs

# View specific service logs
docker-compose logs backend
docker-compose logs db
docker-compose logs redis

# Follow logs in real-time
docker-compose logs -f backend
```

### Backend Development

The backend service is configured for development with hot-reloading:

```bash
# Access the backend container
docker-compose exec backend sh

# Install new dependencies
docker-compose exec backend npm install <package-name>

# Run tests
docker-compose exec backend npm test

# Access database directly
docker-compose exec db psql -U postgres -d vesting_vault
```

### Database Management

```bash
# Connect to PostgreSQL
docker-compose exec db psql -U postgres -d vesting_vault

# Create database migrations (if using Sequelize)
docker-compose exec backend npx sequelize-cli migration:create --name migration_name

# Run migrations
docker-compose exec backend npx sequelize-cli db:migrate
```

## Environment Configuration

### Backend Environment Variables

Copy the example environment file and customize as needed:

```bash
cp backend/.env.example backend/.env
```

Key environment variables:
- `PORT`: Backend server port (default: 3000)
- `NODE_ENV`: Environment (development/production)
- `DB_HOST`: Database host (default: db for Docker)
- `DB_PORT`: Database port (default: 5432)
- `DB_NAME`: Database name (default: vesting_vault)
- `DB_USER`: Database user (default: postgres)
- `DB_PASSWORD`: Database password (default: password)
- `STELLAR_RPC_URL`: Stellar RPC endpoint (e.g., https://soroban-testnet.stellar.org)
- `STELLAR_NETWORK_PASSPHRASE`: Passphrase for the configured network

## Project Structure

```
Vesting-Vault/
β”œβ”€β”€ backend/ # Node.js backend application
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ index.js # Application entry point
β”‚ β”‚ └── database/ # Database configuration
β”‚ β”œβ”€β”€ Dockerfile # Backend Docker configuration
β”‚ β”œβ”€β”€ package.json # Node.js dependencies
β”‚ └── .env.example # Environment variables template
β”œβ”€β”€ docker-compose.yml # Docker services configuration
└── CONTRIBUTING.md # This file
```

## Common Issues & Solutions

### Port Conflicts

If you encounter port conflicts, modify the port mappings in `docker-compose.yml`:

```yaml
ports:
- "3001:3000" # Change host port from 3000 to 3001
```

### Database Connection Issues

1. Ensure the database service is healthy:
```bash
docker-compose ps
```

2. Check database logs:
```bash
docker-compose logs db
```

3. Verify environment variables in your `.env` file match the database configuration.

### Permission Issues (Linux/Mac)

If you encounter permission errors, run:

```bash
sudo chown -R $USER:$USER .
```

## Development Tips

1. **Use meaningful commit messages** following conventional commit format
2. **Run tests before committing** changes
3. **Check logs** when services don't start properly
4. **Use `docker-compose down -v`** for a completely fresh start
5. **Monitor resource usage** with `docker stats`

## API Endpoints

Once the backend is running, you can access:

- `GET /` - Welcome message
- `GET /health` - Health check endpoint

## Getting Help

If you encounter issues:

1. Check the troubleshooting section above
2. Review service logs: `docker-compose logs`
3. Ensure Docker and Docker Compose are up to date
4. Check that ports 3000, 5432, and 6379 are available

## Code Style Guidelines

- Use ESLint for JavaScript code formatting
- Follow conventional commit message format
- Write meaningful variable and function names
- Add comments for complex logic

Thank you for contributing to Vesting Vault! πŸš€
Loading
Loading