Skip to content

It is lightweight static web application built to simulate a Gmail inbox. It was designed for a user study to present participants with pairs of real and fake promotional emails, chosen deterministically from a numeric seed in the URL. The app enables consistent, reproducible presentation of email variants for experimental evaluation.

Notifications You must be signed in to change notification settings

riberoc/simple-gmail-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fake Gmail Client

Purpose

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.

Key features

  • Static single-page application (HTML/CSS/JS) with an inbox-like UI.
  • Deterministic selection of real vs fake email variants based on an id numeric seed.
  • Pairing of email templates stored in emails/real and emails/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.

Quick start (run locally)

  1. Extract the repository.
  2. 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
  1. The app requires a numeric id query 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.

How the seed works

  • The id parameter is read by scripts/app.js (function parseParameters).
  • It is padded to 10 digits if shorter.
  • Each digit determines whether the corresponding email slot uses the real or fake version: an even digit selects the real file; an odd digit selects the fake file.
  • The mapping is deterministic, so the same id will always produce the same inbox selection.

Regenerate manifest

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.py

Requirements: Python 3 and that the emails/real and emails/fake folders contain matching filenames (same base name, both .html).

Project structure

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

Development notes

  • The app is a static frontend; there is no backend or authentication.
  • Mobile devices are intentionally blocked via isMobileDevice() in scripts/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.py to update emails/manifest.json.

About

It is lightweight static web application built to simulate a Gmail inbox. It was designed for a user study to present participants with pairs of real and fake promotional emails, chosen deterministically from a numeric seed in the URL. The app enables consistent, reproducible presentation of email variants for experimental evaluation.

Topics

Resources

Stars

Watchers

Forks

Languages