Open infrastructure for programmable membership, access control, governance, contributions, rewards, and Stellar-native communities.
GuildPass Core is the backend and domain layer of the GuildPass ecosystem.
GuildPass is designed for communities that need more than a simple list of members. It provides infrastructure for:
- membership;
- roles;
- access control;
- governance;
- contribution tracking;
- rewards;
- auditability;
- Stellar and Soroban integration.
GuildPass Core contains the logic and services that make those capabilities possible.
A GuildPass-powered application should be able to ask questions such as:
- Is this person an active member?
- Has their membership expired or been suspended?
- What roles do they hold?
- Are they allowed to access a protected resource?
- What contributions have they made?
- What rewards are they eligible for?
- What governance rules apply?
- How should membership interact with Stellar and Soroban?
GuildPass Core is the system responsible for answering those questions.
GuildPass Core can be thought of as the engine behind a community platform.
A community application might show:
- member profiles;
- private spaces;
- contributor badges;
- governance proposals;
- rewards;
- wallet-based membership.
The application itself does not need to contain all the logic for deciding who is allowed to do what.
Instead:
Application
│
▼
GuildPass Core
│
├── Membership
├── Roles
├── Access decisions
├── Governance
├── Contributions
├── Rewards
└── Stellar / Soroban
GuildPass Core provides the reusable infrastructure underneath those features.
The current repository contains GuildPass Core V2, a ground-up rebuild of the original Core implementation.
The previous version had accumulated a large amount of functionality and migration history. V2 was created to establish a cleaner and more maintainable foundation.
The rebuild focuses on:
- smaller, well-defined modules;
- strict TypeScript;
- reproducible database migrations;
- deterministic domain logic;
- clear separation between business rules and infrastructure;
- Stellar-first blockchain support;
- Soroban smart contracts;
- safer CI and contributor workflows;
- independently testable components.
The original implementation remains preserved in Git history and the repository's archived pre-rebuild references.
GuildPass Core V2 is under active development.
The current V2 foundation includes:
- pnpm workspace configuration;
- TypeScript monorepo setup;
- shared GuildPass domain types;
- Fastify API foundation;
- environment configuration;
/healthendpoint;- PostgreSQL local infrastructure;
- Redis local infrastructure;
- CI validation;
- contributor automation.
Additional functionality is being added through scoped contributor issues.
Not every feature described in this README should be assumed to be fully implemented yet.
GuildPass Core V2 follows a modular monorepo structure.
guildpass-core/
│
├── apps/
│ └── api/
│ └── GuildPass HTTP API
│
├── packages/
│ ├── shared-types/
│ │ └── Shared domain types
│ │
│ ├── policy-engine/
│ │ └── Access decision logic
│ │
│ ├── constitutional-engine/
│ │ └── Community constitutional rules
│ │
│ ├── contribution-engine/
│ │ └── Contribution scoring
│ │
│ ├── governance-engine/
│ │ └── Governance rules and calculations
│ │
│ └── reward-engine/
│ └── Reward and progression logic
│
├── contracts/
│ └── soroban/
│ └── Stellar Soroban contracts
│
├── tests/
│ └── integration/
│
├── docs/
├── logo/
├── docker-compose.yml
├── pnpm-workspace.yaml
├── tsconfig.base.json
├── package.json
├── .env.example
└── README.md
Some modules shown above may still be introduced incrementally as their implementation issues are completed.
A community is the main organisational boundary in GuildPass.
A community can define its own:
- members;
- roles;
- governance rules;
- resources;
- access policies;
- contribution models;
- rewards.
Membership represents the relationship between a person or wallet and a GuildPass community.
Current membership states include:
active
expired
suspended
Membership logic is expected to support:
- creation;
- expiry;
- suspension;
- restoration;
- eligibility checks;
- future on-chain representation.
Roles represent permissions or responsibilities inside a community.
Built-in role concepts include:
admin
member
contributor
GuildPass is also designed to support community-defined roles.
GuildPass Core is designed around explicit access decisions.
A decision can return more than a simple boolean.
Example:
interface AccessDecision {
allowed: boolean;
code: AccessDecisionCode;
reasons: string[];
}Possible decision codes include:
ALLOW
NOT_MEMBER
MEMBERSHIP_EXPIRED
MEMBERSHIP_SUSPENDED
INSUFFICIENT_ROLE
DENY
This makes access behaviour easier to:
- test;
- audit;
- debug;
- expose through APIs;
- reuse across applications.
GuildPass governance functionality is intended to provide reusable logic for:
- rules;
- voting;
- quorum;
- delegation;
- eligibility;
- proposal constraints;
- constitutional requirements.
Governance calculations should remain deterministic and testable independently of API routes.
The contribution system is intended to help communities evaluate meaningful participation.
Examples may include:
- contribution scores;
- activity metrics;
- completed tasks;
- participation thresholds;
- contributor progression.
GuildPass rewards may be derived from:
- contribution activity;
- participation;
- governance outcomes;
- community-defined rules.
Potential outcomes include:
- badges;
- recognition;
- role progression;
- reward allocations.
GuildPass Core V2 is Stellar-first.
The current blockchain direction uses:
- Stellar accounts;
- Soroban smart contracts;
- Rust for contract development.
The previous EVM-oriented architecture is not the default direction for V2.
Blockchain logic should remain clearly separated from the rest of the application.
Conceptually:
GuildPass API
│
├──────────────┐
│ │
▼ ▼
PostgreSQL Soroban
│ Contracts
│ │
└──────┬───────┘
│
▼
GuildPass State
- Node.js 24+
- TypeScript
- Fastify
- Zod
- pnpm
- pnpm workspaces
- PostgreSQL 15
- Prisma
- Redis 7
- Stellar
- Soroban
- Rust
- Docker
- Docker Compose
- GitHub Actions
Install:
- Git
- Node.js 24 or newer
- pnpm 11.x
- Docker
- Docker Compose
- Rust and Stellar tooling when working on Soroban contracts
Check Node:
node --versionCheck pnpm:
pnpm --versionThe repository currently uses:
pnpm 11.16.0
Fork:
Adamantine-guild/guildpass-core
git clone https://github.com/<YOUR_USERNAME>/guildpass-core.git
cd guildpass-coregit remote add upstream https://github.com/Adamantine-guild/guildpass-core.gitVerify:
git remote -vpnpm installFor CI-style reproducibility:
pnpm install --frozen-lockfileIf pnpm asks you to approve expected dependency build scripts:
pnpm approve-buildsCreate your local environment file:
cp .env.example .envThe local defaults are:
NODE_ENV=development
PORT=3000
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/guildpass
DIRECT_URL=postgresql://postgres:postgres@localhost:5432/guildpass
REDIS_URL=redis://localhost:6379Do not commit .env.
GuildPass Core uses Docker Compose for PostgreSQL and Redis.
Start:
docker compose up -dCheck:
docker compose psExpected local services:
PostgreSQL : 5432
Redis : 6379
Stop:
docker compose downTo remove local volumes as well:
docker compose down -vUse the volume-removal command carefully because it deletes local database data.
Start development mode:
pnpm devor:
pnpm --filter @guildpass/api devDefault API address:
http://localhost:3000
The API exposes:
GET /healthTest it:
curl http://localhost:3000/healthExpected response:
{
"status": "ok",
"service": "guildpass-core-api"
}pnpm typecheckpnpm buildpnpm testpnpm devGuildPass Core V2 uses PostgreSQL as its primary relational datastore.
The V2 database approach is designed around:
- a coherent Prisma schema;
- reproducible migrations;
- fresh-database compatibility;
- explicit constraints;
- predictable relations;
- CI migration verification.
The intended development flow is:
install dependencies
↓
start PostgreSQL
↓
generate Prisma client
↓
apply migrations
↓
typecheck
↓
build
↓
test
Database migrations should work against a fresh database without requiring manual repair.
Redis is used for infrastructure concerns such as caching.
Redis must not become the authoritative source of GuildPass domain state.
The database and relevant domain systems remain the source of truth.
Shared domain contracts live under:
packages/shared-types
The package is exposed internally as:
@guildpass/shared-types
Examples include:
export interface Community {
id: string;
name: string;
slug: string;
createdAt: Date;
}and:
export interface AccessDecision {
allowed: boolean;
code: AccessDecisionCode;
reasons: string[];
}Shared types should remain free of unnecessary infrastructure dependencies.
Business rules should not be hidden inside:
- controllers;
- database queries;
- route handlers;
- middleware.
A policy calculator should be testable without starting a database.
A governance calculation should not require the API server.
A Stellar parser should not require a network request.
Given the same inputs and state, domain logic should return the same result.
Fastify, PostgreSQL, Redis, and Soroban are infrastructure.
GuildPass domain behaviour should remain understandable without them.
Core V2 is intentionally smaller.
Do not recreate old architecture unless there is a specific approved requirement.
Database migrations must work on a fresh database.
Local database history should never be required for a migration to succeed.
New logic should include relevant tests.
Bug fixes should preferably include regression tests.
GuildPass Core uses GitHub Actions to validate pull requests.
The Core pipeline performs:
Install dependencies
↓
Typecheck
↓
Build
↓
Test
The required job is:
Build and Test
Pull requests are not eligible for automatic merging until this check passes.
GuildPass repositories use central PR automation maintained by Adamantine Guild.
The automation can:
- inspect CI checks;
- detect pending workflows;
- detect failed checks;
- detect merge conflicts;
- comment on blocked pull requests;
- approve eligible external-contributor workflows;
- merge eligible pull requests.
For guildpass-core, the required CI check must exist and succeed before auto-merge is allowed.
The flow is:
Contributor opens PR
│
├──────────────┐
│ │
▼ ▼
Core CI PR Automation
│ │
▼ │
Build and Test │
│ │
└──────┬───────┘
│
▼
Evaluate PR state
│
┌────────┼────────┐
│ │ │
Failed Pending Passed
│ │ │
▼ ▼ ▼
Block Wait Merge
Contributions are welcome.
Before contributing, read:
CONTRIBUTING.md
CODE_OF_CONDUCT.md
SECURITY.md
git checkout main
git fetch upstream
git pull upstream main
git push origin mainDo not work directly on main.
Example:
git checkout -b feat/stellar-address-validationRecommended prefixes:
feat/
fix/
test/
docs/
refactor/
chore/
ci/
Contributor issues are intentionally scoped so multiple contributors can work concurrently.
Do not make your issue depend on another open issue unless the issue explicitly says so.
Before opening a PR:
pnpm install --frozen-lockfile
pnpm typecheck
pnpm build
pnpm testReference the issue:
Closes #123
Your PR should explain:
- what changed;
- why;
- how it works;
- what tests were added;
- any important design decisions.
GuildPass Core contributor issues may include labels such as:
Third Campaign
advanced
expert
backend
database
stellar
soroban
policy
governance
membership
roles
testing
security
performance
Issues should be treated as the source of truth for implementation scope.
Avoid expanding a contribution far beyond the issue acceptance criteria.
Use clear scoped commit messages.
Recommended format:
type(scope): description
Examples:
feat(policy): add deterministic rule evaluator
feat(stellar): validate Stellar account IDs
fix(api): reject malformed request metadata
test(governance): cover quorum boundary cases
docs(core): update contributor setup
Never commit:
- private keys;
- Stellar secret keys;
- seed phrases;
- API tokens;
- database passwords;
- production credentials;
.envfiles containing secrets.
Security vulnerabilities should not be disclosed through public GitHub issues.
Follow:
SECURITY.md
for responsible disclosure instructions.
GuildPass Core V2 is a rebuild, not a deletion of the original project.
The pre-rebuild implementation remains available through Git history and preserved archive references.
Contributors should build against the current main branch and current V2 architecture unless an issue explicitly says otherwise.
Architecture and implementation documentation belongs under:
docs/
Documentation should be updated when a change materially affects:
- architecture;
- APIs;
- data models;
- contributor setup;
- CI;
- Stellar integration;
- Soroban contracts.
GuildPass Core is distributed under the MIT License.
See:
LICENSE
for the complete terms.
GuildPass is developed as part of the Adamantine Guild open-source ecosystem.
https://github.com/Adamantine-guild/guildpass-core
https://github.com/Adamantine-guild
GuildPass Core
Infrastructure for programmable communities.
