• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • Weโ€™re hiring!
Log inSign up
malcolmocean

malcolmocean

cogs-v-clippies-2

Public
Like
cogs-v-clippies-2
Home
Code
5
backend
3
frontend
4
shared
2
README.md
main.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ€“ all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
9/10/2025
Viewing readonly version of main branch: v15
View latest version
README.md

LLM Board Game Server

A game-agnostic server for physical board games where LLM-controlled pieces make moves based on photos of the game board.

Architecture

Backend (/backend/)

  • index.ts: Main Hono server with all routes
  • database/: SQLite database management
    • migrations.ts: Database schema setup
    • queries.ts: Database query functions
  • llm/: LLM integration
    • openai.ts: OpenAI API calls for piece moves

Frontend (/frontend/)

  • index.html: Main HTML template
  • components/: React components
    • App.tsx: Main app component
    • HomePage.tsx: Game creation/joining
    • ManagePage.tsx: Game management interface
    • PlayPage.tsx: Player interface with SSE updates
  • style.css: Styling

Shared (/shared/)

  • types.ts: TypeScript interfaces
  • utils.ts: Shared utility functions

Key Features

  1. Game Management: Create games with unique 5-letter IDs
  2. Piece Configuration: Define piece types with descriptions
  3. Player Instructions: Persistent instructions for each piece
  4. Parallel LLM Processing: All pieces move simultaneously
  5. Real-time Updates: Server-sent events for live move updates
  6. Photo-based Turns: Multimodal LLM analysis of board state

Workflow

  1. Game manager creates game โ†’ gets management URL
  2. Players join with usernames โ†’ get play URLs
  3. Players configure pieces and instructions
  4. Any player takes photo โ†’ triggers parallel LLM moves
  5. Results stream back in real-time via SSE

Database Schema

  • games: Game metadata and rules
  • pieces: Piece types and descriptions
  • players: Player usernames per game
  • player_pieces: Player-owned pieces with instructions
  • moves: Historical move data (optional context)
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
Weโ€™re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
ยฉ 2025 Val Town, Inc.