Tirsvad 52c5042123
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 6s
TirSystem/git-workflows: Publish accepted milestones / publish (push) Successful in 20s
TirSystem/git-workflows: Validate / validate (push) Successful in 20s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 57s
Merge pull request 'MIL-005: close the wiki review condition' (#41) from mil-005-wiki-check into main
2026-11-20 11:30:55 +01:00
2026-11-20 10:43:15 +01:00

🚀 Cafe and Wifi Website

A small website that lists cafes with wifi and power sockets for remote working. It is the solution to the day 88 assignment of the Udemy course "100 Days of Code: The Complete Python Pro Bootcamp", and it needs nothing but Python.

📚 Table of Contents

🧭 Overview

The site reads the supplied SQLite database data/cafes.db (21 London cafes) and lets a visitor list, add and delete cafes. It is built in three steps, and each step has a screenshot and a wiki page that explains what it taught.

Folder Holds
src/cafe_wifi/ The website: constants, data access, controllers and views
tests/ The pytest tests
data/ The supplied database cafes.db
docs/ The project documents, the wiki pages and the screenshots
scripts/ The static analysis and screenshot scripts

The site has no runtime dependency: it uses the Python standard library only (wsgiref, sqlite3). The source is documented with Doxygen comments, and a Doxyfile is included.

Screenshots

Step Screenshot
1. List the cafes Step 1: the list of cafes
2. Add a cafe Step 2: the add form
2. Add a cafe, with errors Step 2: the form with errors
3. Delete a cafe Step 3: the delete confirmation

The pictures of the cafes are links to other websites; the screenshots were taken in a container without internet access, so those areas are grey. What each step taught is explained in the wiki, in English, Danish and Bahasa Melayu.

📋 Requirements

  • Python 3.13 or newer, to run the site and the tests.
  • Git, to clone the repository.
  • Optional: Doxygen, to build the source documentation; Docker, to take the screenshots; opengrep, to scan the code before a push.

🛠️ Setup

Create a local virtual environment, update pip, and install the project with its test tools.

Windows (PowerShell):

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

Linux and macOS:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

▶️ Run

python -m cafe_wifi

Then open http://127.0.0.1:8000. The database path can be changed with the environment variable CAFE_WIFI_DB. Pages are added step by step; see the wiki for what each step contains.

🧪 Tests

python -m pytest

Before a push, run the static analysis and the style checks:

bash scripts/opengrep-scan.sh
python -m ruff check src tests

The source documentation is built with doxygen Doxyfile and written to docs/doxygen/. The screenshots are taken in a Docker container with bash scripts/screenshots/run.sh --steps 1 2 3 (on Windows: pwsh scripts/screenshots/run.ps1 --steps 1 2 3), never on the desktop.

📄 License

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

📎 Appendix: Project documents

The documents a newcomer needs, in reading order.

Document What it tells you
AGENTS.md The rules agents follow 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
Cafe and Wifi website: list, add and delete cafes with wifi and power for remote work. Pure Python 3.13 standard library (wsgiref, sqlite3). Udemy 100 Days of Code, day 88.
Readme AGPL-3.0
550 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 97.2%
PowerShell 1.1%
Shell 1.1%
Dockerfile 0.6%