A powerful, scalable Quiz & Poll backend API built with ASP.NET 9, leveraging CQRS, SignalR, Redis, PostgreSQL, and Docker. This project supports anonymous and authenticated voting, real-time updates, analytics, and response exports.
- Create quizzes with multiple question types (single/multiple choice, rating, text, image-based)
- Public or private quizzes (via code)
- Real-time results & participation updates using SignalR
- Anonymous & authenticated voting
- IP-based duplicate prevention & rate limiting
- Export results in CSV or JSON
- Real-time voting stats
- Per-question statistics
- Demographics support (future-ready)
- Response heatmaps (future-ready)
- .NET 9 Web API
- PostgreSQL – main database
- Redis – for caching, rate-limiting, and SignalR pub/sub
- SignalR – real-time updates
- Docker + Docker Compose – containerization
- Serilog – structured logging
- MediatR – CQRS implementation
- CSV Exporting – via built-in service
- Command & Query handlers for write/read separation
- Better scaling and testing support
- Reusable interfaces for
ICommand,IQuery, andIEventPublisher - Promotes loosely coupled design
ConnectionString: Host=localhost;Port=5432;Database=quizdb;Username=postgres;Password=password
Redis:ConnectionString=localhost:6379
docker-compose up --buildApp available at: http://localhost:5000
Swagger UI: http://localhost:5000/swagger
- Output to console with timestamps, log levels, structured messages
- Extendable to file, Seq, or ElasticSearch
- Export quiz results with headers, answers, timestamps
- Formats:
CSV,JSON
Made by Saba Burduli