-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Challenge Feature Workflow
- Challenge Creation
Admin (or system) creates challenges.
Each challenge contains:
Picture (thumbnail or clue)
Description (text explaining the task)
Reward points (how much user earns if successful)
Submission type:
text (short answer, proof, link)
media (image/video upload)
Optionally: Campus-based (restricted to college events) or Remote-based (any user).
- Challenge Assignment
User spins the wheel (๐ก fun gamification element).
Wheel randomly selects 3 challenge options.
User chooses one challenge to attempt.
UI: Show 3 cards with challenge picture + description + โAcceptโ button.
- Challenge Attempt & Submission
User accepts one challenge โ redirected to submission form:
If text challenge โ input field.
If media challenge โ file upload (Cloudinary or S3 for storage).
After submit โ result sent to a hidden admin route (not public).
Example: /admin/review-submissions
- Admin Review
Admin panel lists all submissions:
Challenge picture + description
Userโs submission (text/media)
Buttons: โ Approve / โ Reject
On Approve:
User gets reward points added to leaderboard.
On Reject:
No points added.
Optionally notify user (โChallenge not acceptedโ).
- Leaderboard Integration
Challenge points add to the same leaderboard as game points (or a separate one if you want dual leaderboards).
Leaderboard displays Top 3 candidates globally or per event.
Realtime updates via Socket.IO or periodic polling.
๐ ๏ธ Implementation Details
๐ Data Model (example in JSON)
{
"challengeId": "c123",
"title": "Campus Photo Hunt",
"description": "Take a picture of the library entrance.",
"imageUrl": "challenge_thumb.png",
"rewardPoints": 50,
"type": "media",
"scope": "campus"
}
๐ Submission Schema
{
"submissionId": "s789",
"challengeId": "c123",
"userId": "u456",
"submittedAt": "2025-09-12T18:30:00Z",
"answerText": "Hereโs my proof...",
"answerMediaUrl": "uploads/user123/library.jpg",
"status": "pending" // can be pending, approved, rejected
}
๐ Spin the Wheel Logic
Implement a roulette spinner UI (CSS animation).
When it stops, backend randomly selects 3 unique challenges.
Return them to frontend:
{
"options": [
{"challengeId": "c101", "title": "Join coding contest"},
{"challengeId": "c102", "title": "Upload group photo"},
{"challengeId": "c103", "title": "Write a tech blog"}
]
}
๐ Admin Dashboard
/admin/review-submissions
Shows:
Pending submissions table.
Approve/Reject buttons.
Workflow:
On Approve โ update status = approved, add rewardPoints to user score.
On Reject โ status = rejected.
๐ Leaderboard
Table with:
Rank
Username
Total points
Real-time:
Emit leaderboardUpdate event whenever a challenge is approved.
Show Top 3 candidates in a highlighted card UI.
๐ Full Flow Example
User clicks Spin the Wheel โ gets 3 challenge options.
User picks one โ sees challenge details + submission form.
User submits (text/media).
Submission โ stored as pending.
Admin reviews:
โ Approves โ +points โ leaderboard updated.
โ Rejects โ no points.
Leaderboard updates โ top 3 visible to everyone.
โ๏ธ Tech Recommendations
Frontend:
Flutter
Wheel: react-custom-roulette or custom CSS animation
File upload: Cloudinary widget
Backend:
Go
File storage: Cloudinary
DB: Postgres (to track challenges, submissions, leaderboard)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status