Skip to content

Repository files navigation

Trajectory

Trajectory is a reflection and personal analytics product that helps turn short daily observations into careful weekly and longer-term decisions without treating correlation as causation.

About this public edition: This repository contains an interactive demo edition of Trajectory. It uses synthetic data, stores everything locally in IndexedDB, and requires no account. The production product is developed separately and is currently in closed beta with invite-only registration.

Open the interactive demo

Trajectory weekly reflection

Vue 3 · TypeScript · Pinia · Dexie · ECharts · PWA

The core flow stays intentionally small: record what mattered today, review a completed week, inspect longer-term patterns, and choose a useful next step. Every field is optional, and incomplete data remains visible rather than being filled with assumptions.

The demo intentionally excludes account, settings, and experiment flows. Its fixed synthetic configuration keeps the walkthrough focused on the three available screens instead of exposing controls that cannot be completed in this edition.

Why Trajectory

It is easy to remember a whole week by its last or strongest feeling. Trajectory places daily notes, completed work, important events, and wellbeing next to each other. Every comparison shows how many records it uses, and the app never presents a coincidence as a proven cause.

flowchart LR
    A[Daily observations] --> B[Weekly reflection]
    B --> C[Longer-term patterns]
    C --> D[Next decisions]
Loading

How it works

  • Today: record sleep, energy, daily conditions, actions, life areas, and one short note. Every field is optional.
  • Week: see the recorded days, completed work, important events, unusual days, and one decision for the next week.
  • History: follow important events and decisions, view monthly values, and compare equal periods before and after an event.

Engineering highlights

  • Local data. Pinia manages application state, while Dexie keeps edits in IndexedDB across reloads.
  • Clear code boundaries. Import rules keep data normalization, application flows, Vue components, calculations, and storage separate.
  • Owned component styles. Views, features, and shared UI primitives keep their styles scoped beside the component; only tokens, reset, base rules, and utilities remain global.
  • Calculations separate from charts. Plain TypeScript modules build summaries and comparisons; Vue and ECharts only display them.
  • Missing data stays missing. Calculations keep gaps, record counts, incomplete periods, and unusual days visible.
  • Offline-ready PWA. The app supports local data, service-worker updates, route-level loading, and recovery after an outdated deployment.
  • Repeatable demo data. The app, automated tests, and screenshots use the same checked-in synthetic snapshot.

Product walkthrough

Today

The mobile-first entry keeps the current week visible while allowing the user to record only the observations that matter that day.

Trajectory daily entry on mobile

Week

The weekly view places recorded days, completed work, important events, and a few careful observations on one screen.

Trajectory weekly review with coverage and reflection cues

Next decision

The review shows the previous decision and what happened afterwards. The user can then save one next step and an optional “if–then” plan.

Trajectory weekly decision and if-then plan

History

History shows monthly values together with the number of records used. It marks incomplete periods and does not claim that an event caused a change.

Trajectory change history and monthly sleep trend

Architecture

Vue views and components
          ↓
Application features
          ↓
Domain model and analytics
          ↓
Dexie local persistence

See the architecture overview for module responsibilities and the public repository boundary.

Explore the code

Local data and reset

On first launch, the app imports the checked-in synthetic snapshot into an empty IndexedDB database. The walkthrough uses the last recorded day as its fixed demonstration date, shown above every screen. Today, Week, and History therefore remain populated even years after deployment. Week opens the most recent completed week; period navigation is still available.

Later edits stay on the device, including on return visits and offline launches after the PWA has been cached. Existing demo databases keep their records and use their own last recorded day. Сбросить демо-данные restores the shipped snapshot and its demonstration date. No account or server is required. Optional fields and deliberately unrecorded historical days still preserve missing-data semantics.

Testing

The test suite covers daily records, calculations, versioned import, demo data, key Vue components, local storage, and navigation.

npm.cmd run lint
npm.cmd run lint:styles
npm.cmd run format:check
npm.cmd test
npm.cmd run build
npm.cmd run test:e2e

npm.cmd run check runs the complete non-browser gate. Style checks reject raw CSS colors outside src/styles/tokens.css, extra global styles, and unscoped Vue style blocks.

Run locally

Requirements: Node.js 22 and npm.

npm.cmd ci
npm.cmd run dev

Development, production builds, and browser tests use the checked-in public/demo/trajectory-demo.json; they do not regenerate it. Run npm.cmd run demo:generate only when intentionally changing the synthetic scenario. The default anchor is fixed, and contract tests check that the asset matches its generator.

Browser tests write screenshots under ignored test-results/screenshots. To intentionally refresh the README images, run $env:UPDATE_DEMO_SCREENSHOTS='1'; npm.cmd run test:e2e in PowerShell.

Deployment

GitHub Actions publishes the validated demo build to GitHub Pages after changes reach main. The deployed app uses the /trajectory/ base path and hash-based routes so that every screen remains available on static hosting.

Public and production editions

This repository contains the public demo edition of Trajectory. It preserves the core product flows, domain model, analytics, local-first persistence, responsive UI, and representative application architecture.

For privacy and operational reasons, it uses synthetic data and local IndexedDB storage instead of the production infrastructure.

The production edition is developed separately and currently runs as a closed beta with invite-only registration. Authentication, cloud synchronization, backend infrastructure, private user data, internal documentation, and private development history are intentionally not included in this repository.

About

Reflection and personal analytics PWA built with Vue 3 and TypeScript.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages