Tirsvad 0d23802644
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Skipped
TirSystem/git-workflows: Release / release (push) Skipped
TirSystem/git-workflows: Sync GitHub mirror metadata / sync-metadata (push) Successful in 7s
TirSystem/git-workflows: Publish accepted milestones / publish (push) Successful in 23s
TirSystem/git-workflows: Validate / validate (push) Successful in 19s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 1m16s
Merge pull request 'Record the check of the published wiki' (#39) from mil-004-wiki-published-check into main
2026-11-20 14:35:53 +01:00
2026-11-20 21:34:31 +08:00
2026-11-20 13:30:39 +01:00

🚀 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 dev extra).
  • 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 empty editor

The page opens with an empty editor. Layers, constants and the app factory are in place.

Step 2: Typing with countdown

Typing with the 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

The warning in the last seconds

In the last 2 seconds the countdown turns red.

Step 4: Text gone

The text is gone

After more than 5 seconds without typing, all text is deleted.

📄 License

GNU Affero General Public License v3.0, see LICENSE.

📎 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

S
Description
Flask writing app where all text disappears if you stop typing for 5 seconds. Udemy 100 Days of Code, day 90. Python 3.13, pytest, Doxygen, wiki in English, Danish and Bahasa Malaysia.
Readme AGPL-3.0
427 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 80.6%
JavaScript 7.6%
PowerShell 4.2%
CSS 3.7%
HTML 2.1%
Other 1.8%