A lightweight, real-time quiz application for classrooms and events. Host interactive quizzes with live results, scoring, and pass/fail feedback - no accounts required for participants.
- Real-time synchronization - Questions, timers, and results sync instantly via WebSockets
- Markdown-based quizzes - Write questions in simple Markdown format
- Scoring system - Set total points, track progress, and show pass/fail results
- Speed-based ranking - Ties are broken by response time (faster players rank higher)
- Live response charts - Players and presenters see answer distribution after each question
- Analytics dashboard - Track question difficulty, participant performance, and export data as CSV
- Presenter mode - Beautiful full-screen view optimized for projection/screen sharing
- Premium design - Gradient backgrounds, circular timers, and smooth animations
- Mobile-optimized - Smart mobile UI hides redundant info when watching shared screen
- Multi-session support - Run multiple concurrent quiz sessions with unique codes
- PostgreSQL persistence - Session history and analytics survive server restarts
- Zero setup for participants - Students just enter their name and play
- Self-hosted - Deploy on Render with Supabase (free tiers available)
If needed to have a presenter view, there is one that you can share in class or remote setting
Each player will have their own view
A final score will be presented for each user
Loading Questions using a Markdown Template
View progress, control flow (start, end early ..etc), and finally when done you can view summary
- Backend: Node.js, Express, Socket.IO
- Database: PostgreSQL (Supabase)
- Frontend: Vanilla HTML/CSS/JavaScript
- Charts: Chart.js
- Deployment: Render.com + Supabase (free tiers compatible)
- Node.js 18+
- PostgreSQL database (we recommend Supabase free tier)
git clone https://github.com/yourusername/markdown-mash.git
cd markdown-mash
npm installCreate a .env file:
DATABASE_URL=postgresql://user:password@host:port/database
ADMIN_PASSWORD=your_secure_passwordGet your DATABASE_URL from Supabase:
- Create a free account at supabase.com
- Create a new project
- Go to Project Settings β Database
- Copy the "Connection pooling" URI (uses port 6543, recommended for serverless)
- Replace
[YOUR-PASSWORD]with your actual database password
π‘ Alternative PostgreSQL Providers:
- Neon: neon.tech - Serverless Postgres with generous free tier
- Railway: railway.app - Simple deployment with built-in Postgres
- ElephantSQL: elephantsql.com - Managed PostgreSQL
- Self-hosted: Any PostgreSQL 12+ instance
npm startOpen http://localhost:3000 in your browser.
- Admin Dashboard:
http://localhost:3000/admin.html - Participant Join:
http://localhost:3000/play.html - Presenter View:
http://localhost:3000/present.html
Default admin password: admin123 (change via .env)
Create quizzes in Markdown format:
# My Quiz Title
# Score 100
## Q1: What is the capital of France?
- [ ] London
- [x] Paris
- [ ] Berlin
- [ ] Madrid
::time=20
## Q2: Which language runs in web browsers?
- [ ] Java
- [ ] Python
- [x] JavaScript
- [ ] C++
::time=15
## Q3: Is the Earth flat?
- [ ] True
- [x] False
::time=10| Element | Syntax | Description |
|---|---|---|
| Quiz title | # Title |
Single # at the start |
| Total score | # Score 100 |
Points distributed across questions (default: 100) |
| Question | ## Q1: Text |
The Q1: prefix is optional |
| Wrong answer | - [ ] Option |
Unchecked checkbox |
| Correct answer | - [x] Option |
Checked checkbox |
| Time limit | ::time=20 |
Seconds per question (default: 20) |
- Set total points with
# Score X(e.g.,# Score 1000) - Points are divided equally among questions
- Participants see their score after each question
- At the end: Pass (70%+) or motivating message to study more
-
Load the quiz
- Go to Admin Dashboard
- Paste your Markdown quiz
- Click "Load Quiz"
-
Share the link
- Give participants the
/play.htmlURL - They enter their name to join
- Give participants the
-
Screen sharing (optional)
- Open
/present.htmlin a new window - Share this window with participants for a beautiful full-screen display
- Participants can still use their own devices to answer
- Open
-
Run the quiz
- Click "Start Quiz"
- Click "Next Question" to advance
- Use "End Question Early" if everyone answered
- Participants and presenter view show results after each question
-
Final results
- Click "Show Final Results" after the last question
- Displays ranked leaderboard in admin view
- Participants see their individual scores and pass/fail status
This app requires a PostgreSQL database. Choose one of these options:
- Create account at supabase.com
- Create new project (choose region closest to your users)
- Go to Project Settings β Database β Connection pooling
- Copy the connection string (port 6543)
- Note your database password
Free tier includes: 500MB database, 2GB bandwidth, unlimited API requests
- Create account at neon.tech
- Create new project
- Copy the connection string from dashboard
Free tier includes: 512MB storage, auto-suspend after inactivity
- Create account at railway.app
- Create new Postgres database
- Copy the connection URL
Free tier includes: $5/month credit
Any PostgreSQL 12+ instance will work. You'll need:
- Host, port, database name
- Username and password
- Format:
postgresql://username:password@host:port/database
Prerequisites:
- GitHub account with this repository forked/cloned
- PostgreSQL database from one of the options above
Steps:
-
Push your code to GitHub (if you haven't already)
-
Go to Render Dashboard
- Visit dashboard.render.com
- Click New β Web Service
-
Connect Repository
- Connect your GitHub account
- Select your MarkdownMash repository
-
Configure Service
- Name:
markdownmash(or your choice) - Region: Choose closest to your users
- Branch:
main - Build Command:
npm install - Start Command:
npm start - Plan: Free (or upgrade for better performance)
- Name:
-
Add Environment Variables
Click Advanced β Add Environment Variable:
Variable 1: DATABASE_URL
- Key:
DATABASE_URL - Value: Your PostgreSQL connection string from database setup
β οΈ CRITICAL - Password Encoding: If your database password contains special characters (!,@,#,$,%,&, etc.), you MUST URL-encode them:!β%21@β%40#β%23$β%24%β%25&β%26
Example: Password
MyPass!@#becomesMyPass%21%40%23Tool: Use urlencoder.org to encode your password
Variable 2: ADMIN_PASSWORD (Optional)
- Key:
ADMIN_PASSWORD - Value: Your custom admin password (default is
admin123)
- Key:
-
Deploy
- Click Create Web Service
- Wait for build to complete (~2-3 minutes)
-
Verify Deployment
Check the deployment logs for:
β Connected to PostgreSQL database β Database tables initialized β Markdown Mash server runningVisit your app at the provided URL (e.g.,
https://yourapp.onrender.com)
Railway can host both your app and database:
- Connect GitHub repository
- Add PostgreSQL service
- Deploy automatically links DATABASE_URL
- Install Heroku Postgres add-on
- Set
ADMIN_PASSWORDconfig var - Deploy from GitHub
# Clone repository
git clone https://github.com/yourusername/MarkdownMash
cd MarkdownMash
# Install dependencies
npm install
# Create .env file
cat > .env << EOF
DATABASE_URL=postgresql://user:password@localhost:5432/markdownmash
ADMIN_PASSWORD=your_secure_password
PORT=3000
EOF
# Run with PM2 (process manager)
npm install -g pm2
pm2 start server.js --name markdownmash
pm2 saveRender Free Tier:
- Spins down after 15 minutes of inactivity
- First request after sleep takes ~30 seconds to wake up
- Perfect for classroom use, demos, and low-traffic deployments
Database Persistence:
- All quiz sessions, participants, and analytics are stored in PostgreSQL
- Data survives server restarts and redeployments
- You can view/export data through your database provider's dashboard
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL |
Yes | - | PostgreSQL connection string (Supabase pooler) |
ADMIN_PASSWORD |
No | admin123 |
Admin login password |
PORT |
No | 3000 |
Server port (Render sets this automatically) |
# Run with auto-reload
npm run dev
# Simulate participants for testing
npm run simulate # 3 participants
npm run simulate 10 # 10 participantsView detailed insights from completed quiz sessions:
- Platform Overview: Total sessions, participants, average scores
- Question Difficulty: Automatic difficulty ratings (easy/medium/hard)
- Answer Distribution: See which options players chose
- Response Times: Track how quickly participants answered
- Performance Rankings: Leaderboard with scores and speed
- CSV Export: Download session data for Excel/spreadsheet analysis
Access via Admin Dashboard β Session History β View Analytics
markdown-mash/
βββ server.js # Express + Socket.IO server
βββ db.js # PostgreSQL database module
βββ package.json # Dependencies and scripts
βββ .env.example # Environment variables template
βββ render.yaml # Render.com deployment config
βββ sample-quiz.md # Example quiz
βββ test-simulation.js # Participant simulator for testing
βββ public/
βββ index.html # Landing page
βββ admin.html # Host dashboard with analytics
βββ play.html # Participant view (mobile-optimized)
βββ present.html # Presenter view (for screen sharing)
βββ css/
β βββ style.css # All styles
βββ js/
βββ admin.js # Admin client logic
βββ play.js # Participant client logic
βββ present.js # Presenter client logic
The app automatically creates these PostgreSQL tables:
- sessions: Quiz sessions with unique 6-character codes
- participants: Players who joined sessions (with scores)
- answers: Individual answer records (for analytics and response time tracking)
All data includes proper foreign keys and indexes for performance.
- No persistent user accounts (participants join per-session)
- No image/media support in questions (text only)
- Active session state is in-memory (historical data persists in database)
MIT









