FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
malcolmocean
malcolmoceancogs-v-clippies-2
Public
Like
cogs-v-clippies-2
Home
Code
6
backend
3
frontend
4
shared
2
ORIGINAL_PROMPT.md
README.md
H
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
/
Code
/
Search
main.ts
https://malcolmocean--2e3e88628e9611f0bdee0224a6c84d84.web.val.run
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)
HTTP
  • main.ts
    malcolmocean--2e…84.web.val.run
Code
backendfrontendsharedORIGINAL_PROMPT.mdREADME.md
H
main.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.