A modern, playful icebreaker game built with Astro and React. Tic2Talk puts a unique twist on the classic Tic Tac Toe - each player can only have 3 pieces on the board at a time, with the oldest piece being automatically removed when placing a fourth. Perfect as a fun conversation starter between two people!
- Unique 3-Piece Rule: Each player can only have 3 pieces on the board - oldest piece gets removed automatically
- Visual Indicators: Pulsing animation shows which piece will be removed next
- Smooth Animations: Confetti celebration on wins, smooth piece placement and removal
- Win Sound Effect: Embedded audio plays on victory
- Dark/Light Mode: System-aware theme with manual toggle
- Fully Responsive: Optimized for mobile and desktop
- Beautiful Animations: Fade-in effects, zoom animations, and smooth transitions
- Custom Icons: Animated X and O icons with SVG stroke animations
- Rigged Mode: X can never win - only O (Pink) wins (perfect for pranks!)
- Phone Number Collection: Optionally ask winner for their phone number
- Name Input: Optionally collect winner's name
- No Skip Button: Force phone number entry (no escape route ๐)
- Settings Persistence: All preferences saved in localStorage
- Installable: Full Progressive Web App support for iOS and Android
- Offline Mode: Works completely offline after first visit
- Add to Home Screen: Native install prompts for mobile devices
- Network-First Strategy: Always tries to load fresh content when online
- Service Worker: Smart caching with automatic update detection
- vCard Generation: Creates proper contact cards from collected phone numbers
- iOS Optimized: Direct contact card display on iPhone
- Android Share API: Native sharing on Android devices
- Desktop Download: Falls back to vCard download on desktop
- Local Storage Only: All game data stored locally on device
- Session-Based: Phone numbers only saved for current session
- No External Tracking: No analytics or third-party services
- GDPR Compliant: Full privacy policy included
- Framework: Astro - Static site generation
- UI Library: React 19 - Interactive components
- Styling: Tailwind CSS 4 - Utility-first CSS
- UI Components: Radix UI - Accessible primitives
- Icons: Lucide React - Beautiful icon library
- Animations: canvas-confetti - Celebration effects
- Type Safety: TypeScript - Full type checking
# Clone the repository
git clone https://github.com/yourusername/tic2talk.git
cd tic2talk/astro-build
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewastro-build/
โโโ public/
โ โโโ img/ # All icons and images
โ โโโ manifest.json # PWA manifest
โ โโโ sw.js # Service Worker
โ โโโ browserconfig.xml # Windows tile config
โ โโโ robots.txt # SEO robots file
โ โโโ sitemap.xml # Sitemap for SEO
โโโ src/
โ โโโ components/
โ โ โโโ ui/ # Base UI components (Button, Input, etc.)
โ โ โโโ Game.tsx # Main game component
โ โ โโโ game-board.tsx
โ โ โโโ game-icons.tsx
โ โ โโโ turn-indicator.tsx
โ โ โโโ winner-modal.tsx
โ โ โโโ settings-modal.tsx
โ โ โโโ confirm-exit-modal.tsx
โ โ โโโ theme-toggle.tsx
โ โ โโโ install-prompt.tsx
โ โ โโโ footer.tsx
โ โโโ hooks/
โ โ โโโ use-tic-tac-toe.ts # Game logic hook
โ โโโ lib/
โ โ โโโ utils.ts # Utility functions
โ โโโ pages/
โ โ โโโ index.astro # Landing page
โ โ โโโ datenschutz.astro # Privacy policy
โ โโโ styles/
โ โโโ globals.css # Global styles and animations
โโโ astro.config.mjs # Astro configuration
โโโ tsconfig.json # TypeScript config
โโโ package.json # Dependencies
- Start Game: Click "Start Game" on the landing page
- Take Turns: Players alternate placing X and O on the 3x3 grid
- 3-Piece Limit: When you place your 4th piece, your oldest piece is automatically removed
- Win: Get 3 in a row (horizontal, vertical, or diagonal)
- Collect Contact: Winner can optionally share their phone number
- Rigged Mode: Make X unable to win (great for pranks!)
- Phone Collection: Enable/disable phone number collection after win
- Require Phone: Make phone number mandatory (no skip button)
- Ask for Name: Also collect winner's name along with phone
The app uses a Network-First strategy:
- Always tries to fetch fresh content when online
- Falls back to cache when offline
- Automatic cache updates when new version deployed
To update cache version, modify CACHE_NAME in public/sw.js:
const CACHE_NAME = 'tic2talk-v3'; // Increment version number- Open website in Safari
- Tap Share button
- Scroll down and tap "Add to Home Screen"
- Tap "Add"
- Open website in Chrome
- Tap browser menu (3 dots)
- Tap "Install app" or "Add to Home Screen"
- Confirm installation
The app is a static site and can be deployed to any static hosting service:
- All game data stored locally in browser
- Phone numbers stored in session memory only (cleared on page refresh)
- No external API calls or tracking
- No cookies used
- SSL/TLS encryption recommended for production
Modify color scheme in src/styles/globals.css:
:root {
--primary: oklch(0.6 0.2 250); /* Blue for X */
--secondary: oklch(0.75 0.15 350); /* Pink for O */
}All animations defined in src/styles/globals.css:
drawLine- X icon drawing animationdrawCircle- O icon drawing animationpulseOldest- Oldest piece indicatorconfetti- Win celebration
- Built with Astro
- UI components from Radix UI
- Icons by Lucide
- Confetti by canvas-confetti
Live Demo: t2t.app
Made with โค๏ธ for breaking the ice