🚀 Disappearing Text Writing App
A small Flask web app for writers who get stuck: type into the page, and if you stop for more than 5 seconds, everything you wrote disappears. It is the Day 90 assignment of Udemy's 100 Days of Code: The Complete Python Pro Bootcamp, built to be read, run and compared by other course participants.
📚 Table of Contents
🧭 Overview
The idea comes from "The Most Dangerous Writing App": a countdown runs while you type, and when it reaches zero the text is deleted. This version keeps the rule in plain Python so it can be tested without a browser, and serves it with Flask.
| Folder | What it holds |
|---|---|
src/disappearing_text/ |
The application: domain (the rules), application (use cases and ports), infrastructure (the clock) and presentation (Flask page, routes and script) |
tests/ |
pytest tests, in unit/, integration/ and e2e/ |
docs/ |
The project documents and the wiki pages |
scripts/ |
Helper scripts, for example the opengrep scan |
The timeout of 5 seconds is the constant IDLE_TIMEOUT_SECONDS in src/disappearing_text/constants.py.
📋 Requirements
- Python 3.13 or newer, because the project targets it.
- Flask, the only runtime dependency, because it serves the page.
- pytest, only for the tests (installed with the
devextra). - Optional: Doxygen to build the API documentation from the source comments, and opengrep to scan the code before a push.
🛠️ Setup
Create a local virtual environment named .venv in the project folder, activate it, and upgrade pip.
PowerShell on Windows:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
Bash on Linux or macOS:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
Leave the environment with deactivate. Install only the runtime dependency with python -m pip install -e ..
▶️ Run
python -m disappearing_text
Open http://127.0.0.1:5000 in a browser and start typing. Stop for more than 5 seconds and the text is gone.
🧪 Tests
python -m pytest
Build the API documentation from the Doxygen comments with doxygen Doxyfile (output in docs/doxygen/). Scan the code with opengrep before every push:
.\scripts\opengrep-scan.ps1
🪜 Build steps
The app was built in four steps. The wiki explains what was gained in each step, in English, Danish and Bahasa Malaysia. The screenshots were taken with a headless browser in a Docker container (scripts/capture-screenshots.ps1).
Step 1: Empty editor
The page opens with an empty editor. Layers, constants and the app factory are in place.
Step 2: Typing with countdown
Every change is sent to the server, which keeps the text and restarts the 5 second countdown.
Step 3: Warning in the last seconds
In the last 2 seconds the countdown turns red.
Step 4: Text gone
After more than 5 seconds without typing, all text is deleted.
📄 License
GNU Affero General Public License v3.0, see LICENSE.
🔗 Links
📎 Appendix: Project documents
| Document | What it tells you |
|---|---|
| AGENTS.md | The rules for automated assistants in this repository |
| Business Case | Why the project exists, its scope and success criteria |
| Stakeholder Analysis | Who is involved; the stakeholder IDs used for owners and reviewers |
| Project Plan | The gateways and their schedule |
| Milestones | One document per gateway: Go/No-Go criteria and tasks |
| Artifact registry | Where each artifact type lives, the next version, the PO language and domain |
| Traceability matrix | How the artifacts link and when each was last reviewed |
| Framework README | The framework this project uses |
| Framework changelog | What changed in each framework release |



