svelte-solitaire Svelte Themes

Svelte Solitaire

AI-assisted development experiment building classic solitaire games with Svelte 5.

Svelte Solitaire Collection

A collection of classic solitaire card games built with Svelte 5, TypeScript and Vite.

This project primarily serves as an AI-assisted development experiment: it explores structured agent guidance, architectural constraints, and rule-based game implementations.

๐ŸŽฎ Live demo

๐ŸŽฏ Project Goals

  • Experiment with AI agentโ€“driven development workflows
  • Define explicit architectural constraints for automated contributors
  • Keep game rules deterministic and testable
  • Build a playable personal solitaire collection

The games are real.

The architecture is intentional.

๐Ÿงฑ Architectural Constraints

Each game implementation is split into two clearly separated layers:

  1. UI Layer
  • Svelte component
  • Responsible only for rendering and user interaction
  1. Rules Layer
  • Pure TypeScript module
  • No UI dependencies
  • Deterministic state transitions
  • Fully testable in isolation

Rules modules:

  • Do not access DOM
  • Do not mutate external state
  • Expose explicit move validation and state updates

These constraints exist primarily to make AI-generated changes predictable and auditable.

๐ŸŽฎ Games

  • Klondike - Classic draw-and-build solitaire
  • Napoleon's Tomb - Strategic foundation-building variant
  • Aces Up - Fast elimination-style solitaire
  • Clock - Luck based circular placement game

Each game follows the same structural contract between UI and rules engine.

๐Ÿš€ Getting Started

npm install       # Install dependencies
npm run dev       # Development server at http://localhost:5173
npm run build     # Production build
npm run preview   # Preview production build
npm run check     # TypeScript validation
npm run test      # Run tests

๐Ÿ“š Development Documentation

๐Ÿ“ License

MIT License - see LICENSE for details.

Top categories

Loading Svelte Themes