https://github.com/adeelibr/card-game
https://github.com/adeelibr/card-game
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/adeelibr/card-game
- Owner: adeelibr
- License: mit
- Created: 2025-11-25T14:03:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-01-01T22:51:33.000Z (7 months ago)
- Last Synced: 2026-01-07T10:06:03.932Z (7 months ago)
- Language: TypeScript
- Homepage: https://mykards.vercel.app
- Size: 163 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# đ Rung Card Game
A real-time multiplayer card game built with Next.js, featuring the classic South Asian card games **Rung** and **Thulla**. Play with friends online in beautifully designed game rooms with live synchronization.
[](https://vercel.com/adeel-imran/v0-rung-card-game)
[](https://v0.app/chat/femLUnFCd1C)
[](LICENSE)
---
## đŽ Features
- **Two Game Modes**
- **Rung**: A 4-player team-based trick-taking card game with trump selection
- **Thulla**: A multi-player elimination game where the last player holding cards loses
- **Real-Time Multiplayer**: Play with friends using live room synchronization powered by PartyKit
- **Room System**: Create private rooms with optional password protection
- **Responsive Design**: Optimized for desktop and mobile devices
- **Beautiful UI**: Modern interface built with Tailwind CSS and Radix UI components
- **Dark/Light Mode**: Toggle between themes for comfortable gameplay
---
## đšī¸ Game Rules
### Rung (4 Players - Team Game)
1. Four players split into two teams (partners sit opposite each other)
2. The trump caller picks the trump suit after seeing their first 5 cards
3. Players must follow the lead suit if possible
4. Win 7+ tricks out of 13 to win the round
5. Win 7 consecutive rounds to earn a "court"
### Thulla (3-6 Players - Individual Game)
1. Each player plays individually
2. The player with the Ace of Spades leads first
3. You must follow suit AND beat the highest card if possible
4. If you cannot follow suit (thulla!), the highest card player picks up all cards
5. First to empty your hand wins - the last player holding cards is the "Thulla" (loser)
---
## đ Getting Started
### Prerequisites
- [Node.js](https://nodejs.org/) (v18 or higher)
- [pnpm](https://pnpm.io/) package manager
### Installation
1. **Clone the repository**
```bash
git clone https://github.com/adeelibr/card-game.git
cd card-game
```
2. **Install dependencies**
```bash
pnpm install
```
3. **Start the development server**
```bash
pnpm dev
```
4. **Open the application**
Navigate to [http://localhost:3000](http://localhost:3000) in your browser.
### Building for Production
```bash
pnpm build
pnpm start
```
---
## đ ī¸ Tech Stack
| Technology | Purpose |
|------------|---------|
| [Next.js 16](https://nextjs.org/) | React framework with App Router |
| [React 19](https://react.dev/) | UI library |
| [TypeScript](https://www.typescriptlang.org/) | Type safety |
| [Tailwind CSS](https://tailwindcss.com/) | Styling |
| [Radix UI](https://www.radix-ui.com/) | Accessible UI components |
| [PartyKit](https://www.partykit.io/) | Real-time multiplayer synchronization |
| [Supabase](https://supabase.com/) | Backend services |
| [Vercel](https://vercel.com/) | Deployment and hosting |
---
## đ Project Structure
```
card-game/
âââ app/ # Next.js App Router pages
â âââ page.tsx # Home page with join/create room
â âââ room/ # Game room pages
âââ components/ # React components
â âââ game-board.tsx # Rung game board
â âââ thulla-game-board.tsx # Thulla game board
â âââ lobby.tsx # Game lobby
â âââ playing-card.tsx # Card component
â âââ ui/ # Shadcn UI components
âââ lib/ # Utility functions and game logic
âââ hooks/ # Custom React hooks
âââ styles/ # Global styles
âââ public/ # Static assets
```
---
## đ¤ Contributing
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and suggest improvements.
---
## đ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
## đ Acknowledgments
- Built with [v0.app](https://v0.app) by Vercel
- UI components from [shadcn/ui](https://ui.shadcn.com/)
- Real-time features powered by [PartyKit](https://www.partykit.io/)
---
## đ Links
- **Live Demo**: [Play Now](https://vercel.com/adeel-imran/v0-rung-card-game)
- **Report Issues**: [GitHub Issues](https://github.com/adeelibr/card-game/issues)
- **Discussions**: [GitHub Discussions](https://github.com/adeelibr/card-game/discussions)