# kirbyloco/gamer_autosignin architecture

> Architecture diagram of the GitHub repository kirbyloco/gamer_autosignin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kirbyloco/gamer_autosignin
- Repository: https://github.com/kirbyloco/gamer_autosignin

## Overview

This repository automates Bahamut account activity through two independent scripts: `main.py` handles login, daily sign-in, AnimeFong quiz answers, and guild sign-in; `lottery.py` uses an authenticated HTTP session plus Chrome/Buster to find and enter free-ad lotteries. The README documents the scheduling and these capabilities. External-service relationships are shown only where the excerpts make the requests explicit; no separate persistent data store is shown. The lottery browser setup is included because it is part of that runtime workflow.

Main entry points: [`main.py`](https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py) (Account login), [`lottery.py`](https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py) (Lottery runner), [`config_default.json`](https://github.com/kirbyloco/gamer_autosignin/blob/master/config_default.json) (Credentials and API key)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Account automation"]
  node_config["Credentials and API key"]
  node_signin_script["Daily sign-in runner<br/>[main.py]"]
  node_login["Account login<br/>[main.py]"]
  node_daily_signin["Daily check-in<br/>[main.py]"]
  node_quiz["Anime quiz answer<br/>[main.py]"]
  node_guild["Guild check-in<br/>[main.py]"]
end

subgraph group_lottery["Lottery automation"]
  node_lottery_script["Lottery runner<br/>[lottery.py]"]
  node_browser_setup["Browser and Buster setup<br/>[lottery.py]"]
  node_lottery_login["Lottery login<br/>[lottery.py]"]
  node_discover["Find free lotteries<br/>[lottery.py]"]
  node_enter["Answer and enter lottery<br/>[lottery.py]"]
end

subgraph group_services["External services"]
  node_bahamut["Bahamut account APIs"]
  node_anime["AnimeFong quiz API"]
  node_guild_service["Guild service"]
  node_lottery_service["Welfare shop"]
  node_wit["Wit.ai speech API"]
end

node_user(("Account owner"))

node_user -->|"runs"| node_signin_script
node_user -->|"schedules"| node_lottery_script
node_config -->|"loads settings"| node_signin_script
node_signin_script -->|"invokes"| node_login
node_login -->|"authenticates"| node_bahamut
node_login -->|"invokes"| node_daily_signin
node_login -->|"invokes"| node_quiz
node_login -->|"invokes"| node_guild
node_daily_signin -->|"checks in"| node_bahamut
node_quiz -->|"gets answer"| node_bahamut
node_quiz -->|"submits answer"| node_anime
node_guild -->|"gets guilds"| node_bahamut
node_guild -->|"checks in"| node_guild_service
node_config -->|"loads settings"| node_lottery_script
node_lottery_script -->|"configures"| node_browser_setup
node_lottery_script -->|"runs"| node_lottery_login
node_lottery_login -->|"authenticates"| node_bahamut
node_lottery_login -->|"copies cookies"| node_browser_setup
node_browser_setup -->|"configures extension"| node_wit
node_lottery_script -->|"runs"| node_discover
node_discover -->|"finds offers"| node_lottery_service
node_discover -->|"invokes"| node_enter
node_enter -->|"answers and enters"| node_lottery_service

click node_config "https://github.com/kirbyloco/gamer_autosignin/blob/master/config_default.json"
click node_signin_script "https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py"
click node_login "https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py"
click node_daily_signin "https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py"
click node_quiz "https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py"
click node_guild "https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py"
click node_lottery_script "https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py"
click node_browser_setup "https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py"
click node_lottery_login "https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py"
click node_discover "https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py"
click node_enter "https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_signin_script,node_login,node_daily_signin,node_quiz,node_guild toneBlue
class node_lottery_script,node_browser_setup,node_lottery_login,node_discover,node_enter toneAmber
class node_bahamut,node_anime,node_guild_service,node_lottery_service,node_wit toneMint
class node_user toneIndigo
```

## Components

### Account automation

- [Credentials and API key](https://github.com/kirbyloco/gamer_autosignin/blob/master/config_default.json): `config_default.json`
- [Daily sign-in runner](https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py): `main.py`
- [Account login](https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py): `main.py`
- [Daily check-in](https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py): `main.py`
- [Anime quiz answer](https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py): `main.py`
- [Guild check-in](https://github.com/kirbyloco/gamer_autosignin/blob/master/main.py): `main.py`

### Lottery automation

- [Lottery runner](https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py): `lottery.py`
- [Browser and Buster setup](https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py): `lottery.py`
- [Lottery login](https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py): `lottery.py`
- [Find free lotteries](https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py): `lottery.py`
- [Answer and enter lottery](https://github.com/kirbyloco/gamer_autosignin/blob/master/lottery.py): `lottery.py`

### External services

- **Bahamut account APIs**
- **AnimeFong quiz API**
- **Guild service**
- **Welfare shop**
- **Wit.ai speech API**

### Other components

- **Account owner**

## Connections

- Account owner → Daily sign-in runner: runs (evidence: `README.md`)
- Account owner → Lottery runner: schedules (evidence: `README.md`)
- Credentials and API key → Daily sign-in runner: loads settings (evidence: `main.py`)
- Daily sign-in runner → Account login: invokes (evidence: `main.py`)
- Account login → Bahamut account APIs: authenticates (evidence: `main.py`)
- Account login → Daily check-in: invokes (evidence: `main.py`)
- Account login → Anime quiz answer: invokes (evidence: `main.py`)
- Account login → Guild check-in: invokes (evidence: `main.py`)
- Daily check-in → Bahamut account APIs: checks in (evidence: `main.py`)
- Anime quiz answer → Bahamut account APIs: gets answer (evidence: `main.py`)
- Anime quiz answer → AnimeFong quiz API: submits answer (evidence: `main.py`)
- Guild check-in → Bahamut account APIs: gets guilds (evidence: `main.py`)
- Guild check-in → Guild service: checks in (evidence: `main.py`)
- Credentials and API key → Lottery runner: loads settings (evidence: `lottery.py`)
- Lottery runner → Browser and Buster setup: configures (evidence: `lottery.py`)
- Lottery runner → Lottery login: runs (evidence: `lottery.py`)
- Lottery login → Bahamut account APIs: authenticates (evidence: `lottery.py`)
- Lottery login → Browser and Buster setup: copies cookies (evidence: `lottery.py`)
- Browser and Buster setup → Wit.ai speech API: configures extension (evidence: `lottery.py`)
- Lottery runner → Find free lotteries: runs (evidence: `lottery.py`)
- Find free lotteries → Welfare shop: finds offers (evidence: `lottery.py`)
- Find free lotteries → Answer and enter lottery: invokes (evidence: `lottery.py`)
- Answer and enter lottery → Welfare shop: answers and enters (evidence: `lottery.py`)
