public-release phases 1-3: read-only public mode, gunicorn container, demo bootstrap, CI, README

- before_request guard: visitors browse + explore; writes need PHYSCOM_ADMIN_TOKEN login
- SameSite=Lax/HttpOnly cookies, persisted secret key, debug off unless FLASK_DEBUG=1
- non-root gunicorn container with healthcheck; physcom demo --if-empty on first start
- landing page Top Concepts, write controls hidden from visitors
- CI workflow, pyproject metadata, compose Ollama parity, README rewrite
- tests/test_web_access.py: access control + GET smoke test of every page

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-09-25 15:40:02 -05:00
parent 2e38a6cf73
commit 8171fc023e
23 changed files with 510 additions and 112 deletions

View File

@@ -1,6 +1,13 @@
# Copy to .env — FLASK_SECRET_KEY is auto-generated on first run if omitted.
# Copy to .env — FLASK_SECRET_KEY is auto-generated (and saved next to the DB) if omitted.
FLASK_SECRET_KEY=
# Web visitors are read-only unless logged in at /login with this token.
# Leave blank for a fully read-only public site. `python -m physcom_web`
# (the localhost dev server) is open when this is blank.
PHYSCOM_ADMIN_TOKEN=
# Set to 1 when served over HTTPS so the session cookie is Secure-only.
PHYSCOM_SECURE_COOKIES=0
# LLM provider for the optional pass 4 review (leave blank to skip it)
# Supported: gemini, ollama
LLM_PROVIDER=