This guide walks you through setting up Nestera for local development. By the end, you'll have the frontend, backend, and smart contracts running on your machine.
Install the following tools before proceeding:
| Tool | Version | Install |
|---|---|---|
| Node.js | v18+ | nodejs.org |
| pnpm | v8+ | npm install -g pnpm |
| Rust | stable | rustup.rs |
| Soroban CLI | latest | cargo install soroban-cli (see below) |
| Docker | v24+ | docker.com |
| Git | v2+ | git-scm.com |
# Install via cargo (requires Rust stable)
cargo install --locked soroban-cli
# Verify installation
soroban --version
# Add the Stellar testnet network
soroban network add \
--global testnet \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"You'll need a funded testnet account for deploying and interacting with contracts:
# Generate a new key pair
soroban keys generate --global --network testnet my-key
# Fund it via the Friendbot (testnet faucet)
curl "https://friendbot.stellar.org?addr=$(soroban keys address my-key)"# Shallow clone (faster, recommended for contributors)
git clone --depth 1 https://github.com/Devsol-01/Nestera.git
cd Nestera
# Or full clone (if you need full git history)
git clone https://github.com/Devsol-01/Nestera.git
cd NesteraThe contracts live in contracts/ and are written in Rust using the Soroban SDK.
cd contracts
# Build all contracts
cargo build --target wasm32-unknown-unknown --release
# Or build with the Soroban CLI
soroban contract buildcd contracts
cargo testcd contracts
# Deploy a contract (replace with actual contract .wasm path)
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/nestera.wasm \
--source-account my-key \
--network testnetNote: Save the contract ID returned after deployment — you'll need it for the backend and frontend configuration.
The backend is a NestJS API in backend/.
cd backend
# Copy the example env file
cp .env.example .env
# Edit .env with your local settings
# At minimum, configure:
# DATABASE_URL=postgresql://nestera:nestera@localhost:5432/nestera
# SOROBAN_RPC_URL=https://soroban-testnet.stellar.org:443
# CONTRACT_ID=<your-deployed-contract-id>cd backend
# Start PostgreSQL and other services via Docker Compose
docker compose up -d postgres
# Verify it's running
docker compose psThis starts a PostgreSQL 15 instance on localhost:5432 with:
- User:
nestera - Password:
nestera - Database:
nestera
cd backend
# Install dependencies
pnpm install
# Run database migrations (if applicable)
pnpm run build
# Start in development mode (hot-reload)
pnpm run start:devThe API will be available at http://localhost:3000 (default NestJS port).
cd backend
# Unit tests
pnpm run test
# Watch mode
pnpm run test:watch
# Coverage report
pnpm run test:cov
# E2E tests
pnpm run test:e2eThe frontend is a Next.js app in frontend/.
cd frontend
# Install dependencies
pnpm install
# Start development server
pnpm run devThe frontend will be available at http://localhost:3000.
# Type checking
pnpm run type-check
# Linting
pnpm run lint
# Fix lint issues
pnpm run lint:fix
# Production build
pnpm run buildOpen three terminal tabs:
# Tab 1: Database
cd backend && docker compose up -d postgres
# Tab 2: Backend API
cd backend && pnpm run start:dev
# Tab 3: Frontend
cd frontend && pnpm run devOr use Docker Compose to run the full stack:
cd backend
docker compose up -drustup target add wasm32-unknown-unknownMake sure Docker is running and the container is up:
docker compose ps
docker compose logs postgresIf port 3000 or 5432 is occupied, either stop the conflicting service or update the port in:
- Backend:
backend/.env(DATABASE_URL port) - Frontend:
frontend/next.config.ts(if custom port configured)
cd frontend
rm -rf node_modules .next
pnpm install
pnpm run devFund your testnet account:
curl "https://friendbot.stellar.org?addr=$(soroban keys address my-key)"Nestera/
├── frontend/ # Next.js frontend (React, TailwindCSS)
│ ├── app/ # App router pages
│ ├── public/ # Static assets
│ └── package.json
├── backend/ # NestJS API server
│ ├── src/ # Source code
│ ├── docker-compose.yml
│ └── package.json
├── contracts/ # Soroban smart contracts (Rust)
│ ├── src/ # Contract source
│ ├── tests/ # Contract tests
│ └── Cargo.toml
├── scripts/ # Deployment & automation scripts
├── tests/ # Integration & E2E tests
└── DEVELOPMENT.md # ← You are here
- Check the CONTRIBUTING.md for contribution guidelines
- Open an issue if you hit a bug
- Read the contracts documentation for smart contract details