A peer-run organization where software developers certify each other's skills, learn together, and create opportunities. Built on the idea that developers are stronger when united.
This is a monorepo containing:
frontend/- Astro + React frontend with Web3 integrationbackend/- Rust backend with Axum, SQLx, and SIWE authenticationthe-guild-smart-contracts/- Foundry-based Solidity smart contracts for badge registry
- Astro - Fast static site generator with React islands
- React - For interactive Web3 components
- Tailwind CSS - Utility-first CSS framework
- wagmi - React hooks for Ethereum
- viem - TypeScript interface for Ethereum
- RainbowKit - Wallet connection UI
- TanStack Query - Data fetching and caching
- TanStack Router - Type-safe routing
- Rust - Systems programming language
- Axum - Web framework
- SQLx - Async SQL toolkit with compile-time checked queries
- PostgreSQL - Database
- SIWE - Sign-In with Ethereum authentication
- Solidity - Smart contract programming language
- Foundry - Fast, portable and modular toolkit for Ethereum application development
- Docker
- Node.js (for frontend development)
- Astro CLI (for frontend development)
- Foundry (for smart contracts)
Create a .env file in the project root with the following variables:
# Database
DATABASE_URL=postgresql://guild_user:guild_password@localhost:5433/guild_genesis
# Frontend Environment Variables
PUBLIC_WALLET_CONNECT_PROJECT_ID=your_wallet_connect_project_id
PUBLIC_API_URL=http://localhost:3001
PUBLIC_BADGE_REGISTRY_ADDRESS=0x...
PUBLIC_EAS_CONTRACT_ADDRESS=0x...
PUBLIC_ACTIVITY_TOKEN_ADDRESS=0x...
PUBLIC_ATTESTATION_RESOLVER_ADDRESS=0x...
PUBLIC_SCHEMA_ID=0x...
# Discord Bot (if using)
DISCORD_TOKEN=your_discord_bot_token
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_GUILD_ID=your_discord_guild_id
# Optional: Skip migrations in development
SKIP_MIGRATIONS=1
# Optional: Disable SQLx compile-time validation
SQLX_OFFLINE=trueRequired for Production:
DATABASE_URL- PostgreSQL connection stringPUBLIC_WALLET_CONNECT_PROJECT_ID- Get from WalletConnect Cloud- Contract addresses - Deploy smart contracts first
Optional for Development:
SKIP_MIGRATIONS=1- Skip automatic migrations (run manually)SQLX_OFFLINE=true- Disable SQLx compile-time validation
We provide multiple Docker Compose configurations for different environments:
# Development with hot reload
make dev
# Production build
make prod
# Run tests
make test
# Database only
make db
# Stop all services
make stopBackend:
cd backend
cargo install sqlx-cli --no-default-features --features rustls,postgres
cargo sqlx prepare -- --bin guild-backendFrontend:
cd frontend
npm install
npm run devDatabase:
docker compose up -d postgresdocker-compose.dev.yml- Development with hot reload, volume mounts, and dev toolsdocker-compose.prod.yml- Production with optimized builds and restart policiesdocker-compose.test.yml- Testing environment with test-specific configurationsdocker-compose.db-only.yml- Just PostgreSQL for local development
Use make commands or specify files directly:
docker compose -f docker-compose.dev.yml up --buildAccess the applications:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- PostgreSQL: localhost:5433
# Navigate to smart contracts directory
cd the-guild-smart-contracts
# Build contracts
forge build
# Run tests
forge test
# Run tests with verbose output
forge test -vv
# Deploy to local network (Anvil)
anvil
# In another terminal:
forge script script/TheGuildBadgeRegistry.s.sol:TheGuildBadgeRegistryScript --rpc-url http://localhost:8545 --private-key <PRIVATEK_KEY> --broadcast
# Deploy to testnet/mainnet
forge script script/TheGuildBadgeRegistry.s.sol:TheGuildBadgeRegistryScript --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcastThe the-guild-smart-contracts/ directory contains our Solidity smart contracts built with Foundry. See the dedicated docs for deployment details, addresses, and usage: the-guild-smart-contracts/README.md.
A community-driven badge registry where anyone can create badges with unique names and descriptions.
Key Features:
- Community-driven: Anyone can create badges
- Unique names: No duplicate badge names allowed
- Immutable: No owner or upgrade mechanism
- Gas-efficient: Simple storage patterns
- Event-driven: Emits events for badge creation
Contract Interface (V2 - current):
// Create a new badge
function createBadge(bytes32 name, bytes calldata description) external
// Get badge information
function getBadge(bytes32 name) external view returns (bytes32, bytes memory, address)
// Check if badge exists
function exists(bytes32 name) external view returns (bool)
// Get total number of badges
function totalBadges() external view returns (uint256)
// Enumerate badges
function badgeNameAt(uint256 index) external view returns (bytes32)
function getBadgeAt(uint256 index) external view returns (bytes32, bytes memory, address)Events:
event BadgeCreated(bytes32 indexed name, bytes description, address indexed creator)Note: V1 contracts used
bytes32for descriptions (max 32 chars). V2 usesbytesfor unlimited length. The frontend is retrocompatible with both versions.
An ERC20 token used to reward attestations. Ownable; the owner is the attestation resolver contract.
Key Points:
- 18 decimals; symbol
TGA - Owner-only
mint(address to, uint256 amount)
An EAS SchemaResolver that validates attestations and mints TGA on success.
Validation and Behavior:
- Decodes schema data:
bytes32 badgeName, bytes justification - Requires
badgeNameto exist inTheGuildBadgeRegistry - Prevents duplicate
(attester, recipient, badgeName)via a keyed mapping - Mints
10 * 10^decimals()TGA to the attester on success
Simple community ranking via upvotes on badges.
Key Functions:
upvoteBadge(bytes32 badgeName)– One vote per address per badgegetUpvotes(bytes32 badgeName)– Read total voteshasVotedForBadge(bytes32 badgeName, address voter)– Read if voted
- Monorepo structure
- Astro frontend with React islands
- Rust backend with Axum
- Web3 wallet integration
- Basic profile and badge system
- Smart contracts for on-chain badges
- SIWE authentication
- Database models and migrations
- API endpoints for profiles and badges
- Gasless transactions
- Badge hierarchy and categories
- Activity and contribution tokens — see CONTRIBUTION_TOKEN.md for the Contribution Token specification
- DAO governance
- Social features
- Simple first, complex later - Start with MVP, iterate
- Non-profit, member-driven - Community ownership
- Horizontal governance - Flat organization structure
- Action over endless talk - Build and ship
- We use what we build - Dogfooding our own tools
This is a community-driven project. Join our Discord to discuss features, propose changes, and contribute to the codebase.
See detailed steps in CONTRIBUTION.md.
See LICENSE file for details.