ObservationTracker is an offline-first iPhone-focused app (developed browser-first) for recording observations from arbitrary lists.
This repository contains:
docs/— project documentation (vision, requirements, architecture, design, data model, milestones, etc.)web/— web application code (app shell, components, assets)ios/— placeholder for iOS wrapper code (added later)
- Install dependencies:
- Run:
npm install - Note:
postinstallrunsnpm run sync:vendorto copy local runtime bundles intoweb/vendor.
- Run:
- Start the web dev server:
- Using the included npm script (recommended):
- Run:
npm start(this runsnpx http-server ./web -c-1 -p 8080)
- Run:
- Or with npx directly:
npx http-server ./web -c-1 -p 8080 - Or with Python 3:
python -m http.server 8080 --directory web
- Using the included npm script (recommended):
- Open the app at
http://localhost:8080(port may vary).
- 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:
- Deep-link Lists detail/items view using
listId:- Example:
http://localhost:8080/?page=lists&listId=builtin-car-makes
- Example:
- Deep-link active Track state using
listId:- Example:
http://localhost:8080/?page=track&listId=builtin-car-makes
- Example:
- In-app navigation keeps URL state in sync for these flows:
- Lists detail open/close updates
listId - Track start/end session updates
listId
- Lists detail open/close updates
- 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. - In Chrome DevTools you can also emulate
prefers-color-scheme(open DevTools → Esc → Rendering → Emulate CSS media featureprefers-color-scheme).
The docs/ folder contains the canonical project documentation used to design and implement the app. If you removed or moved any files, this section captures the important parts so the top-level README remains the single source of quick guidance.
Primary documents and where to start:
- Vision.md — project philosophy, product summary, design principles, and scope.
- Requirements.md — functional and non-functional requirements with acceptance criteria.
- Architecture.md — high-level architecture, web-first workflow, native wrapper responsibilities.
- DesignSystem.md — combined UX and design system guidance (tokens, accessibility, visual style).
- DataModel.md — data structures and example JSON for lists, items, and sessions.
- Repository.md — repository interface and persistence implementation notes.
- CodingStandards.md — coding conventions and recommended tooling.
- Milestones.md — incremental milestones that keep the app runnable.
- DecisionLog.md — record of architectural decisions and rationale.
- AIInstructions.md — guardrails for using AI tools on this project.
How to use these docs
- Read
Vision.mdto understand product goals and constraints. - Use
Requirements.mdandDataModel.mdto implement the core features and persistence. - Follow
Architecture.mdandRepository.mdwhen implementing storage and the native wrapper. - Apply
DesignSystem.mdwhen building UI components. - Follow
Milestones.mdto pick small, runnable increments; each milestone should leave the app runnable. - Add entries to
DecisionLog.mdwhen you make architecture or policy decisions.
- 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.
When contributing, please follow the coding standards in docs/CodingStandards.md and the milestone-driven workflow. Small, focused commits that keep the app runnable are preferred.