A full-stack quiz system built with Vue.js and a backend using Redis, MongoDB, and Python. Users can attempt scheduled quizzes, with quiz expiration handled via Redis and monthly email summaries automatically sent.
- ๐ Scheduled Quizzes: Create quizzes that auto-expire at the end of the quiz day (IST).
- ๐งฎ Efficient Storage: Uses Redis sorted sets for upcoming quiz scheduling and question management.
- โ๏ธ Monthly Email Reports: Automatically sends users a summary of their quiz participation and scores every month.
- ๐ Score Tracking: Store and track quiz results per user.
- ๐ง Pinia-based State Management: Manage frontend state with a clean, centralized store using Pinia.
- ๐ฌ Instant Feedback: Show results after quiz submission.
- ๐ Vue 3 + Vue Router: Built with a modern SPA architecture.
- Python (Flask or FastAPI)
- Redis
- Sqlite
- Celery + Redis (for monthly email reports)
- SMTP
- Vue 3
- Vue Router
- Pinia (state management)
- Axios (for API requests)
- Bootstrap Styling
quiz:{quiz_id}:ques_idsโ Set of question IDs for a quiz.upcomming_quiz_idsโ Sorted Set where each quiz ID is scored by its end-of-day timestamp in IST.
from datetime import datetime, time, timedelta
from zoneinfo import ZoneInfo
ist = ZoneInfo("Asia/Kolkata")
end_of_day = datetime.combine(quiz.date_of_quiz, time(23, 59, 59), tzinfo=ist)
redis_client.sadd(f"quiz:{quiz_id}:ques_ids", *question_ids)
redis_client.zadd("upcomming_quiz_ids", {quiz.id: int(end_of_day.timestamp())})