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.
- 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
- 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
Requirements: Node.js 22.12 or newer and PostgreSQL.
npm install
cp .env.example .env
npm run devFill in .env before starting payment or model-backed features. Never commit that file.
| 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 |
Each player signs one atomic transaction containing:
- The selected SOL stake sent to escrow.
- An idempotent instruction that creates the treasury associated token account when needed.
- 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=VANTASee DEPLOYMENT.md for production and migration details.
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
- Keep wallet private keys, RPC credentials, auth secrets, and model keys server-side.
- Use
.env.exampleonly as a template. - Apply database migrations before deploying application changes.
- Validate all payment signatures on-chain before granting match access.
Start with docs/README.md, then see docs/architecture.md, docs/game-design.md, and docs/development.md.