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

Skip to content

Fikifor is an exciting real-time multiplayer quiz tournament game where players compete in elimination-style matches. Players vote on pairs of items from curated catalogs, with winners advancing through multiple rounds until a final champion emerges.

Notifications You must be signed in to change notification settings

nazmirket/fikifor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Fikifor ๐ŸŽฎ

Fikifor Logo

A Real-time Multiplayer Quiz Tournament Game

๐ŸŽฎ Live Demo | ๐Ÿ“– Documentation | ๐Ÿš€ Quick Start


๐Ÿ“‹ Table of Contents

๐ŸŽฏ About the Game

Fikifor is an exciting real-time multiplayer quiz tournament game where players compete in elimination-style matches. Players vote on pairs of items from curated catalogs, with winners advancing through multiple rounds until a final champion emerges.

๐ŸŽฎ Try it live at fikifor.mirket.dev

Key Features

  • ๐Ÿ”ฅ Real-time multiplayer gameplay using WebSockets
  • ๐Ÿ† Tournament-style elimination brackets
  • ๐Ÿ“š Customizable quiz catalogs with 32, 64, or 128 items
  • ๐ŸŽจ Rich visual content support with image uploads
  • ๐Ÿ‘ฅ Live participant tracking and voting
  • ๐Ÿ“ฑ Responsive design for all devices
  • ๐Ÿ” User authentication and session management

๐ŸŽฎ Game Mechanics

Tournament Structure

  1. Catalog Creation: Quiz creators build catalogs with 32, 64, or 128 items
  2. Session Setup: Admins create game sessions with unique room codes
  3. Player Joining: Participants join using room codes
  4. Bracket Generation: Items are randomly paired into elimination brackets
  5. Voting Rounds: Players vote on item pairs in real-time
  6. Elimination: Losing items are eliminated, winners advance
  7. Final Winner: The tournament continues until one item remains

Round Progression Example (32 items):

Round 1: 32 items โ†’ 16 pairs โ†’ 16 winners
Round 2: 16 items โ†’ 8 pairs โ†’ 8 winners
Round 3: 8 items โ†’ 4 pairs โ†’ 4 winners
Round 4: 4 items โ†’ 2 pairs โ†’ 2 winners
Round 5: 2 items โ†’ 1 pair โ†’ 1 CHAMPION! ๐Ÿ†

๐Ÿ“ธ Screenshots

Game Session Screenshot 1 Game Session Screenshot 2

๐Ÿ›  Tech Stack

Frontend (Nuxt.js App)

  • Framework: Nuxt 3 (Vue.js)
  • UI Library: Nuxt UI (Tailwind CSS)
  • State Management: Pinia with persistence
  • Real-time: Socket.io-client
  • TypeScript: Full type safety

Backend (Node.js API)

  • Runtime: Node.js with TypeScript
  • Framework: Express.js
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT with bcrypt
  • Real-time: Socket.io
  • File Upload: Multer with Sharp (image processing)
  • Process Management: PM2

Infrastructure

  • Package Manager: pnpm
  • Code Quality: ESLint + Prettier
  • Database Migrations: Prisma Migrate
  • Environment: Docker-ready configuration

๐Ÿ“ Project Structure

fikifor/
โ”œโ”€โ”€ api/                    # Backend API server
โ”‚   โ”œโ”€โ”€ controllers/        # Route controllers
โ”‚   โ”œโ”€โ”€ middleware/         # Express middleware
โ”‚   โ”œโ”€โ”€ prisma/            # Database schema & migrations
โ”‚   โ”œโ”€โ”€ routes/            # API route definitions
โ”‚   โ”œโ”€โ”€ services/          # Business logic layer
โ”‚   โ”œโ”€โ”€ utils/             # Utility functions
โ”‚   โ””โ”€โ”€ ws/                # WebSocket server
โ”œโ”€โ”€ app/                   # Frontend Nuxt.js application
โ”‚   โ”œโ”€โ”€ components/        # Vue components
โ”‚   โ”œโ”€โ”€ composables/       # Vue composables
โ”‚   โ”œโ”€โ”€ layouts/           # Page layouts
โ”‚   โ”œโ”€โ”€ middleware/        # Nuxt middleware
โ”‚   โ”œโ”€โ”€ pages/             # Application pages
โ”‚   โ”œโ”€โ”€ store/             # Pinia stores
โ”‚   โ””โ”€โ”€ types/             # TypeScript definitions
โ””โ”€โ”€ public/                # Static assets

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • pnpm 8+
  • PostgreSQL 14+

1. Clone the Repository

git clone https://github.com/nazmirket/fikifor.git
cd fikifor

2. Install Dependencies

# Install API dependencies
cd api
pnpm install

# Install App dependencies
cd ../app
pnpm install

3. Environment Setup

# Copy environment files
cp api/.env.example api/.env
cp app/.env.example app/.env

Edit the .env files with your configuration:

api/.env:

DATABASE_URL="postgresql://username:password@localhost:5432/fikifor"
JWT_SECRET="your-super-secret-jwt-key"
PORT=3001

4. Database Setup

cd api
# Generate Prisma client
pnpm prisma generate

# Run migrations
pnpm prisma migrate dev

# Seed database (optional)
pnpm prisma db seed

5. Start Development Servers

Terminal 1 - API Server:

cd api
pnpm dev

Terminal 2 - WebSocket Server:

cd api
pnpm dev:ws

Terminal 3 - Frontend App:

cd app
pnpm dev

6. Access the Application

๐Ÿ”ง Development

Available Scripts

API Scripts

pnpm dev          # Start development server
pnpm dev:ws       # Start WebSocket server
pnpm build        # Build for production
pnpm start        # Start production server
pnpm db:build     # Rebuild database schema
pnpm lint         # Run ESLint

App Scripts

pnpm dev          # Start development server
pnpm build        # Build for production
pnpm preview      # Preview production build
pnpm generate     # Generate static site
pnpm lint         # Run ESLint

Database Management

# View data in Prisma Studio
pnpm prisma studio

# Reset database
pnpm prisma migrate reset

# Deploy migrations
pnpm prisma migrate deploy

๐Ÿ“ก API Documentation

Authentication Endpoints

  • POST /api/v1/auth/login - User login
  • POST /api/v1/auth/signup - User registration
  • POST /api/v1/auth/logout - User logout

Quiz Management

  • GET /api/v1/quizes - List user's quizzes
  • POST /api/v1/quizes - Create new quiz
  • PUT /api/v1/quizes/:id - Update quiz
  • DELETE /api/v1/quizes/:id - Delete quiz

Session Management

  • POST /api/v1/sessions - Create game session
  • GET /api/v1/sessions/:code - Join session by code
  • POST /api/v1/sessions/:id/start - Start game session

File Upload

  • POST /api/v1/files/upload - Upload images for quiz items

WebSocket Events

  • join-session - Join a game session
  • vote - Submit vote for current match
  • session-update - Real-time session state updates
  • match-result - Match results broadcast

๐Ÿš€ Production Deployment

Build for Production

# Build API
cd api
pnpm build

# Build App
cd ../app
pnpm build

Start Production Servers

# Start API with PM2
cd api
pnpm start

# Start App
cd ../app
pnpm preview

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ‘จโ€๐Ÿ’ป Author

Nazmi Yilmaz - @nazmirket


Made with โค๏ธ for quiz game enthusiasts

๐ŸŽฎ Play Now | โญ Star on GitHub

About

Fikifor is an exciting real-time multiplayer quiz tournament game where players compete in elimination-style matches. Players vote on pairs of items from curated catalogs, with winners advancing through multiple rounds until a final champion emerges.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published