Skip to content

DavidKelemen-hub/Trivia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Trivia Challenge

A polished Windows desktop trivia game built with WPF and .NET 8, powered by the The Trivia Api API.


📸 Screenshots

Menu Quiz
Menu Quiz

✨ Features

  • 10 categories to choose from: Music, Sport & Leisure, Film & TV, Arts & Literature, History, Society & Culture, Science, Geography, Food & Drink, and General Knowledge
  • 3 difficulty levels: Easy, Medium, Hard
  • Instant answer feedback — correct answers highlight green, wrong answers highlight red and reveal the correct one
  • Live score tracking — earn 10 points for every correct answer
  • Seamless question flow — fetches 50 questions upfront, then silently pre-fetches the next batch in the background so you never wait
  • Single-file executable — no installer, no dependencies, just run it

🚀 Getting Started

Download

Grab the latest release from the Releases page and run Trivia.exe — no installation required.

Build from source

Prerequisites

git clone git@github.com:DavidKelemen-hub/Trivia.git
cd trivia
dotnet run

Publish as a single executable

dotnet publish -c Release -r win-x64

The output will be in bin/Release/net8.0-windows/publish/.


🛠️ Tech Stack

Layer Technology
UI Framework WPF (.NET 8)
Architecture MVVM
Dependency Injection Microsoft.Extensions.DependencyInjection
Behaviors Microsoft.Xaml.Behaviors.Wpf
Data Source The Trivia API

🏗️ Project Structure

Trivia/
├── Interfaces/          # Service and ViewModel contracts
├── Models/
│   └── Domain Models/   # Question, quiz data models
├── Services/
│   ├── ApiService       # Fetches questions from Open Trivia DB
│   ├── ProcessingService# Decodes and prepares question data
│   └── Navigation/      # NavigationService (IServiceProvider-based)
├── ViewModels/
│   ├── WelcomeViewModel # Category & difficulty selection (transient)
│   └── MainViewModel    # Active quiz logic & scoring (transient)
├── Views/
│   ├── MainWindow       # Shell window
│   ├── WelcomeView      # Start screen
│   └── MainView         # Quiz screen
└── Resources/
    └── Images/

📡 API

Questions are sourced from the The Trivia API, a free community-maintained trivia API. The app fetches 50 questions per session based on the selected category and difficulty, then pre-fetches the next batch transparently in the background when the last question is reached.


📄 License

This project is licensed under the MIT License. See LICENSE for details.

About

A WPF application which functions as a Trivia game

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages