Skip to content

gamedaoco/battlepass-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Battlepass Stack Monorepo

This monorepo contains all services and packages for the GameDAO Battlepass system rewrite.

Structure

  • packages/: Core services and shared libraries
  • services/: External integration adapters
  • docs/: Architecture, requirements, and design documents
  • docker/: Docker-related configurations
  • k8s/: Kubernetes manifests
  • scripts/: Utility scripts
  • .github/: GitHub Actions workflows

Getting Started

Prerequisites

  • Node.js: v20.x or higher
  • pnpm: v8.x or higher
  • Podman or Docker: For containerized services
  • PostgreSQL: 16 or higher (or use container)
  • Redis: 7 or higher (or use container)
  • RabbitMQ: 3.x or higher (or use container)

Installation

  1. Install pnpm:

    npm install -g pnpm
  2. Install dependencies:

    make install
    # or
    pnpm install
  3. Start infrastructure services:

    make up
    # or
    ./scripts/dev-start.sh
  4. Run database migrations:

    make db-migrate
    # or
    pnpm db:migrate
  5. Build all packages:

    make build
    # or
    pnpm build
  6. Start development:

    make dev
    # or
    pnpm dev

Development

Makefile Commands

See make help for all available commands:

  • make install - Install all dependencies
  • make build - Build all packages
  • make test - Run all tests
  • make lint - Lint all packages
  • make format - Format all code
  • make clean - Clean all build artifacts
  • make up - Start infrastructure services
  • make down - Stop all services
  • make logs - View service logs
  • make db-migrate - Run database migrations
  • make db-studio - Open Prisma Studio

Package Scripts

  • pnpm build - Build all packages
  • pnpm test - Run all tests
  • pnpm lint - Lint all packages
  • pnpm format - Format all code
  • pnpm dev - Start development mode
  • pnpm db:generate - Generate Prisma client
  • pnpm db:migrate - Run Prisma migrations
  • pnpm db:studio - Open Prisma Studio

Commit Guidelines

We follow Conventional Commits for commit messages.

Format

<type>(<scope>): <subject>

<body>

<footer>

Using Commitizen

pnpm commit

This will guide you through creating a properly formatted commit message.

See CONTRIBUTING.md for detailed commit guidelines.

Versioning

We use Semantic Versioning (SemVer) with automated releases via semantic-release.

Versions are automatically determined from commit messages:

  • feat: → minor version bump
  • fix: → patch version bump
  • BREAKING CHANGE: → major version bump

Changelog

The CHANGELOG.md is automatically generated from commit messages.

Services

API Gateway

  • GraphQL API (Apollo Server v4)
  • Health check endpoints
  • Port: 3000

Identity Service

  • Identity management
  • OAuth integration (Discord, Twitter, Epic Games)
  • SBT issuance and verification
  • Account Abstraction (ERC-4337)
  • Port: 3001

Database

Database Commands

  • make db-generate - Generate Prisma client
  • make db-migrate - Run migrations
  • make db-studio - Open Prisma Studio
  • make db-seed - Seed database

Documentation

Refer to the docs/ directory for detailed architecture, design, and implementation plans.

License

See LICENSE file.

About

Battlepass Services

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •