Skip to content

A lightweight, offline-first collection of classic board and card games built for desktop

License

Notifications You must be signed in to change notification settings

azuvicenna/liteboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎲 LiteBoard

A lightweight, offline-first collection of classic board and card games built for desktop.

Tauri Vue.js Pinia Tailwind CSS TypeScript

πŸ“– About The Project

LiteBoard is a desktop application that bundles various classic strategy and card games into a single, resource-efficient executable.

Built using Tauri and Vue 3, this application is designed to be significantly lighter than traditional Electron-based apps. It focuses on logic, strategy, and casual play without any gambling mechanics. The goal is to preserve the heritage of traditional games like Shogi, Mahjong, and Gaple in a modern, ad-free, and offline environment.

✨ Key Features

  • ⚑ Ultra Lightweight: Powered by Tauri (Rust), consuming minimal RAM compared to typical web-based desktop apps.
  • πŸ”Œ 100% Offline: No internet connection required. Logic and assets are bundled locally.
  • πŸ’Ύ Local Persistence: Uses the native file system to save game progress and high scores securely.
  • 🧩 State Management: Complex game rules handled efficiently using Pinia stores.
  • πŸ‘₯ Hotseat Multiplayer: Play with friends on a single device with "Pass-and-Play" mode (complete with privacy screens for card games).

πŸ—ΊοΈ Development Roadmap

The games are categorized by technical complexity, ranging from basic logic implementation to advanced AI and physics engines.

🟒 Phase 1: Foundation (Basic Logic & Arrays)

Focus: Establishing Project Structure, Pinia Stores, and Simple Validations.

  • Blackjack: Simple math logic (sum check > 21) without complex board movement.
  • Mancala (Congklak): Deterministic array manipulation with circular logic.
  • Gaple (Dominoes): Straightforward pattern matching (node A matches node B).

πŸ”΅ Phase 2: Grid Logic & Intermediate Rules

Focus: 2D Arrays, Recursion, and Basic "Minimax" concepts.

  • Snakes & Ladders: 1D to 2D grid mapping (zigzag path), state jumping logic, and simple RNG dice mechanics.
  • Minesweeper: Implementation of Flood Fill algorithms (Recursion) and grid state management.
  • Othello (Reversi): Grid traversal logic (vertical/horizontal/diagonal checks) and tile flipping.
  • Checkers (Dama): Diagonal movement restrictions and "forced capture" logic.
  • Ludo: Path-based movement logic, collision handling (sending opponent home), and turn-based dice mechanics.

🟑 Phase 3: Advanced State & UI Interactions

Focus: Complex Drag-and-Drop, Turn Management, and Trick-Taking Logic.

  • Solitaire: Complex CSS for Drag-and-Drop and strict stack validation rules.
  • Uno: Dynamic turn management (Reverse, Skip) and special action handling.
  • Hearts / Spades: Trick-taking mechanics requiring basic bot intelligence for card selection.

🟠 Phase 4: Algorithm Heavy

