Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ImFardad/Tabani

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tabani

Tabani is a real-time online hidden-information card game built around bluffing, voting, ambushes, and score-driven gold collection.

Players join a room, choose characters, lock vision targets, exchange secret signals, vote to eliminate opponents, and duel for center gold bags. The match continues until one player exceeds the win threshold and becomes the final winner.

Features

  • Real-time multiplayer rooms powered by Socket.IO
  • Secret signal system with wink, whisper, and point actions
  • Vision lock mechanic for observing hidden interactions
  • Voting phase with ambush counter play
  • Duel phase with changeable last-second choices
  • Center gold bags with hidden values
  • Private gold totals for each player
  • End-of-game screen with automatic return to the lobby
  • Ghost spectator mode for eliminated players

Tech Stack

Frontend

  • Vue 3
  • Vite
  • Socket.IO Client
  • lucide-vue-next

Backend

  • Node.js
  • Express
  • Socket.IO
  • CORS
  • nodemon

Project Structure

tabani/
  backend/
    config/
    handlers/
    index.js
    package.json
  frontend/
    src/
      components/
      App.vue
      main.js
      style.css
    package.json
  README.md

Game Overview

Tabani is a social deduction card game with hidden information and round-based decision making.

Core flow:

  1. Vision Focus
  2. Signal Phase
  3. Discussion
  4. Voting
  5. Ambush Resolution
  6. Duel Resolution
  7. Gold payout and round progression

Win Condition

The game ends as soon as a player exceeds 40 gold.

When that happens:

  • the final winner is shown on screen
  • the match enters a game-over state
  • all players return to the same room lobby after 10 seconds
  • players can change characters and start a new match

Gold Rules

  • Each round starts with 4 center gold bags
  • Each bag has a hidden value of 3, 4, or 5 coins
  • If one player remains, that player takes all 4 bags
  • If nobody remains, the center gold stays for the next round
  • If 2 players remain, they enter a duel

Duel Outcomes

  • Thief vs Partner: Thief takes all 4 bags
  • Thief vs Content: Thief takes 3 bags, Content takes 1 bag
  • Partner vs Partner: Each player takes 2 bags
  • Partner vs Content: Partner takes 3 bags, Content takes 1 bag
  • Thief vs Thief: nobody takes anything, and the center gold stays for the next round
  • Content vs Content: each player takes 1 bag, and 2 bags stay for the next round

Local Development

Prerequisites

  • Node.js 18+ recommended
  • npm

Install Dependencies

Install backend dependencies:

cd backend
npm install

Install frontend dependencies:

cd frontend
npm install

Run the Backend

cd backend
npm run dev

The backend runs on:

http://localhost:3000

Run the Frontend

cd frontend
npm run dev

The frontend runs on:

http://localhost:5173

Notes

  • The game state is currently stored in memory on the server.
  • Restarting the backend resets active rooms and match state.
  • The backend is configured to accept the local Vite origin at http://localhost:5173.

Roadmap / To-Do

  • Add persistent storage for rooms, matches, and player history
  • Add a proper scoreboard and match archive
  • Improve mobile UX for smaller screens
  • Add sound and animation polish for important game events
  • Expand the game rules reference inside the app
  • Add automated tests for voting, ambush, and duel resolution

Contributors

Tabani is currently maintained in a single-repo workflow, and contributions are welcome from anyone who wants to help improve the game.

If you contribute, feel free to add your name here in your pull request once the project adopts a formal contributor list.

Contributing

Contributions are welcome. If you want to help improve Tabani:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run the frontend build and backend syntax checks
  5. Open a pull request

Suggested contribution areas

  • UI and UX improvements
  • Game rule validation
  • Multiplayer synchronization
  • Balance tuning
  • Accessibility improvements
  • Documentation and tutorials

Verification

Before opening a pull request, it is a good idea to run:

cd backend
node --check index.js
node --check handlers/gameHandler.js
node --check handlers/roomHandler.js
cd frontend
npm run build

License

No license has been added yet. If you plan to publish or accept outside contributions, consider adding one.

About

A real-time online hidden-information card game built around bluffing, voting, ambushes, and score-driven gold collection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors