Commit graph

13 commits

Author SHA1 Message Date
vrubelroman
e220863451 Add map summary screen (place count + Start button) before the guide
After resolving location, the map screen now checks how many places
are nearby (same server-side iterative radius expansion the guide
screen uses) and shows "Found N places within Rm" with a Start button,
instead of jumping straight into narration. The search cap is raised
to 10km (was 5km) — if nothing turns up within that, a "nothing found"
message is shown instead.

This also addresses a UX report: the guide screen's Tinder-style card
stack only shows one card at a time by design, which read as "it only
found one place" even when 5 were actually there. Added a "1 / 5"
position indicator to the card stack so it's clear there's more to
swipe through, and the new summary screen surfaces the real count
upfront regardless.

Verified: ./gradlew testDebugUnitTest passes, :app:assembleDebug
produces a working APK, sent to Telegram.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 20:58:17 +00:00
vrubelroman
531fab801d Add restart: unless-stopped to all docker-compose services
Root cause of the 502: the host's disk filled up (down to ~511MB
free), which appears to have restarted the Docker daemon. Every other
service on this shared host came back up automatically (they all have
restart policies); guideCity's three containers didn't and stayed
down. Freed ~3.2GB via `docker builder prune` + `docker image prune`
(safe: build cache and dangling images only, no running containers
touched) and brought the stack back up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 20:44:36 +00:00
vrubelroman
2901950520 Add 5 real places near Solntsevo (Domostroitelnaya 14) for live testing
Metro Solntsevo, the district's central park/pond (Bogdanova St),
Meshchersky forest park, the Levenson dacha (a Shekhtel-designed 1900
Art Nouveau landmark), and the Peredelkino writers' village — all
researched with real coordinates/history, in RU/EN x short/medium/long.

Verified against the live nearby endpoint: all 5 are found from the
user's actual coordinates (55.662303, 37.425486), radius expanding to
5100m to cover the farthest (Peredelkino village, ~5012m out).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 20:26:00 +00:00
vrubelroman
bb80307479 Add Telegram notification script for sending build artifacts
scripts/notify_telegram.sh sends a file (e.g. the debug APK) to a
Telegram chat via Bot API sendDocument. Reads TELEGRAM_BOT_TOKEN and
TELEGRAM_CHAT_ID from .telegram.env (gitignored, real credentials
never committed) or the environment. Verified end-to-end: sent the
current debug APK and confirmed delivery.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 20:17:07 +00:00
vrubelroman
0cc8d9b767 Point mobile app at nginx-fronted https://guidetest.vrubel.xyz/
Verified reachable end-to-end (health/nearby endpoints respond
correctly through the reverse proxy) and set as the preferred
API_BASE_URL for testing from a physical device on any network,
ahead of the LAN-IP and emulator-loopback fallbacks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 20:10:40 +00:00
vrubelroman
6e90956b3e Add logging throughout the Android app and unit tests
Log.d/i/w/e calls covering location resolution, TTS lifecycle and
errors, nearby/search network calls and their failure paths, and
screen-level state transitions. OkHttp's logging interceptor now
routes through Log (tag "OkHttp") instead of println for consistent
filtering. Enabled testOptions.unitTests.isReturnDefaultValues so
android.util.Log calls don't crash plain JVM unit tests.

Added mockk + kotlinx-coroutines-test and a GuideViewModelTest suite
covering the load-success, load-failure, and retry paths — including
a regression test for the infinite-spinner bug (isLoading must clear
and errorMessage must be set on a failed nearby-search call, not left
hanging). Verified: ./gradlew testDebugUnitTest passes (4/4).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 20:10:31 +00:00
vrubelroman
be67902b45 Add structured logging throughout the backend
Request-level logging middleware (method/path/status/duration),
per-module loggers in routes/services (nearby search radius
expansion, 404s, name search), LOG_LEVEL setting wired through
docker-compose, and seed_loader converted from print() to logging.

Verified: pytest passes, and manually confirmed log lines appear for
both successful and 404 requests via `docker compose logs api`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 20:10:10 +00:00
vrubelroman
188bf01d6e Fix infinite spinner on guide screen and allow cleartext HTTP in debug
Two bugs combined to cause this: (1) Android blocks plain-HTTP traffic
by default since API 28, so every call to our HTTP-only local backend
was throwing and being silently swallowed; (2) GuideViewModel's
loadNearby() returned early on that exception without ever setting
isLoading = false, so the spinner never cleared and no error showed.

Fix: debug-only manifest override (src/debug/AndroidManifest.xml)
enables cleartext traffic for local dev against the Docker backend;
GuideViewModel now always resolves isLoading and surfaces a
errorMessage + retry() the UI can act on instead of hanging forever.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:51:58 +00:00
vrubelroman
3f5a857c5a Document LAN-IP access for testing the backend from a physical device
The api service already binds 0.0.0.0:8000 via docker-compose, so it's
reachable from other devices on the same network without extra config.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:11:31 +00:00
vrubelroman
c5596870fb Add Android app skeleton (Kotlin/Compose, Catppuccin Mocha theme)
Full app scaffold wired to the backend: onboarding, content-length
picker, map screen (permission flow + text-search fallback), guide
screen with a swipeable place-card stack driven by on-device TTS
narration and a 60s re-scan loop, place detail screen with
mute/favorite controls, favorites (Room-backed), and settings.
Hilt for DI, Retrofit+kotlinx.serialization for the API client,
DataStore for onboarding/content-length prefs, FusedLocationProviderClient
for location. The 2GIS MapKit integration is isolated behind
map/DgisMapView.kt (currently a placeholder) since its exact Maven
coordinates need confirming from the 2GIS developer portal.

Verified by actually building it: installed a minimal Android SDK
(platform 34 + build-tools, no emulator) and JDK 17 locally, then ran
:app:compileDebugKotlin, :app:assembleDebug (produced a real debug
APK), and :app:lintDebug (0 errors, 44 non-blocking warnings, mostly
"newer dependency version available"). Caught and fixed two real bugs
this way: a wrong Maven artifact for the Retrofit kotlinx.serialization
converter, and missing ExperimentalMaterial3Api opt-in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:05:49 +00:00
vrubelroman
ca28c93daf Add researched Moscow seed content (22 places, RU/EN, 3 lengths)
Gorky Park (6), Red Square area (10), and Moscow-City (6) landmarks
with real historical/architectural facts, each with short/medium/long
narration text in Russian and English. Widened built_year to
varchar(128) since several entries need more than a bare year (e.g.
demolition/reconstruction ranges).

Verified end-to-end against the live backend: all 22 places load via
seed_loader, nearby search returns correctly distance-sorted results
with radius expansion in sparser areas (confirmed at Gorky Park,
900m), and place detail/search-fallback endpoints return full
bilingual content. Full pytest suite passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 18:41:16 +00:00
vrubelroman
d2ab424e7e Add FastAPI backend with PostGIS-backed nearby search
FastAPI service backed by PostgreSQL+PostGIS: cities/places/place_content
schema (normalized per-language, per-length content for easy future
re-ingestion), Alembic migration, an iterative-radius-expansion nearby
search endpoint, a name-search fallback for denied-location flows, and
a YAML seed loader CLI. Verified end-to-end against a live Docker
Postgres+PostGIS instance (migration, city seed, place/content CRUD,
and nearby radius expansion all confirmed working via curl).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 18:31:29 +00:00
vrubelroman
2acc5dfa2e Initialize guideCity monorepo scaffolding
Set up git repo with .gitignore and README describing the planned
backend (FastAPI + PostGIS) and Android (Kotlin/Compose) architecture.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 18:19:47 +00:00