Loglist is browser-first app available on iOS for recording observations from arbitrary lists.
This repository contains:
docs/— project documentation (requirements, architecture, data model, repository)web/— web application code (app shell, components, assets)ios/— SwiftUI iOS wrapper app that hosts the web app in aWKWebView
- Install dependencies:
- Run:
npm install npm installalso runspostinstallto sync vendor bundles intovendor.
- Run:
- Start the web dev server:
npm start. - Open the landing page at
http://localhost:8080(port may vary). - Open the app at
http://localhost:8080/app.html.
- Open the design system reference page at
http://localhost:8080/design-system.html.
- Open a specific tab with
page:- Lists:
http://localhost:8080/?page=lists - Track:
http://localhost:8080/?page=track - History:
http://localhost:8080/?page=history
- Lists:
- Open a specific list in the detail view using
page=listsandlistId:- Example:
http://localhost:8080/?page=lists&listId=builtin-car-makes
- Example:
- Open an active tracking session for a specific list using
page=trackandlistId:- Example:
http://localhost:8080/?page=track&listId=builtin-car-makes
- Example:
- Force dark mode via the URL:
http://localhost:8080/?theme=dark - Force light mode via the URL:
http://localhost:8080/?theme=light - The selection is persisted to
localStorageby the demo code. If no explicit theme is set the browser'sprefers-color-schemecontrols the UI.
- Requirements.md — functional and non-functional requirements.
- Architecture.md — high-level architecture, web-first workflow, native wrapper responsibilities.
- DataModel.md — data structures and example JSON for lists, items, and sessions.
- Repository.md — repository interface and persistence implementation notes.
- Current web persistence implementation uses
localStoragefor custom lists and session context. - Built-in lists are loaded from
web/data/builtins.json. - Repository interfaces and longer-term storage goals are documented in
docs/Repository.md. - When ready to wrap for iOS, embed the web build in a minimal SwiftUI app using
WKWebViewand implement a small native repository bridge.
The ios/Loglist Xcode project wraps the same web app in a native SwiftUI shell so it can run as a real iPhone app, including a Live Activity that is not possible in a plain browser tab.
Loglist/ContentView.swifthosts the app in aWKWebViewviaLoglistWebView, loadingloglist://app/app.html.- A custom
WKURLSchemeHandler(LocalWebViewHandler) serves files straight out of theweb/folder bundled into the app, so the same HTML/CSS/JS from this repo runs unmodified on-device. - A build phase copies the repo's
web/directory into the app bundle at build time, so the iOS app and the browser demo always run the same web code. - A
WKScriptMessageHandlerbridge lets the web app talk to native code viawindow.webkit.messageHandlers:shareSession— writes a session's CSV export to a temp file and presents the native share sheet.liveActivity— starts, updates, and ends an ActivityKit Live Activity as an active tracking session progresses.
LoglistLiveActivity/is a WidgetKit extension that renders the Live Activity on the Lock Screen and in the Dynamic Island, showing the active list name and observed/total counts.- The web app decides when to call the native bridge (see
web/screens/track.js); the native layer has no tracking logic of its own. - The
LoglistLiveActivityAttributestype is currently defined separately in both the app target and the widget extension target and must be kept in sync by hand.