- JavaScript 56.8%
- Python 40.4%
- Shell 1.5%
- CSS 1.1%
- HTML 0.2%
| apps | ||
| bin | ||
| contracts | ||
| fixtures | ||
| ops | ||
| services/api | ||
| tests | ||
| tools | ||
| .gitignore | ||
| AGENTS.md | ||
| ATLAS_Implementation_Plan.md | ||
| ATLAS_Product_Design_Specification_v0.4.md | ||
| CLAUDE.md | ||
| README.md | ||
| requirements-api.txt | ||
| requirements-e2e.txt | ||
| requirements.txt | ||
ATLAS
ATLAS turns trip source documents into a reviewed itinerary website. This repository is an active prototype. The static publisher builds Adina’s five-chapter, 28-date itinerary with direct chapter/day pages and an explicit offline-save flow. DOCX and CSV candidate importers, a conservative three-way reimport review, and the local Studio sign-in, edit, and publication flow are in place. Public-host deployment and physical-phone checks are still pending.
Run the local previews
From the repository root, start a loopback-only static server:
python3 -m http.server 8765 --bind 127.0.0.1
Open either page in your browser:
http://127.0.0.1:8765/apps/viewer/— public-viewer prototype using synthetic demo data.http://127.0.0.1:8765/apps/studio/— phone-friendly Studio prototype using synthetic mock accounts and trips; the page lists its demo sign-ins.http://127.0.0.1:8765/tools/private-review/— your private itinerary review, including source booking details. It has no login; keep the server bound to127.0.0.1.
Stop the server with Ctrl-C in its terminal. The original DOCX and private review JSON are ignored by Git; do not publish the repository tree as a website.
Build and preview a public package
After installing requirements.txt in .venv as shown below, the publisher accepts the checked-in synthetic public fixture, runs the privacy scan and full public contract check, and writes to a new directory:
.venv/bin/python tools/publisher/build.py /tmp/atlas-public-build --build-id demo-001
.venv/bin/python tools/contracts/validate.py /tmp/atlas-public-build/public-manifest.json
python3 -m http.server 8765 --directory /tmp/atlas-public-build/public-package --bind 127.0.0.1
Open http://127.0.0.1:8765/ and use Save trip offline. The package includes direct HTML pages for all chapters and days, including a visual route list for browsers without JavaScript. The save flow verifies every required file's response type, size, and SHA-256 before recording a version. It supports opt-in updates and removal. Physical iPhone and Android offline testing remains.
Checks
python3 -m unittest discover -s tests/security -p 'test_*.py'
python3 -m unittest discover -s tools/contracts -p 'test_*.py'
.venv/bin/python -m unittest discover -s tools/publisher -p 'test_*.py'
.venv/bin/python -m unittest discover -s tools/importer -p 'test_*.py'
python3 tests/security/check_public_privacy.py fixtures/public/ubud-labuan-bajo.json
python3 tools/contracts/validate.py --semantic-only fixtures/offline/reference-manifest.json
Install the pinned schema checker into the local virtual environment and run the full checks:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python tools/contracts/validate.py fixtures/public/ubud-labuan-bajo.json
.venv/bin/python tools/contracts/validate.py --semantic-only fixtures/offline/reference-manifest.json
For the browser offline test on this machine, install the additional pinned test dependency and use the installed Chromium. The offline check verifies current publisher output, so build a fresh package first; older packages under dist/ predate the current static-page markup. The build never overwrites, so use a new directory each time:
.venv/bin/python -m pip install -r requirements-e2e.txt
D=dist/offline-check-$(date -u +%Y%m%dT%H%M%SZ)
.venv/bin/python tools/publisher/build.py "$D" --input fixtures/review/adina-se-asia.private-review.json --include-private --build-id offline-check
.venv/bin/python tests/e2e/check_offline.py "$D/public-package"
.venv/bin/python tests/e2e/check_version_pins.py
.venv/bin/python tests/e2e/check_viewer_navigation.py
.venv/bin/python tests/e2e/check_studio.py
Build Adina’s full itinerary, including booking details, contacts, addresses, and linked source pages, into an ignored package directory:
.venv/bin/python tools/publisher/build.py dist/adina-release-001 --input fixtures/review/adina-se-asia.private-review.json --include-private --build-id adina-001
python3 -m http.server 8765 --directory dist/adina-release-001/public-package --bind 127.0.0.1
Open http://127.0.0.1:8765/. The built package includes the original source URLs behind descriptive link text. The dist/ directory is excluded from Git.
The latest local build made during development can also be previewed directly:
python3 -m http.server 8765 --directory dist/adina-complete-28-v5/public-package --bind 127.0.0.1
To activate a validated build in a local serving directory, run:
.venv/bin/python tools/publisher/activate.py dist/adina-release-001 /tmp/atlas-serving --slug adina-se-asia-2026 --build-id adina-001
The command copies and rechecks the package under versions/adina-001/, then atomically selects it through current. A failed activation keeps the previous version selected. This only prepares local files; it does not configure hosting. Use a new output directory and build ID for each later version.
Once a saved Studio draft exists, the local edit-to-publication bridge can build and activate its supported edits in one command, using the reviewed itinerary as the baseline:
.venv/bin/python tools/publisher/publish_local.py fixtures/review/adina-se-asia.private-review.json SAVED-DRAFT.json /tmp/atlas-serving --slug adina-se-asia-2026 --build-id adina-edit-001
The draft must contain matching trip, day, and item IDs. The command changes day headlines, existing item text/times/status, approved public links, and HTTPS day source links. It keeps the other reviewed content and leaves the previous local version active if the new build fails. Studio's remote Publish button now queues the same merge/build/activation work for a separate worker.
Local Studio and publication
The local API now has SQLite-backed owner/editor accounts, secure sessions, CSRF checks, login throttling, trip-scoped access checks, versioned draft read/save, queued publication, one-use editor invitations and reset links, and signed-in password changes. Install and test it with:
.venv/bin/python -m pip install -r requirements-api.txt
.venv/bin/python -m pytest -q services/api/tests
node apps/studio/check.mjs
.venv/bin/python tests/e2e/check_studio_remote.py
The owner can create an account with the interactive
services.api.bootstrap_owner command; no account or password is shipped. A
reviewed Adina snapshot can seed its editable API draft in a local ignored
SQLite database:
export ATLAS_DB_PATH="$PWD/dist/atlas-local.sqlite3"
.venv/bin/python -m services.api.bootstrap_owner create-owner --username owner --display-name "Trip owner"
.venv/bin/python tools/importer/public_seed.py fixtures/review/adina-se-asia.private-review.json dist/adina-canonical-seed.json
.venv/bin/python -m services.api.bootstrap_owner create-trip --title "Adina's Southeast Asia trip" --id adina-se-asia-2026
.venv/bin/python -m services.api.bootstrap_owner import-draft --trip-id adina-se-asia-2026 --file dist/adina-canonical-seed.json
.venv/bin/python -m services.api.bootstrap_owner configure-publication --trip-id adina-se-asia-2026 --snapshot "$PWD/fixtures/review/adina-se-asia.private-review.json" --slug adina-se-asia-2026
create-owner prompts for the password; import-draft does not overwrite an
existing draft. The API supports conditional saves with If-Match and keeps
withheld entities intact when an editor saves. The owner can create a one-use
editor invitation or password reset link in Studio. Remote Publish queues a
durable job; a separate worker performs the local build and activation:
.venv/bin/python -m services.api.publish_worker --database "$PWD/dist/atlas-local.sqlite3" --serving-root "$PWD/dist/local-serving/trips" --watch 2
In another terminal, start the real Studio and API together over local HTTPS:
export ATLAS_DB_PATH="$PWD/dist/atlas-local.sqlite3"
.venv/bin/python tools/dev/studio_server.py
Open the printed https://127.0.0.1:8443/ address and accept the local
self-signed certificate. Sign in with the owner password you entered above.
The server binds only to your computer and does not seed users or trip data.
Once Studio publishes a trip, preview the active public version in another
terminal:
python3 -m http.server 8766 --directory "$PWD/dist/local-serving/trips/adina-se-asia-2026/current" --bind 127.0.0.1
Open http://127.0.0.1:8766/. The worker writes new immutable versions and
switches that current link after validation. See
the local server notes for its options and smoke check.
If the owner loses the password, someone with shell access to the host can run
.venv/bin/python -m services.api.bootstrap_owner reset-owner-password with
ATLAS_DB_PATH set. It prompts at the terminal, changes the owner password,
and ends every existing owner session. Editor accounts are unaffected.
The browser-to-API-to-worker path passes with synthetic data over local HTTPS. It has not been deployed to the public hosts, and a real phone pass is still needed.
The production systemd entrypoints are in bin/atlas-api,
bin/atlas-worker, and bin/atlas-migrate. The migration command reports
schema status without creating a database (--status) or applies the current
schema (--apply). They expect a release-local venv/bin/python. The release
packager has produced and verified an artifact using a Debian 12 Python 3.11
environment; the release also passed a temporary build, activation, migration,
and API health smoke test on the target host. Production host bootstrap and
activation remain. The deployment scripts do not change either host by default.
After a draft is saved through the API, the owner can export that revision and feed it to the local publication command shown above:
.venv/bin/python -m services.api.bootstrap_owner export-draft --trip-id adina-se-asia-2026 --output dist/adina-saved-draft.json
.venv/bin/python tools/publisher/publish_local.py fixtures/review/adina-se-asia.private-review.json dist/adina-saved-draft.json /tmp/atlas-serving --slug adina-se-asia-2026 --build-id adina-edit-002
Project plan
See ATLAS_Implementation_Plan.md for deployment decisions, milestone gates, and remaining work. The M2a sign-in, edit, preview, and queued publication path works locally. Its public-host deployment and real-phone acceptance pass remain open. The importer notes describe CSV mapping and reimport review proposals, which do not yet modify a saved draft. The first-trip runbook records the production seed sequence for Adina's trip.