diff --git a/README.md b/README.md index 24d04d3..fc12fdc 100644 --- a/README.md +++ b/README.md @@ -1,239 +1,94 @@ -# LEVEL UP +# Level Up -### Improve your life. Build a world alongside you. +Level Up is a website I made to turn a long self-improvement video into something I could actually use instead of just watching once and forgetting. -**Level Up is an offline-first self-improvement operating system with a persistent living companion. Reading, studying, focusing, completing goals, and applying protocols change how the companion behaves and how its tiny world develops — entirely on your device.** +**Live site:** https://hustlenix.github.io/LevelUp/ -**Live:** https://hustlenix.github.io/LevelUp/ +## Description ---- +The project started with a roughly 20-hour self-development video. I went through the material and turned it into 28 readable chapters, then kept adding tools that made the information more useful in day-to-day life. -## What is Level Up? +You can read the chapters, search through them, take quizzes, save highlights, track progress, use focus sessions, set goals, review your work, and use the built-in Study Mode. -Level Up began as a way to turn a 20-hour self-development video into something more useful than another summary. The source became a 28-chapter manual with evidence-graded claims, protocols, search, quizzes, highlights, and a 90-day roadmap. +I also added a small companion called **Milo**. Milo is connected to the things you actually do in Level Up. For example, completing focus sessions, reading chapters, or reaching milestones can change what Milo is doing and unlock things in his room. -Then the project grew into a Today-first operating system: goals become roadmaps, milestones, tasks, and bounded focus sessions; reviews keep a local record of what actually happened; Study Mode adds student workflows; progress, streaks, badges, and a portfolio make the record visible. +Most of the app works locally in your browser. You do not need to create an account just to use the main features. -It worked, but it still felt like software. +If you only want to see the Milo system quickly, there is a reviewer demo here: -This version asks a different question: +https://hustlenix.github.io/LevelUp/today/?milo=demo -> What if progress did not only change a chart? What if it changed a place that was living beside you? +### Screenshots -That is the Living Companion Engine. +![Level Up homepage](public/devlog/after-home.png) -## The memorable part +## Main Features -Milo is not a chatbot pasted into the corner of the app. - -Milo has persistent local state, an event journal, traits, activity, cooldowns, room state, and deterministic behaviour. Real Level Up actions feed that system. - -Start a focus block and Milo works beside you. - -Open a Health chapter and the behaviour can shift toward stretching. Open Wealth and the room context can shift toward a ledger. Complete real progress and objects appear in the room. - -Leave for a while and nothing bad happens. There is no starvation, sickness, guilt loop, or streak punishment. On return, the system simply continues. - -## How it works - -```text -LEVEL UP ACTIONS - | - v - DOMAIN EVENTS - | - +-------------------+ - | | - v v -OS COMPLETION JOURNAL PENDING EVENT QUEUE - | | - +---------+---------+ - | - v - COMPANION PUMP - | - v - PURE STATE REDUCER - | - +---------+----------+ - | | | - v v v - TRAITS UNLOCKS EVENT JOURNAL - | | | - +---------+----------+ - | - v - BEHAVIOUR SELECTOR - | - +---------+----------+ - | | | - v v v - ANIMATION DIALOGUE WORLD STATE -``` - -The interesting engineering problem is not drawing a mascot. It is keeping one persistent creature aware of actions across an offline-first app with multiple local stores, without requiring a backend. - -See **[docs/COMPANION-ENGINE.md](docs/COMPANION-ENGINE.md)** for the architecture and testing contract. - -## Companion world - -The room is a second representation of the same progress data used elsewhere in Level Up. - -Current examples include: - -- first completed chapter -> book -- five completed focus sessions -> desk lamp -- ten highlights -> corkboard -- first roadmap milestone -> trophy shelf -- completed pillars -> larger room changes -- completed 90-day road -> expanded window view - -Unlocks are threshold-based, persistent, and replay-safe. Refreshing the app cannot grant the same object twice. - -The companion can be turned off completely. Motion supports **Full / Reduced / Off**, dialogue supports **Normal / Minimal / Off**, and interaction and sound have independent controls. A system `prefers-reduced-motion` request is respected automatically. - -## Reviewer demo - -A reviewer should not need seven days of personal data to understand the system. - -**One-click live demo:** https://hustlenix.github.io/LevelUp/today/?milo=demo - -That URL opens the Companion Space directly in reviewer mode. You can also open Milo normally and choose **Experience reviewer demo**. The demo runs the production reducer against a disposable deterministic fixture: - -1. start focus -2. complete focus -3. open a Health chapter -4. complete the chapter -5. reach a roadmap milestone - -The saved companion is not overwritten. The Engine view exposes current behaviour, traits, context, room state, and recent domain events. - -## The rest of Level Up - -The companion sits on top of a substantial product rather than replacing it: - -- 28 self-development chapters across Self, Wealth, Health, and Love -- evidence grades and a research audit -- 13 named protocols -- Today-first workflow -- goals, roadmaps, milestones, tasks, and focus sessions +- 28 self-improvement chapters +- chapter search +- quizzes and reflections +- highlights and bookmarks +- progress tracking +- goals and roadmaps +- focus sessions - daily and weekly reviews -- Study Mode and student planning tools -- full-text search with MiniSearch -- chapter quizzes and reflections -- persistent highlights and bookmarks -- XP, badges, streaks, and progress views -- portfolio and roadmap views -- local backup/restore with validation and rollback journal -- offline/static-first deployment -- optional local model features with deterministic fallbacks -- devlogs and release verification scripts - -## Local-first by design - -Core Level Up works without an account, backend, or cloud AI. - -Progress and companion memory live in browser storage. Backup/restore includes companion state when present. The companion engine never needs an LLM to choose an animation or decide what an event means. - -Optional local AI functionality is separate. See **[docs/AI-LOCAL-OLLAMA.md](docs/AI-LOCAL-OLLAMA.md)**. - -When a Google Analytics measurement ID is supplied at build time, Level Up can send only the explicitly whitelisted non-content events in `lib/analytics.ts`. Typed notes, reflections, highlight text, companion traits, companion journal entries, room state, and dialogue are not analytics payloads. Without a measurement ID, analytics is a no-op. - -## Companion design rules - -The project deliberately avoids Tamagotchi-style pressure. - -Milo does **not** become sick, hungry, sad, or degraded because the user took a break. A failed quiz is calibration, not punishment. A broken streak does not create a guilt notification. The creature can live quietly while the user is away. - -The product must remain useful with the companion disabled. - -## Technical stack - -- Next.js 16 static export -- React 19 -- TypeScript -- Tailwind CSS v4 -- `useSyncExternalStore` local repositories -- MiniSearch -- Node `node:sqlite` content build pipeline -- Playwright release checks -- GitHub Actions + GitHub Pages -- optional local Ollama / browser model experiments where supported - -No application server is required for the core experience. - -## Persistence model +- Study Mode +- streaks, XP and badges +- local backup and restore +- Milo, the persistent companion +- GitHub Pages deployment -The main app and companion use versioned local schemas. +## Getting Started -The companion layer adds: +### Dependencies -- validated companion state -- bounded event journal -- pending event queue -- adapter cursors -- deterministic seed -- room unlock ownership -- cooldown state -- settings migration +To run Level Up locally you will need: -The reducer is replay-safe by event ID. OS completion events are consumed exactly once. Existing backups remain compatible because companion data is additive and validated before restore. +- Node.js +- npm +- Git -## Performance approach +The project uses Next.js, React, TypeScript and Tailwind CSS. -The companion is intentionally lightweight: +### Installing -- CSS/SVG character art rather than a large animation runtime -- React renders state changes, not every animation frame -- CSS owns ambient motion -- event pumps write only when events exist -- bounded event journals and pending queues -- deterministic behaviour instead of continuous model calls -- no remote character assets -- reduced-motion path for lower animation cost and accessibility +Clone the repository: -## Development story - -Level Up started as a book built from a long video transcript. - -The next version became an operating system with Today, goals, focus, reviews, study workflows, and local evidence of progress. - -But useful software can still be emotionally flat. +```bash +git clone https://github.com/Hustlenix/LevelUp.git +cd LevelUp +``` -The Living Companion Engine is an attempt to make the same progress data tangible. Reading, studying, focusing, completing goals, and applying protocols now alter a persistent local simulation. The visible character is only the surface; underneath it is a domain-event adapter, journal, pure reducer, unlock engine, behaviour selector, persistence layer, and deterministic reviewer fixture. +Install the dependencies: -That is the part of the project meant to make another hacker ask: +```bash +npm install +``` -> How did one creature stay aware of the whole app without a backend? +### Executing program -## Run locally +Start the development server: ```bash -git clone https://github.com/Hustlenix/LevelUp.git -cd LevelUp -npm install npm run dev ``` -Production preview: +Then open: -```bash -npm ci -npm run build -npm start +```text +http://localhost:3000 ``` -Then open `http://localhost:3000`. +To make a production build: -The public deployment uses the case-sensitive GitHub Pages base path: - -```text -/LevelUp +```bash +npm run build +npm start ``` -Do not put GitHub tokens, API secrets, or private keys in source files, frontend environment variables, or build output. +## Testing -## Validate before shipping +Before I ship changes I normally run: ```bash npm run lint @@ -241,23 +96,41 @@ npm test npm run build ``` -For production-route and responsive checks: +There are also Playwright checks for the deployed site. ```bash npx playwright install chromium -node verify-release.mjs +PLAYWRIGHT_BASE_URL=https://hustlenix.github.io/LevelUp node verify-release.mjs ``` -To run the release checks against the public deployment: +## Help + +If the project does not start, first make sure the dependencies installed correctly: ```bash -PLAYWRIGHT_BASE_URL=https://hustlenix.github.io/LevelUp node verify-release.mjs +npm install +``` + +If the local build looks different from the GitHub Pages version, remember that the deployed site uses the case-sensitive base path: + +```text +/LevelUp ``` -## Source +You can also check the repository's GitHub Actions runs if the public site did not deploy after a push. + +## Why I Made This + +I originally wanted a better way to learn from one very long video without constantly scrubbing through it again. + +Once the reading version worked, I started experimenting with ways to make the project more useful: progress tracking, study tools, focus sessions, goals, and eventually Milo. + +The project has changed a lot from the first version, but the main idea is still the same: make useful information easier to come back to and actually apply. + +## License -**Repository:** https://github.com/Hustlenix/LevelUp +The written site content is licensed under the **Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)**. -The goal is not to maximize feature count. +See the [LICENSE](LICENSE) file for the full details. -The goal is for Level Up to feel like a coherent, authored system whose progress is visible in two forms: the record you can inspect and the world you can watch change. +The source code is not included under that content license unless explicitly stated.