Skip to content

nurockplayer/tachigo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

293 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tachigo

Chrome sidepanel extension + Web3 rewards platform. Viewers spend Bits to earn on-chain tokens; streamers manage rewards from the dashboard.

Structure

tachigo/
├── backend/      # Go API (Gin + GORM + PostgreSQL)
├── tachimint/    # Chrome sidepanel frontend (React + TypeScript + Vite)
└── dashboard/    # Admin dashboard (React + TypeScript + Vite)

Quick start

Prerequisites: Docker, Docker Compose

git clone <repo>
cd tachigo
docker compose up --build
Service URL
Backend http://localhost:8080
Swagger http://localhost:8080/swagger/index.html
Frontend http://localhost:5173
Postgres localhost:5433

If you want local .env files, copy the examples first. Docker Compose can still start without them because the env files are optional. Fill in the secrets in backend/.env before using OAuth or Twitch Extension features.

On Windows PowerShell, you can generate the local env files with:

./scripts/setup-env.ps1

Development

docker compose up --build     # start all services (foreground — see logs)
docker compose up -d --build  # start in background
docker compose down           # stop all services
docker compose logs -f        # tail all logs

make is still available as a convenience on macOS/Linux, but it is not required.

Backend (backend/)

  • Hot reload via air — save any .go file to rebuild
  • Swagger docs regenerated automatically on each build (swag init)
  • Tests use SQLite in-memory — no Postgres required
docker compose run --no-deps --rm app go test ./...

Frontend (tachimint/)

  • Hot reload via Vite HMR
  • current migration direction is Chrome sidepanel runtime
  • Twitch identity / extension auth related flows are still retained during the migration stage
docker compose run --no-deps --rm frontend npm run build   # production build

Environment variables

Copy the examples and fill in your secrets:

cp backend/.env.example backend/.env
cp tachimint/.env.example tachimint/.env
cp dashboard/.env.example dashboard/.env

Windows PowerShell:

./scripts/setup-env.ps1

Key backend variables:

Variable Description
TWITCH_CLIENT_ID From dev.twitch.tv/console
TWITCH_CLIENT_SECRET From dev.twitch.tv/console
TWITCH_EXTENSION_SECRET Extension secret (base64)
GOOGLE_CLIENT_ID From Google Cloud Console
GOOGLE_CLIENT_SECRET From Google Cloud Console
JWT_ACCESS_SECRET Random string ≥ 32 chars
JWT_REFRESH_SECRET Random string ≥ 32 chars
TACHI_CONTRACT_ADDRESS Sepolia TachiToken contract address
SEPOLIA_SIGNER_KEY Backend signer key for TACHI mint/burn

Architecture

See docs/architecture.md for the full system diagram. For the current frontend migration decision, see docs/tachimint-chrome-sidepanel-migration.md.

Documentation

CI

GitHub Actions 目前分兩段:

  • PR Scope Police 先檢查 PR 邊界;超大包或跨 scope PR 會先被擋下
  • CI 會直接出現在 PR 上,但會先經過輕量 Scope gate;只有 scope 合格才會跑 backend / frontend / dashboard 的重型 job

在受保護分支上的 CI:

  • Backend testsgo test ./... inside the dev Docker image
  • Frontend buildnpm run build inside the frontend Docker image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors