Back
Screenshot:

Project:2048
Description:
2048 is a full-featured web game built with Vue 3 (Composition API), TypeScript, and Vite 5, packaged as an installable PWA with offline caching and Service Worker update prompts (Workbox). The architecture is layered: a pure game2048.ts engine handles rules and state; composables (useBoardGameLoop, a chip model for DOM animations, keyboard/swipe input) and thin Vue components sit on top. Configuration lives in a preset system (GamePreset) — board size, animation timings, spawn rules, themes, persistence, and component overrides without touching core logic. White-label customization via App.vue slots and provide/inject for presets and tile themes.
Tech stack:
- Vue 3
- Pinia
- vue-i18n
- Web Audio API
- Workbox