Focus: Generators, Hand Evaluators, and Complex Scoring.

  • Sudoku: Requires Backtracking algorithms for valid puzzle generation and unique solution verification.
  • Capsa Susun / Poker (Texas Hold'em): Complex hand evaluation algorithms (detecting Royal Flush, Straights, etc.).
  • Remi (Rummy): Set collection and run validation logic.
  • Hanafuda (Koi-Koi): Highly specific scoring system (Yaku) and pattern combinations.

πŸ”΄ Phase 5: Grand Strategy (The Bosses)

Focus: Deep AI (Minimax/Alpha-Beta Pruning) and Massive Rule Sets.

  • Chess: Complex movement rules (Castling, En Passant) and AI integration.
  • Shogi (Japanese Chess): Includes "Drop" mechanics (reusing captured pieces), increasing AI complexity.
  • Go (Weiqi): Territory calculation algorithms and "Life and Death" group status.
  • Mahjong: Extremely complex rule sets (Riichi, Pon, Chi, Kan, Furiten) and edge-case handling.

🟣 Experimental: Physics Based

Focus: Canvas API & Physics Engines (Matter.js/Box2D). Note: These require stepping outside standard Vue DOM manipulation.

  • Carrom (Karambol)
  • Billiards

πŸ› οΈ Tech Stack

  • Core: Tauri (Rust + Webview)
  • Frontend: Vue.js 3 (Composition API)
  • Styling: Tailwind CSS (Utility-first framework)
  • State Management: Pinia
  • Language: TypeScript (Strict typing for game logic)
  • Storage: Native File System API via Tauri

πŸ“‚ Project Structure

src/
β”œβ”€β”€ assets/                  # 🎨 Aset Global (Logo, Font, Global CSS)
β”‚   β”œβ”€β”€ audio/               # (sfx-click.mp3, bgm-lobby.mp3)
β”‚   └── images/              # (background-wood.jpg, logo.png)
β”‚
β”œβ”€β”€ common/                  # πŸ› οΈ Shared Code (Bisa dipake semua game)
β”‚   β”œβ”€β”€ components/          # "LEGO"-nya UI (Atomic Components)
β”‚   β”‚   β”œβ”€β”€ BaseButton.vue   # Tombol style Tailwind standar
β”‚   β”‚   β”œβ”€β”€ BaseCard.vue     # Kotak kartu kosong (frame)
β”‚   β”‚   β”œβ”€β”€ ModalDialog.vue  # Pop-up (Pause/Game Over)
β”‚   β”‚   └── GameLayout.vue   # Layout dasar (ada tombol back, score)
β”‚   β”‚
β”‚   └── utils/               # Fungsi bantu (Helper)
β”‚       β”œβ”€β”€ tauriStorage.ts  # Wrapper save/load file ke laptop
β”‚       β”œβ”€β”€ soundManager.ts  # Logic play audio
β”‚       └── randomizer.ts    # Logic ngocok dadu/kartu
β”‚
β”œβ”€β”€ games/                   # πŸ“¦ MODUL GAME (Rumah masing-masing game)
β”‚   β”‚                        # Kalo mau hapus game, hapus 1 folder ini aja.
β”‚   β”œβ”€β”€ blackjack/           
β”‚   β”‚   β”œβ”€β”€ components/      # UI khusus Blackjack (ChipButton, DealerHand)
β”‚   β”‚   β”œβ”€β”€ logic/           # 🧠 OTAKNYA (Pure TypeScript, No Vue!)
β”‚   β”‚   β”‚   β”œβ”€β”€ deck.ts      # Logic bikin 52 kartu
β”‚   β”‚   β”‚   β”œβ”€β”€ scoring.ts   # Logic hitung nilai (As = 1/11)
β”‚   β”‚   β”‚   └── types.ts     # TypeScript Interfaces
β”‚   β”‚   β”œβ”€β”€ store.ts         # πŸͺ PINIA (Jembatan Logic ke UI)
β”‚   β”‚   └── BlackjackView.vue # Tampilan utama game
β”‚   β”‚
β”‚   β”œβ”€β”€ gaple/
β”‚   β”‚   β”œβ”€β”€ components/      # UI khusus Gaple (DominoTile)
β”‚   β”‚   β”œβ”€β”€ logic/           # Pure TS (Rules, Valid Move)
β”‚   β”‚   β”œβ”€β”€ store.ts         # Pinia Gaple
β”‚   β”‚   └── GapleView.vue    # Tampilan utama game
β”‚   β”‚
β”‚   └── ... (game lainnya)
β”‚
β”œβ”€β”€ router/                  # 🚦 Pengatur Lalu Lintas URL
β”‚   └── index.ts             # (Home -> /game/gaple, dll)
β”‚
β”œβ”€β”€ stores/                  # 🌍 Global Store (Bukan game logic)
β”‚   └── appStore.ts          # Simpan settingan (Volume, Nama User, Theme)
β”‚
β”œβ”€β”€ views/                   # 🏠 Halaman Umum
β”‚   β”œβ”€β”€ HomeView.vue         # Menu Utama (Daftar Game)
β”‚   └── SettingsView.vue     # Halaman Pengaturan
β”‚
β”œβ”€β”€ App.vue                  # Root
└── main.ts                  # Entry Point

πŸš€ Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js & npm/pnpm
  • Rust & Cargo (for Tauri)

Installation

  1. Clone the repo:
    git clone [https://github.com/username/liteboard.git](https://github.com/username/liteboard.git)
  2. Install dependencies:
    npm install
  3. Run in development mode:
    npm run tauri dev
  4. Build for production:
    npm run tauri build

🀝 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions to add new games or improve the AI are greatly appreciated.

πŸ“ License

Distributed under the MIT License. See LICENSE for more information.

About

A lightweight, offline-first collection of classic board and card games built for desktop

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages