No description
Find a file
Bob Parsons 690f947ef9
All checks were successful
Build and Deploy / build (push) Successful in 39s
Build and Deploy / build-images (push) Successful in 46s
Build and Deploy / deploy (push) Successful in 38s
Add client-side audio debugging
Logs mic track settings and input audio levels to browser console
to diagnose why audio is arriving as silence.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:46:20 -06:00
.gitea/workflows fix build issues 2026-01-14 06:46:41 -05:00
cmd/api init commit 2026-01-12 22:41:33 -06:00
config full switch to new version 2026-01-13 22:12:19 -05:00
internal Add audio level debugging to diagnose whisper issues 2026-01-14 07:31:09 -06:00
migrations init commit 2026-01-12 22:41:33 -06:00
static Add client-side audio debugging 2026-01-14 07:46:20 -06:00
views Add client-side audio debugging 2026-01-14 07:46:20 -06:00
.gitignore remove fiber zip and add proper middleware 2026-01-14 07:01:01 -05:00
CLAUDE.md init commit 2026-01-12 22:41:33 -06:00
DEPLOYMENT.md init commit 2026-01-12 22:41:33 -06:00
dev-docker.sh voice transcribe 2026-01-13 21:53:00 -05:00
dev.sh init commit 2026-01-12 22:41:33 -06:00
docker-compose.dev.yml full switch to new version 2026-01-13 22:12:19 -05:00
docker-compose.yml update docker and traefik for websockets 2026-01-14 07:10:58 -05:00
Dockerfile voice transcribe 2026-01-13 21:53:00 -05:00
Dockerfile.ci update wget 2026-01-13 22:57:05 -05:00
Dockerfile.whisper pin whisper 2026-01-14 06:17:47 -06:00
go.mod voice transcribe 2026-01-13 21:53:00 -05:00
go.sum voice transcribe 2026-01-13 21:53:00 -05:00
README.md init commit 2026-01-12 22:41:33 -06:00

Coko Meeting Bet Tracker

A simple web application for tracking betting on how many times certain terms will be mentioned during the HealthJoy Coko Meeting.

Features

  • User Authentication: Simple username-based login
  • Guess Submission: Each user can submit their guesses once for how many times each term will be mentioned
  • Live Counter: Real-time counting with +/- buttons and SSE updates across all connected clients
  • Debouncing: Smart debouncing that prevents rapid double-clicks from different users but allows same-user repeated clicks
  • Leaderboard: Summary page showing all users' guesses vs actual counts, sorted by total error

Tech Stack

  • Backend: Go 1.25 + Fiber v2
  • Templating: Templ (type-safe HTML templates)
  • Frontend: HTMX + vanilla JavaScript
  • Database: SQLite (CGO-free with modernc.org/sqlite)
  • Real-time: Server-Sent Events (SSE)
  • Deployment: Docker + Traefik

Terms Being Tracked

  • Agent
  • AI
  • Winner
  • Synergy

Development

Prerequisites

  • Go 1.25+
  • Templ CLI: go install github.com/a-h/templ/cmd/templ@latest

Running Locally

# Start development server with live reload
./dev.sh

# Or manually:
templ generate
go run cmd/api/main.go

Access the app at http://localhost:8080

Building

# Generate templ files
templ generate

# Build binary
go build -o coko cmd/api/main.go

# Run
./coko

Deployment

Docker Build

docker build -t coko:latest .

Docker Compose with Traefik

# No environment setup needed - uses sensible defaults!
docker-compose up -d

The application will be available at https://coko.bobparsons.dev (configured via Traefik).

Configuration

All configuration has sensible defaults built-in. No environment variables required!

Defaults:

  • Version: 1.0.0
  • Environment: production
  • Port: 8080
  • Database: ./data/coko.db (or /app/data/coko.db in Docker)
  • CORS: * (allow all)
  • Debounce window: 5 seconds

You can override any setting with environment variables if needed, but it's not necessary for basic deployment.

Debouncing Logic

The debouncing system prevents spam while allowing intentional repeated clicks:

  • If User A clicks +1 on "Agent", then User B clicks +1 on "Agent" within 5 seconds → Only counts once (debounced)
  • If User A clicks +1 on "Agent" twice within 5 seconds → Counts both (same user bypass)

Project Structure

coko/
├── cmd/api/main.go          # Application entry point
├── config/                  # Configuration management
├── internal/
│   ├── app/                 # DI container
│   ├── controllers/         # Business logic
│   ├── handlers/            # HTTP handlers
│   ├── middleware/          # HTTP middleware
│   ├── models/              # Data models
│   ├── repositories/        # Database access
│   ├── server/              # Fiber server setup
│   └── services/            # Business services
├── views/                   # Templ templates
├── static/                  # CSS, JavaScript
├── migrations/              # Database schema
└── docker-compose.yml       # Docker deployment

License

Temporary code for HealthJoy Coko Meeting (3-day lifetime).