Skip to content

Repository files navigation

Builder for Stellar

Builder for Stellar is a Soroban DAO framework. The current implementation provides a Manager contract that deploys and records DAOs composed of five modules: Token, Metadata, Auction, Governor, and Treasury.

Current Status

  • Five Soroban DAO modules are implemented and covered by Rust tests.
  • Manager combines the implementation registry, DAO factory, and DAO registry.
  • Treasury owns the DAO modules in production and is the module-administration authority.
  • Founder allocations are fixed token amounts and the total is capped at 10,000 tokens.
  • Metadata uses mutable properties and items, with mint hooks that generate token attributes.
  • 153 Rust tests pass (pnpm contracts:test:unit).
  • Multi-DAO database, indexer, and frontend layers are not complete. The contract registry exists, but the surrounding application infrastructure remains future work.

Quick Start

Prerequisites

Installation

git clone https://github.com/your-org/builder-stellar.git
cd builder-stellar
pnpm install
pnpm contracts:build
pnpm contracts:bindings

Local Development

pnpm local:up
pnpm dev
pnpm local:down

Testing

pnpm contracts:test:unit  # 153 Rust unit tests
pnpm contracts:test:e2e
pnpm contracts:test:all
pnpm indexer:test          # Goldsky package tests, not multi-DAO completeness

Project Structure

contracts/token/       NFT voting token
contracts/metadata/    Mutable properties/items and mint hook
contracts/auction/     Auction membership module
contracts/governor/    Proposal and voting logic
contracts/treasury/    Asset custody and module ownership
contracts/manager/     Implementation registry, factory, and DAO registry
contracts/e2e/         Contract integration tests
apps/web/              Next.js frontend
packages/*-bindings/   Generated TypeScript clients
packages/goldsky/      Goldsky configuration and event tests
db/                    PostgreSQL migrations
scripts/               Build and deployment automation
configs/               Network and DAO configuration

Documentation

Common Commands

  • pnpm contracts:build - build all six contract crates
  • pnpm contracts:bindings - generate TypeScript bindings
  • pnpm deploy:local - deploy direct contracts locally
  • pnpm deploy:testnet - deploy direct contracts to testnet
  • pnpm indexer:generate - generate the Goldsky pipeline
  • pnpm build - build the web application
  • pnpm lint - lint the web application
  • pnpm typecheck - type-check the web application

Wallet Authentication

The web app uses Stellar Wallets Kit SEP-53 message signing with a stateless iron-session cookie. Configure APP_URL and a private IRON_PASSWORD of at least 32 characters for deployed environments. Local development may use the request origin when APP_URL is omitted.

Authentication endpoints are /api/auth/challenge, /api/auth/verify, /api/auth/session, and /api/auth/logout. Existing discovery and indexed-data GET endpoints remain public. Future state-changing API routes must use the authenticated address from the server session, never an address supplied in a request body or query string. SameSite cookies provide the current baseline CSRF protection; mutation routes should add an explicit CSRF token check before shipping.

Technology

Rust and Soroban power the contracts. The application uses Next.js, TypeScript, Panda CSS, Stellar Wallets Kit, Goldsky, and PostgreSQL.

License

MIT

About

A soroban port of the nouns builder protocol.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages