Skip to content
Projetos

Sobre

discord waifu / husbando gacha bot

Desenvolvimento web e de aplicativos

Como estes números são medidos

O que você pode fazer

  • Character collection via rolls and channel drops that require a name match to claim.
  • Trading between users and token exchange for characters.
  • Wishlist to track desired characters and find trading partners, including bulk add from anime or manga.
  • Profiles with favorite character, quote, and AniList link.

Crescimento medido de estrelas

em 24 h
0
em 7 dias
0
em 15 dias
0
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Waifu Bot

Add to server

Waifu Bot is a Discord bot for collecting and trading anime and manga characters. Users roll for random characters, claim drops that appear after channel activity, build collections, and trade with other users.

Features

  • Character collection via rolls and channel drops that require a name match to claim.
  • Trading between users and token exchange for characters.
  • Wishlist to track desired characters and find trading partners, including bulk add from anime or manga.
  • Profiles with favorite character, quote, and AniList link.
  • Search for anime, manga, characters, and AniList users via AniList.
  • Web interface and API for browsing collections and wishlists.

The web interface is at waifugui.karitham.dev. The API is at waifuapi.karitham.dev and is defined in openapi.yaml; the frontend generates its client from that file.

Development

The project uses Nix flakes for development. The dev shell provides Go, Node.js, and required tools.

Prerequisites

  • Nix with flakes enabled
  • Direnv for automatic shell loading (optional)

Setup

git clone https://github.com/karitham/waifubot
cd waifubot
direnv allow
# OR
nix develop

Create environment variables for local development (.envrc is gitignored):

export BOT_TOKEN=...
export APP_ID=...
export PUBLIC_KEY=...
export DB_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable

For all options, see backend/cmd/waifubot/run.go.

Running locally

  1. Start PostgreSQL:

    docker-compose up -d
    
  2. Start the backend:

    cd backend
    go run ./cmd/waifubot run
    

    Migrations run automatically. The bot and API listen on http://localhost:8080 (/metrics on the same port). The frontend expects the API at that address.

  3. Start the frontend:

    cd frontend
    npm install
    npm run dev
    

    The frontend listens on http://localhost:5173.

For Discord slash commands, see backend/discord/commands.go and the in-app command list. For API details, see openapi.yaml.

Self-hosting

Backend

Build a binary with nix build .#waifubot or use the container from ghcr.io/karitham/waifubot. Provide a PostgreSQL database and the required environment variables (BOT_TOKEN, APP_ID, PUBLIC_KEY, DB_URL). Run with waifubot run.

For NixOS, see nix/module.nix. For Kubernetes, see karitham/infra.

Frontend

Build a static site:

cd frontend
npm install
VITE_API_URL=https://api.example.com npm run build

Deploy dist/ to any static host such as Cloudflare Pages, Vercel, or Netlify.

Set VITE_API_URL at build time to the API instance.

License

MIT — see LICENSE. Copyright 2020 PERY "Karitham" Pierre-Louis.

Explore projetos relacionados

Carregando…