# Little by Little

A free, responsive wellbeing and everyday-problem-solving website. It runs as a static site and stores unsigned-in data in the browser. The account flow can sync a user's worries, steps, notes, movement log, and daily check-ins across devices.

## What’s included

- A guided space to write down something that feels difficult and turn it into a few small steps.
- Life areas for work, money, relationships, everyday life, and mind and body wellbeing.
- A weekly movement tracker with manual logging and CSV import.
- A daily mind and energy check-in with an optional song note.
- Seven-day movement and wellbeing patterns, presented without scores or streaks.
- Personal routines with optional browser reminders.
- A support page with a global helpline directory and UK NHS resources.
- A feedback inbox for ideas, issues, and other suggestions.
- Reflection tools for pausing, breaking down tasks, and thinking through decisions.
- Email/password accounts, email verification, password reset, optional Google sign-in, and Firestore live sync.
- Whole-app and per-category exports, per-category deletion, account deletion, and display accessibility controls.
- A plain-language privacy and data summary, including device storage, cloud sync, feedback, and deletion.
- Installable PWA with an offline app shell and local-first records.

## Open in VS Code

Open this folder in VS Code. Start with [`setup.html`](setup.html) for the guided launch steps. For a local website preview, use a static server such as the VS Code **Live Server** extension and open the provided localhost URL. Firebase Auth and Firestore need a web origin; opening `index.html` directly as a `file://` URL is not suitable for account sign-in.

## Set up separate accounts and cloud storage

The app is deliberately disconnected from Weekly. It has no shared login, Firebase project, or cloud data. Create a new Firebase project only for Little by Little. The guided [`setup.html`](setup.html) page lets you validate and download the Web config locally and copy the Firestore rules.

1. In Firebase Console, create a new project on the no-cost **Spark** plan, then register a **Web app** in it. Do not add a billing account or switch to Blaze.
2. In **Authentication → Sign-in method**, enable Email/Password, Google, and Anonymous. Google asks you for a public-facing app name and support email. Anonymous sign-in is used only to send feedback for people who don’t have an app account.
3. In **Firestore Database**, create one database. Firestore has one no-cost database per project. In **Firestore → Rules**, replace the starter rules with [`firestore.rules`](firestore.rules) and publish them. They let each signed-in user read and write only their own data. Feedback is sent through an anonymous session; the app cannot read the feedback inbox, and the same browser session can delete its own feedback. Project administrators can read the inbox in Firebase Console. A user's account email is not included unless they enter it in the optional reply field.
4. In the setup page, paste the new Web app configuration and download the generated `firebase-config.js`. Replace the file in this project with it. Do not paste Weekly's Firebase configuration here.
5. Put this folder in a **private GitHub repository** and connect that repository to a new Cloudflare Pages site. Leave the build command blank and set the output directory to `.`. Each push to the repository will publish the site automatically.
6. In **Authentication → Settings → Authorized domains**, add the deployed `*.pages.dev` domain. Keep `localhost` for local development.
7. Create a test account on the deployed site, add sample data, then sign in on a second device. Remove the sample data before sharing the link.

The site can be hosted on Cloudflare Pages' free plan and Firebase Spark needs no payment method to start. Spark quotas are limited, and Firebase may stop a service after its free quota is exceeded until the period resets. Firestore's current free quota is 1 GiB stored data, 50,000 reads/day, and 20,000 writes/day. See [Cloudflare Pages Git integration](https://developers.cloudflare.com/pages/get-started/git-integration/), [Firebase Spark plan](https://firebase.google.com/docs/projects/billing/firebase-pricing-plans), and [Firestore free quotas](https://firebase.google.com/docs/firestore/quotas).

## Privacy and movement integrations

Without signing in, worries, movement, and check-ins stay in this browser. With an account, those records sync to the separate Little by Little Firebase project. Feedback is stored in the browser and, once Firebase is configured, sent to the separate feedback inbox; an optional reply email is included only when the person enters one. Data can be exported or cleared from Settings.

The app includes a plain-language [privacy and data summary](privacy.html) that explains what is stored locally, what syncs, and how account deletion and feedback removal work.

Movement can be logged manually or imported from a CSV file with date, activity/name, and minutes columns. The daily check-in lets a person note their mood, energy, and an optional song title; it does not read listening history. The Strava and Lyfta buttons currently open those services; direct automatic syncing is not configured in this first version.

Routine reminders use browser notifications when permitted and only run while the app is open. Offline mode caches the app shell and saves changes on the device; cloud updates retry when connectivity returns. Spotify and Apple Music history connections are not configured. The check-in song field is manual. This app offers reflection and wellbeing tools, not medical diagnosis or emergency care.
