Skip to content

owohdora-stack/soroban-ajo

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

801 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ajo - Decentralized Savings Groups

🟒 Issue #284 (Dispute Resolution and Arbitration System) has been implemented and resolved via PRs. This repository now includes filing, voting, and admin arbitration features.

A blockchain-based savings group platform built on Stellar/Soroban, enabling communities to create and manage traditional "Ajo" or "Rotating Savings and Credit Associations" (ROSCAs) with full transparency and security.

πŸ“– Documentation

Interactive documentation site: Run npm run dev:docs and visit http://localhost:3000

πŸ— Project Structure

drips_maintener/
β”œβ”€β”€ frontend/          # Next.js web application
β”‚   └── src/
β”‚       β”œβ”€β”€ app/       # Next.js pages (App Router)
β”‚       β”œβ”€β”€ components/
β”‚       β”œβ”€β”€ hooks/
β”‚       └── services/
β”œβ”€β”€ backend/           # Node.js/Express API server
β”‚   └── src/
β”‚       β”œβ”€β”€ routes/    # API routes
β”‚       β”œβ”€β”€ controllers/
β”‚       β”œβ”€β”€ services/  # Soroban integration
β”‚       └── middleware/
β”œβ”€β”€ contracts/         # Soroban smart contracts (Rust)
β”‚   └── ajo/          # Main Ajo contract
β”œβ”€β”€ documentation/     # All project documentation
└── package.json      # Monorepo root config

πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • Rust 1.70+
  • Stellar CLI
  • Git

Monorepo Setup

# Clone repository
git clone <repo-url>
cd drips_maintener

# Install all dependencies (frontend + backend)
npm run install:all

# Or install individually:
npm install           # Root dependencies
cd frontend && npm install
cd ../backend && npm install

Smart Contracts (Rust/Soroban)

cd contracts/ajo

# Build contract
stellar contract build

# Run tests
cargo test

# Deploy (with Stellar CLI configured)
stellar contract deploy --wasm target/wasm32-unknown-unknown/release/ajo.wasm

Testnet Deployment (recommended)

Use the helper script to deploy the contract to Stellar testnet:

# From repo root
scripts/deploy_testnet.sh

What it does:

  • Ensures Soroban CLI, Rust, and testnet network config exist
  • Generates a deployer identity (if missing) and prompts you to fund it via friendbot
  • Builds and optimizes the contract
  • Deploys to testnet and writes the contract ID to contract-id.txt
  • Prints next steps and an explorer link

See the full walkthrough in demo/demo-script.md.

Troubleshooting

  • If deployment fails with funding errors: fund the deployer shown in the script output via https://friendbot.stellar.org?addr=<address>, then re-run.
  • If soroban can't find testnet: the script re-adds it, or you can run
    soroban network add --global testnet --rpc-url https://soroban-testnet.stellar.org:443 --network-passphrase "Test SDF Network ; September 2015".

Backend API (Node.js/Express)

cd backend

# Set up environment
cp .env.example .env
# Edit .env with your Stellar RPC URL and contract ID

# Run development server
npm run dev

Runs on http://localhost:3001

Frontend (Next.js)

cd frontend

# Set up environment
cp .env.example .env.local
# Edit .env.local with your configuration

# Run development server
npm run dev

Visit http://localhost:3000

Run Everything Together

# From root directory
npm run dev

This starts both frontend and backend concurrently.

πŸ“š Documentation

Comprehensive documentation is available in the documentation/ folder:

Quick Links

πŸ›  Technology Stack

Smart Contracts

  • Blockchain: Stellar (Soroban)
  • Language: Rust
  • Testing: Rust test framework

Backend API

  • Runtime: Node.js 20+
  • Framework: Express.js 4.18
  • Language: TypeScript 5.2
  • Blockchain SDK: Stellar SDK 12.0
  • Security: Helmet, CORS
  • Validation: Zod

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript 5.2
  • Styling: Tailwind CSS 3.3
  • State: React Query + Zustand
  • Blockchain SDK: Stellar SDK 12.0
  • Charts: Recharts

🎯 Features

  • βœ… Create savings groups with custom rules
  • βœ… Member onboarding and management
  • βœ… Scheduled contributions tracking
  • βœ… Transparent fund distribution
  • βœ… Transaction history on-chain
  • βœ… Group analytics and insights
  • βœ… Wallet integration (Freighter)

πŸ”§ Development

Prerequisites

  • Node.js 20+
  • Rust 1.70+
  • Stellar CLI
  • Git

Setup

# Clone repository
git clone <repo-url>
cd drips_maintener

# Install all dependencies
npm run install:all

# Set up contracts
cd contracts/ajo
cargo build

# Set up backend
cd ../../backend
cp .env.example .env
# Edit .env

# Set up frontend
cd ../frontend
cp .env.example .env.local
# Edit .env.local

Development Workflow

# From root - run everything
npm run dev

# Or run individually:
npm run dev:frontend    # Next.js on :3000
npm run dev:backend     # Express on :3001

# Build everything
npm run build

# Run tests
npm run test:contracts  # Rust tests
npm run type-check      # TypeScript checks
npm run lint           # ESLint

πŸ“ Environment Variables

Backend (backend/.env)

NODE_ENV=development
PORT=3001
FRONTEND_URL=http://localhost:3000
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
SOROBAN_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
SOROBAN_CONTRACT_ID=<your_contract_id>

Frontend (frontend/.env.local)

NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
NEXT_PUBLIC_SOROBAN_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
NEXT_PUBLIC_SOROBAN_CONTRACT_ID=<your_contract_id>
NEXT_PUBLIC_API_URL=http://localhost:3001

πŸ§ͺ Testing

Contracts

cd contracts/ajo
cargo test

Backend

cd backend
npm run type-check
npm run lint
npm test  # (when tests are added)

Frontend

cd frontend
npm run type-check
npm run lint

All at Once

# From root
npm run type-check
npm run lint
npm run test:contracts

🚒 Deployment

Contracts

Deploy to Stellar testnet/mainnet using Stellar CLI:

cd contracts/ajo
stellar contract build
stellar contract deploy --wasm target/wasm32-unknown-unknown/release/ajo.wasm --network testnet

Backend

Deploy to Railway, Render, Heroku, or any Node.js hosting:

cd backend
npm run build
npm start

Recommended platforms:

  • Railway (easiest)
  • Render
  • DigitalOcean App Platform
  • Heroku
  • AWS/GCP/Azure

Frontend

Deploy to Vercel (recommended for Next.js):

cd frontend
npm run build
npm start

Or one-click deploy:

  • Vercel (recommended)
  • Netlify
  • Cloudflare Pages

Environment Variables

Remember to set all required environment variables in your hosting platform.

🀝 Contributing

See CONTRIBUTING.md for guidelines.

πŸ“„ License

See LICENSE file.

πŸ”— Resources

πŸ“§ Support

For questions and support, please open an issue on GitHub.

About

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 71.7%
  • Makefile 11.7%
  • HTML 7.0%
  • Rust 6.8%
  • JavaScript 1.1%
  • CSS 0.9%
  • Other 0.8%