Tag: AI

  • From a Single VSCode Example to THON β€” The Hackathon Organizer Node


    How a simple OpenSandbox VSCode example evolved into a full-featured hackathon platform with multi-instance management, local LLM inference, AI gateways, and a web dashboard.

    The OpenSandbox repository ships a straightforward examples/vscode/main.py β€” a single script that spins up one VS Code sandbox instance via the OpenSandbox SDK. It’s clean, it works, and it gets you coding in a browser in seconds. But what happens when you need to run a hackathon for 30, 50, or 100 people? That’s where THON comes in.

    THON β€” The Hackathon Organizer Node β€” takes the core idea behind that example and scales it into a production-ready platform for multi-developer environments. Here’s what changed, what was added, and why.

    The Starting Point: One Instance, One User

    The original VSCode example does one thing well: it creates a single code-server sandbox, connects to it, and gives you a URL. There’s no SSL, no user management, no persistence. It’s a proof of concept β€” and a great one β€” but it wasn’t built for the chaos of a live hackathon.

    What THON Adds

    Multi-Instance, Groups-Based Orchestration

    Instead of one sandbox, THON runs dozens or hundreds concurrently. Users are organized into groups via a thon.yaml config file (or the web dashboard), and each user gets their own isolated VS Code sandbox with a workspace at /workspace/{group}/{username}. A single command β€” thon run β€” launches them all.

    groups:
      alpha:
        users:
          - alice
          - bob
      beta:
        users:
          - dave

    SSL Termination and Reverse Proxy

    The original example runs HTTP directly. THON places an nginx reverse proxy in front of every instance with automatic SSL via mkcert (CA-trusted) or openssl (self-signed fallback). WebSocket support is built in for live editing. Each instance gets its own nginx server block, and the CA root certificate is served at https://{ip}/ca.crt so remote participants can trust the connection.

    Persistent Workspaces

    Hackathon participants can’t lose their work if a container restarts. THON supports three workspace modes:

    ModeStorageLifecycle
    PVC VolumeDocker named volumePersists across instance recreations
    Bind MountHost directoryPersists on host filesystem
    EphemeralInside containerLost on removal

    PVC volumes are created automatically and reattached when sandboxes are recreated β€” participants pick up right where they left off.

    Local LLM Inference with Lemonade Server

    This is where THON goes beyond a simple sandbox manager. Through integration with Lemonade Server, each sandbox gets access to a local, OpenAI-compatible LLM endpoint β€” no API keys to external services, no data leaving the machine. It runs as a systemd service on the host and scales automatically based on user count:

    • Chat model: Default is Gemma 4 31B (Q8_K_XL), configurable to any GGUF checkpoint
    • Embedding model: Enables semantic code search inside Kilo Code
    • Per-user scaling: Context size and parallel slots scale with the number of participants

    The kilo.json configuration is auto-generated and injected into each sandbox, so Kilo Code, Continue, or Cline extensions connect out of the box.

    AI Gateway with Rate Limiting

    For larger events, THON includes an optional APISIX API Gateway that sits between sandbox instances and the Lemonade server. It provides:

    • Per-user API keys β€” each participant gets their own key and rate limit
    • Per-group shared keys β€” teams share capacity, with limits scaled by group size
    • Redis-backed rate limiting β€” consistent enforcement across multiple gateway instances
    • Token-based limits β€” rate limiting on actual LLM token consumption, not just requests

    Two routes are created automatically: /v1/chat/completions for chat and /v1/embeddings for semantic indexing.

    Web Dashboard

    Managing 50 sandbox instances from the command line is impractical. THON includes a Streamlit dashboard with five pages:

    PageFeatures
    InstancesList, filter, create, pause/resume/kill, bulk actions, recreate with PVC volume
    GroupsCRUD groups and users, transfer users between groups, start instances per group
    Lemonade ServerStatus, health, performance stats, slot management, model loading
    AI GatewayConfigure consumers, manage rate limits, setup and cleanup
    SettingsExternal IP, config file management (upload/edit/delete from database)

    A FastAPI REST API with Swagger UI is also available for programmatic access.

    Unified CLI

    The original example was a single script. THON provides a proper CLI:

    thon init                    # Interactive setup wizard
    thon setup                   # Install prerequisites + configure
    thon run                     # Start instances
    thon run --group alpha       # Start one group
    thon config validate         # Check config
    thon cleanup                 # Tear down

    One thon.yaml config file replaces a dozen CLI flags.

    Authentication

    THON supports two independent auth mechanisms:

    • Local password for the Streamlit dashboard (single shared password via AUTH_LOCAL_PASSWORD)
    • OIDC/OAuth2 for the REST API (GitHub, GitLab, LinkedIn via PKCE flow)

    Network Auto-Detection

    The original example didn’t need to think about network modes. THON auto-detects host vs. bridge networking from the server-returned endpoint format β€” no CLI flags required. It handles the nginx proxy_pass configuration correctly for both modes, avoiding common pitfalls like path doubling and Service Worker scope errors.

    The Full Picture

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                         Host Machine                        β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
    β”‚  β”‚                    nginx (443)                      β”‚    β”‚
    β”‚  β”‚         SSL termination + WebSocket proxy           β”‚    β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
    β”‚                         β”‚                                   β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
    β”‚  β”‚                Docker Network                       β”‚    β”‚
    β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚    β”‚
    β”‚  β”‚  β”‚  Sandbox 1  β”‚  β”‚  Sandbox 2  β”‚  β”‚  Sandbox 3  β”‚  β”‚    β”‚
    β”‚  β”‚  β”‚ code-server β”‚  β”‚ code-server β”‚  β”‚ code-server β”‚  β”‚    β”‚
    β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚    β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
    β”‚                                                             β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
    β”‚  β”‚  Lemonade Server     β”‚  β”‚  APISIX AI Gateway (Opt.)    β”‚ β”‚
    β”‚  β”‚  Chat + Embedding    β”‚  β”‚  Rate limiting + API keys    β”‚ β”‚
    β”‚  β”‚  :13305              β”‚  β”‚  :9080                       β”‚ β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    Getting Started

    # One-time setup
    bash ./setup.sh
    
    # Build the sandbox image
    docker build -t waterpistol/thon:latest ./
    
    # Interactive configuration
    thon init
    
    # Install and configure
    thon setup
    
    # Launch
    thon run

    Each participant gets their own VS Code environment at https://<ip>/<endpoint_path>/ with optional LLM-powered coding assistance.

    What’s Next

    THON is actively developed. On the roadmap:

    • Luma invites β€” invite codes for onboarding new users
    • WebSocket real-time updates β€” live instance state changes pushed to the dashboard
    • Instance templates β€” pre-configured sandbox setups with image, extensions, and env vars
    • Usage analytics β€” per-user resource usage and token consumption
    • Multi-server support β€” manage sandboxes across multiple host machines
    • Kubernetes native β€” deploy THON as a Kubernetes resource

    Join the Community

    THON is open source under Apache 2.0. Visit the docs or join the community server for help, updates, and discussion. The source code is available on GitHub.


    Not so sure about the name yet.

  • Blaine Application – Early Alpha Update

    We’re excited to announce that the Blaine application is nearing its early alpha release, originally targeted for Q2 2025. Our team is diligently working to launch the client, which will be open-source and available on GitHub. The client will be accessible via a web interface and a desktop executable, supporting all platforms initially, with a focus on Magic: The Gathering Arena. It will offer single and multiple user licenses.

    Pricing & Crowdfunding

    We’re introducing introductory pricing tiers (inspired by Magic: The Gathering), which we hope users will appreciate. Details are as follows:

    • Wood: $149 (Pre-Alpha, 160 Requests/Day)
    • Bronze: $299 (Beta, 600 Requests/Day)
    • Silver: $499 (1-Year, 600 Requests/Day)
    • Gold: $599 (Lifetime, 600 Requests/Day)
    • Platinum: $2249 (Multi-Game, 600 Requests/Day)
    • Diamond: $2999 (1-Year, Multi-User, 600 Requests/Day)
    • Mythic: $8999 (Lifetime, Multi-Game, Multi-User, 3000 Requests/Day)

    We’re launching a crowdfunding campaign, accepting payments via PayPal, Stripe, Amazon Pay, Google Pay, Bitcoin, Litecoin, Dogecoin, and Monero. The Mythic tier ($8999) offers five years of all services (excluding autonomy) and is our top-tier package.

    Features & Development

    The initial release will include rudimentary Blaine prediction for reliable next-play suggestions in Magic: The Gathering Arena. We’re planning to add autonomy and release the open-source Blaine Server and Blaine Core (data set creation tools) in the future, though no specific timelines are set. Additionally, we’re incorporating unexpected but valuable tooling for gameplay analysis, with potential new features within the next year. Our goal is to release Blaine Prediction models and AutoBlaine for autonomy by year-end, with a working prototype within the next month to boost crowdfunding.

    The client already supports API verification, activation, and deactivation, with subscription access via our (soon-to-be-public) website shop. Blaine-XXS, a 1.5 billion parameter model based on Qwen 2.5, will serve as our introductory prototype.

    Future Plans
    We aim to expand to more games and support, while releasing merchandise for those interested in our progress. If crowdfunding succeeds, we may offer cloud-based services, but the open-source option remains a goalβ€”potentially available if we don’t raise funds or if we raise enough to establish a robust service.Stay tuned for the early alpha release and consider supporting our project. Every contribution helps us bring Blaine to life!

    Last updated: July 08, 2025

  • Blaine Roadmap

    timeline Q2 2025 : Pre-Alpha: XXS Model (0.5B parameters, Mythic-tier access) Q3 2025 : Alpha: Refined XXS Model (Gold-tier+ access) Q4 2025 : Beta: Small, Medium, Large Models (All backers) Q1 2026 : Official Release: Small, Medium, Large Models (Public) Q2 2026 : AutoBlaine Beta (Diamond-tier+ first-look access) Q3 2026 : PLUS Service Launch (First-look for backers) Q4 2026 : Pro Service: Statistical API (Planned, TBD) 2027-2028 : Multi-Game Expansion (First-look for backers)

    We’re building Blaine, an AI-powered prediction agent for Magic: The Gathering (MTGA). Follow our journey as we scale from a lightweight model to a robust platform supporting multiple games. Join our Discord for updates!

    Q2 2025

    Pre-Alpha: XXS Model

    Launch a 0.5B parameter model for early testing. Focus on basic MTGA turn prediction using standardized prompting. Available to Mythic-tier crowdfund backers (pre-alpha access).

    Q3 2025

    Alpha: Refined XXS Model

    Refine the XXS model for better performance. Optimize inference for MTGA gameplay. Available to Gold-tier and above crowdfund backers (alpha access).

    Q4 2025

    Beta: Small, Medium, Large Models

    Introduce Small, Medium, and Large models for MTGA prediction. Test scalability and consistency. Available to all crowdfund backers (beta access starts at Wood tier).

    Q1 2026

    Official Release: Small, Medium, Large Models

    Full release of Small, Medium, and Large models for MTGA turn prediction. Available to the public, with crowdfund tiers offering higher request limits.

    Q2 2026

    AutoBlaine Beta

    Beta test AutoBlaine for automated MTGA gameplay decisions. First-look access for Diamond-tier and above crowdfund backers.

    Q3 2026

    PLUS Service Launch

    Launch PLUS service with analytical prompting for deeper MTGA insights. First-look access for crowdfund backers.

    Q4 2026

    Pro Service: Statistical API (Planned)

    Develop a statistical API using our MTGA game library for advanced analytics. First-look access for crowdfund backers (details TBD).

    2027-2028

    Multi-Game Expansion

    Expand Blaine to support additional games, with Multi-Game licenses included for crowdfund backers. First-look access for crowdfund backers.

    Note: Timelines are estimates and may shift based on development progress. We’re committed to delivering a high-quality product while keeping our backers informed.