How dharmi10/bnb26_visionaries_internal_round works
Fair Drop is a first-come-first-served limited-seat sale API; the README explicitly says it has no queue, lottery, rate limiting, or bot defence. Admins create drops, users obtain simulated phone-based JWTs, then authenticated buyers request seats; operators and the bot lab can inspect drop state, results, attempts, and metrics. The HTTP handlers apply domain rules and use the Redis-backed store, whose Lua script makes the normal buy atomic. Source excerpts establish the main routing and calls; Redis and the operator console are documented capabilities.
Main entry points: server.go HTTP Router · store.go Redis Store · handlers.go Seat Purchase · main.go Server Process
Components 18
Runtime and API
- Server Process
cmd/server/main.go - Runtime Config
internal/config/config.go - HTTP Router
internal/httpapi/server.go - Operator Console
web/index.html
Identity and Access
- JWT Authentication
internal/httpapi/auth.go - Phone Login
internal/httpapi/handlers.go
Drop Sales
- Drop Rules
internal/drop/drop.go - Drop Creation
internal/httpapi/handlers.go - Drop Status
internal/httpapi/handlers.go - Seat Purchase
internal/httpapi/handlers.go - Sale Results
internal/httpapi/handlers.go
Persistence
- Redis Store
internal/store/store.go - Redis
Operations
- Prometheus Metrics
internal/httpapi/metrics.go - Attempt History
internal/httpapi/handlers.go
Other components
- Drop Admin
- Buyer
- Bot Lab
Connections 28
- Server Process → Runtime Config: loads settings
cmd/server/main.go - Server Process → Redis Store: connects and primes
cmd/server/main.go - Server Process → HTTP Router: serves requests
cmd/server/main.go - HTTP Router → Drop Creation: routes creation
internal/httpapi/server.go - HTTP Router → Phone Login: routes login
internal/httpapi/server.go - HTTP Router → Drop Status: routes status
internal/httpapi/server.go - HTTP Router → Seat Purchase: routes purchase
internal/httpapi/server.go - HTTP Router → Sale Results: routes results
internal/httpapi/server.go - HTTP Router → Attempt History: routes attempts
internal/httpapi/server.go - HTTP Router → JWT Authentication: protects purchase
internal/httpapi/server.go - HTTP Router → Prometheus Metrics: instruments requests
internal/httpapi/server.go - HTTP Router → Operator Console: serves embedded assets
internal/httpapi/server.go - Drop Admin → HTTP Router: creates drops
README.md - Buyer → HTTP Router: uses sale API
README.md - Bot Lab → HTTP Router: drives and analyzes
README.md - Phone Login → Redis Store: upserts user
internal/httpapi/handlers.go - Phone Login → JWT Authentication: issues token
internal/httpapi/handlers.go - JWT Authentication → Seat Purchase: provides identity
- Drop Creation → Redis Store: creates drop
internal/httpapi/handlers.go - Drop Status → Redis Store: loads drop and sales
internal/httpapi/handlers.go - Drop Status → Drop Rules: derives state
internal/httpapi/handlers.go - Seat Purchase → Redis Store: allocates seat
internal/httpapi/handlers.go - Seat Purchase → Drop Rules: checks sale window
internal/httpapi/handlers.go - Seat Purchase → Attempt History: records outcome
internal/httpapi/handlers.go - Sale Results → Redis Store: loads buyers
internal/httpapi/handlers.go - Attempt History → Redis Store: loads attempt log
internal/httpapi/handlers.go - Redis Store → Redis: reads and writes
internal/store/store.go - Prometheus Metrics → Bot Lab: exposes metrics
README.md