Online Physics Treasure Hunt for World Science Day 2025
Organized by Indian Network of Physics Students (INPS) for K.E.P.L.E.R - World Science Day 2025.
This is a secure, time-bound online physics treasure hunt system with:
- 94 registered participants (first name login, phone password)
- 10 challenging physics questions
- 60-minute timer with auto-submit
- Anti-cheat mechanisms (tab switching detection, right-click disable, text selection blocking)
- Perfect score reward: Automatic redirect to Google Meet for live event
- Unlimited attempts until perfect score achieved
- Real-time flagging system for suspicious behavior
kepler-treasure-hunt/
├── server.js # Express server with auth & APIs
├── database.js # SQLite database setup
├── init-db.js # Populate DB with 94 participants
├── questions.json # 10 physics questions with answers
├── package.json # Dependencies
├── .env.example # Environment variables template
├── treasure-hunt.db # SQLite database (generated)
└── public/ # Frontend files (TO BE CREATED)
├── index.html # Login page
├── quiz.html # Main quiz interface
├── styles.css # Styling
├── quiz.js # Quiz logic & timer
└── anti-cheat.js # Security measures
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/renilthereal/kepler-treasure-hunt.git
cd kepler-treasure-hunt
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Initialize database with participants
node init-db.js
# Start the server
npm startServer will run on http://localhost:3000
Username: First name only (case-insensitive) Password: 10-digit phone number
Example:
- Username:
abdul(for Abdul Minhaj) - Password:
8076374618
- Login: Participant enters first name + phone number
- Quiz Page: All 10 questions displayed at once
- Timer: 60-minute countdown starts automatically
- Answer: Fill in all 10 answers (alphanumeric supported)
- Submit: System validates answers
- Results:
- ✅ Perfect (10/10): Redirect to Google Meet
- ❌ Partial: Show score, allow retry
- ✅ Right-click disabled
- ✅ Text selection blocked
- ✅ Developer tools shortcuts disabled (F12, Ctrl+Shift+I, etc.)
- ✅ Copy/paste disabled
- ✅ Tab switching detection with flagging
- ✅ Page visibility tracking
- ✅ Automatic flagging on suspicious behavior
- Helmet.js for HTTP security headers
- Rate limiting (100 requests per 15 minutes)
- Session-based authentication
- CSRF protection
- SQL injection prevention
CREATE TABLE users (
id INTEGER PRIMARY KEY,
username TEXT UNIQUE (case-insensitive),
full_name TEXT,
password TEXT (phone number),
phone TEXT,
score INTEGER DEFAULT 0,
attempt_count INTEGER DEFAULT 0,
flag_count INTEGER DEFAULT 0,
perfect_score_achieved INTEGER DEFAULT 0,
completed_at TEXT,
created_at TEXT
);CREATE TABLE attempts (
id INTEGER PRIMARY KEY,
user_id INTEGER,
score INTEGER,
time_spent INTEGER,
answers TEXT (JSON),
created_at TEXT
);Edit .env file:
PORT=3000
NODE_ENV=production
SESSION_SECRET=your-super-secret-key
GOOGLE_MEET_URL=https://meet.google.com/ymy-sows-owk
QUIZ_DURATION_MINUTES=60| Method | Endpoint | Description |
|---|---|---|
| POST | /api/login |
Authenticate user |
| POST | /api/logout |
End session |
| GET | /api/me |
Get current user |
| GET | /api/questions |
Fetch quiz questions |
| POST | /api/submit |
Submit answers for grading |
| POST | /api/flag |
Report anti-cheat violation |
See DEPLOYMENT.md for detailed Cloudflare deployment instructions.
- Set up server with Node.js 18+
- Clone repository and install dependencies
- Configure environment variables
- Initialize database:
node init-db.js - Start with PM2:
pm2 start server.js - Configure Nginx reverse proxy
- Point Cloudflare DNS to your server
- Enable SSL/TLS
- Backend: Node.js, Express.js
- Database: SQLite (better-sqlite3)
- Session: express-session
- Security: Helmet.js, express-rate-limit
- Frontend: Vanilla JavaScript, MathJax (for LaTeX)
- Styling: Custom CSS
94 participants from the online registration are pre-loaded:
- Abdul Minhaj, Ahenjeeta Ghosh, Akhouri Rishabh, Akshansh Walimbe...
- Full list in
init-db.js
For issues or questions:
- Event: K.E.P.L.E.R - World Science Day 2025
- Organizer: INPS (Indian Network of Physics Students)
- Website: https://www.inps.info/events-outreach/wsd
MIT License - Free to use for educational purposes
- INPS Team for organizing K.E.P.L.E.R
- All 94 participants
- International Science Council (ISC)
Built for World Science Day 2025 🌍🔬 Date: November 10, 2025