Skip to content

lucasfishh/vanta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,195 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VANTA

VANTA is a self-hosted tactical game where player-configured LLM agents fight autonomous, turn-based battles. Players choose a model, build a five-unit squad, write each unit's instructions, and watch the strategy execute under fog of war.

Features

  • Autonomous LLM-controlled squads with class-specific abilities
  • Procedural maps, fog of war, replays, and spectator views
  • Custom prompts, model selection, reusable loadouts, and agent memory
  • Casual matchmaking, private lobbies, social profiles, chat, and leaderboards
  • Solana wallet authentication and on-chain moneymatches
  • Atomic moneymatch entry payments combining a SOL stake with an SPL-token treasury fee
  • Fully self-hosted SvelteKit, PostgreSQL, Docker, and Caddy deployment

Stack

  • SvelteKit 5, Svelte 5, TypeScript, Vite, and Tailwind CSS
  • PostgreSQL with a server-side compatibility and query layer
  • OpenRouter for model inference
  • Solana Web3 and SPL Token for wallet payments
  • Vitest and Playwright for testing
  • Docker Compose and Caddy for production

Quick start

Requirements: Node.js 22.12 or newer and PostgreSQL.

npm install
cp .env.example .env
npm run dev

Fill in .env before starting payment or model-backed features. Never commit that file.

Commands

Command Purpose
npm run dev Start the development server
npm run build Create a production build
npm run preview Preview the production build
npm run check Run Svelte and TypeScript checks
npm run test:unit Run Vitest tests
npm run test:e2e Run Playwright tests
npm test Run all tests

Moneymatch payments

Each player signs one atomic transaction containing:

  1. The selected SOL stake sent to escrow.
  2. An idempotent instruction that creates the treasury associated token account when needed.
  3. The configured SPL-token entry fee sent from the player's associated token account to treasury.

The server verifies both balance changes, the configured mint and token program, the canonical token accounts, transaction finalization, and signature replay protection before marking a player funded.

Required configuration:

GAME_TOKEN_MINT_ADDRESS=
TOKEN_TREASURY_WALLET_ADDRESS=
GAME_TOKEN_ENTRY_AMOUNT=10000
GAME_TOKEN_SYMBOL=VANTA

See DEPLOYMENT.md for production and migration details.

Project structure

src/lib/game/          client state, rendering, and animation
src/lib/server/        authentication, game engine, payments, and persistence
src/lib/components/    reusable game and interface components
src/routes/            pages and API endpoints
db/init/               fresh PostgreSQL schema
supabase/migrations/   incremental database migrations
docs/                  architecture and gameplay references
docs-site/             standalone documentation website

Security

  • Keep wallet private keys, RPC credentials, auth secrets, and model keys server-side.
  • Use .env.example only as a template.
  • Apply database migrations before deploying application changes.
  • Validate all payment signatures on-chain before granting match access.

Documentation

Start with docs/README.md, then see docs/architecture.md, docs/game-design.md, and docs/development.md.

About

Autonomous LLM squads compete in a tactical strategy game with on-chain Solana stakes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors