- About the Game
- Game Mechanics
- Screenshots
- Tech Stack
- Project Structure
- Quick Start
- Development
- API Documentation
- Contributing
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
- 🔥 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
- Catalog Creation: Quiz creators build catalogs with 32, 64, or 128 items
- Session Setup: Admins create game sessions with unique room codes
- Player Joining: Participants join using room codes
- Bracket Generation: Items are randomly paired into elimination brackets
- Voting Rounds: Players vote on item pairs in real-time
- Elimination: Losing items are eliminated, winners advance
- Final Winner: The tournament continues until one item remains
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! 🏆
- 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
- 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
- Package Manager: pnpm
- Code Quality: ESLint + Prettier
- Database Migrations: Prisma Migrate
- Environment: Docker-ready configuration
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
- Node.js 18+
- pnpm 8+
- PostgreSQL 14+
git clone https://github.com/nazmirket/fikifor.git
cd fikifor
# Install API dependencies
cd api
pnpm install
# Install App dependencies
cd ../app
pnpm install
# 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
cd api
# Generate Prisma client
pnpm prisma generate
# Run migrations
pnpm prisma migrate dev
# Seed database (optional)
pnpm prisma db seed
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
- Frontend: http://localhost:3000
- API: http://localhost:3001
- WebSocket: http://localhost:3002
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
pnpm dev # Start development server
pnpm build # Build for production
pnpm preview # Preview production build
pnpm generate # Generate static site
pnpm lint # Run ESLint
# View data in Prisma Studio
pnpm prisma studio
# Reset database
pnpm prisma migrate reset
# Deploy migrations
pnpm prisma migrate deploy
POST /api/v1/auth/login
- User loginPOST /api/v1/auth/signup
- User registrationPOST /api/v1/auth/logout
- User logout
GET /api/v1/quizes
- List user's quizzesPOST /api/v1/quizes
- Create new quizPUT /api/v1/quizes/:id
- Update quizDELETE /api/v1/quizes/:id
- Delete quiz
POST /api/v1/sessions
- Create game sessionGET /api/v1/sessions/:code
- Join session by codePOST /api/v1/sessions/:id/start
- Start game session
POST /api/v1/files/upload
- Upload images for quiz items
join-session
- Join a game sessionvote
- Submit vote for current matchsession-update
- Real-time session state updatesmatch-result
- Match results broadcast
# Build API
cd api
pnpm build
# Build App
cd ../app
pnpm build
# Start API with PM2
cd api
pnpm start
# Start App
cd ../app
pnpm preview
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Nazmi Yilmaz - @nazmirket