A lightweight static web application used in a user study (thesis) to present pairs of real and fake promotional emails in a Gmail-like interface. The app selects either a real or a fake version of each email deterministically from a numeric seed supplied via the URL query parameter id.
- Static single-page application (HTML/CSS/JS) with an inbox-like UI.
- Deterministic selection of real vs fake email variants based on an
idnumeric seed. - Pairing of email templates stored in
emails/realandemails/fake. - Manifest file (
emails/manifest.json) lists the email filenames (without extension) used by the app. - Mobile devices are blocked by client-side detection to ensure desktop-only presentation for the study.
- Extract the repository.
- From the project root, run a simple static server (Python 3 recommended):
# from repository root (where index.html is)
python3 -m http.server 8000
# then open in browser:
# http://localhost:8000/index.html?id=12345- The app requires a numeric
idquery parameter. Example:
http://localhost:8000/index.html?id=9876543210
If the id parameter is missing or not numeric the page will display an error and abort.
- The
idparameter is read byscripts/app.js(functionparseParameters). - It is padded to 10 digits if shorter.
- Each digit determines whether the corresponding email slot uses the
realorfakeversion: an even digit selects therealfile; an odd digit selects thefakefile. - The mapping is deterministic, so the same
idwill always produce the same inbox selection.
The script generate_manifest.py (Python) scans emails/real and emails/fake and writes emails/manifest.json containing the list of email base filenames used by the app. Run this if you add/remove email files.
python3 generate_manifest.pyRequirements: Python 3 and that the emails/real and emails/fake folders contain matching filenames (same base name, both .html).
fake-gmail-client/
├─ index.html # main UI
├─ assets/ # logos and images used by the UI
├─ emails/
│ ├─ real/ # real email HTML templates
│ ├─ fake/ # fake email HTML templates
│ └─ manifest.json # list of base filenames used by the app
├─ scripts/
│ └─ app.js # application logic, seed parsing, email selection
├─ styles/
│ └─ styles.css # styling
└─ generate_manifest.py # helper to generate manifest.json
- The app is a static frontend; there is no backend or authentication.
- Mobile devices are intentionally blocked via
isMobileDevice()inscripts/app.js. - Email templates are full HTML files and loaded into an iframe for viewing.
- If you add or rename email files, run
generate_manifest.pyto updateemails/manifest.json.