Level 3 · Interactive Web Applications Project 22 of 60 Runs in the browser
Project 22: Personal Notes Application
A two-pane notes app: a searchable list sorted by last edit and an editor that saves as you type, with word counts and localStorage.
1 · The problem
Quick notes end up scattered across sticky notes and chat messages. A simple notes app needs a list sorted by most recently edited, an editor that saves while typing, search across titles and text, and storage so notes survive a reload.
User stories
- As a writer, I want my latest note at the top.
- As a writer, I want to find a note by any word in it.
- As a writer, I want notes saved without pressing Save.
2 · Requirements
- Create, update and delete notes immutably; each note has id, title, body and updated time.
- Sort the list by last update, newest first.
- Search titles and bodies, ignoring capitals.
- Select a note to edit it; typing updates the note and the list.
- Show the word count of the selected note.
- Save to localStorage and load on start, with sample notes as the fallback.
Acceptance criteria
- The list starts with 3 notes, newest first.
- Typing in the editor moves that note to the top.
- Searching 'milk' shows only 'Shopping'.
- New note creates an empty 'Untitled' note and selects it.
Architecture
| Layer | File | Responsibility |
|---|---|---|
| Page | index.html + style.css | Search box, note list, editor and buttons. |
| State | notes.js | Create, update, delete, sort, search, word count. Your work. |
| View and events | app.js | renderList, renderEditor, events, storage. Your work. |
Flow: Input/click → notes = createNote / updateNote / deleteNote(…, now) → save → renderList() + renderEditor()
Expected result

Screenshots are captured automatically from the solution by the browser test suite.
Build it: guided stages
Pick a stage, load its starter files, follow the steps, then run the app and the tests. Every stage is preserved separately, so loading one never overwrites another.
- Stage 1: Render the notes · Show the sorted list and the selected note.
- Stage 2: Select, create, edit, delete · Make the list and editor interactive.
- Stage 3: Search and save · Search notes and keep them between visits.
Troubleshooting
- Typing loses focus after every key.
- Only re-render the list while typing; do not rebuild the editor.
- The newest note is not on top.
- Pass now() to updateNote so updated changes, and sort by updated.
- Deleting leaves the old text in the editor.
- Set selectedId to null and call renderEditor().
Extension challenges
- Pin notes so they stay at the top.
- Show 'Saved' with the time of the last change.
- Export all notes as a .txt download.
Downloads
- Starter files
- Stage 1: Render the notes (starter, complete, tests)
- Stage 2: Select, create, edit, delete (starter, complete, tests)
- Stage 3: Search and save (starter, complete, tests)
- Complete solution
- Whole project folder (README, requirements, architecture, checkpoints, tests, sample data, prompts)
Browser projects open directly from index.html. Node.js unit tests: run node --test in the project folder.
AI development prompts
Context: I am building the academy's Personal Notes Application. Task: explain why I pass the time into updateNote instead of calling Date.now() inside it. Constraints: explain the idea and point to the line that matters; do not write the whole solution. Expected behaviour: I can finish the stage myself. Testing: suggest two inputs that would show whether my code is right.
Context: My Personal Notes Application passes the visible tests. Task: check my editor for focus problems and lost edits. Constraints: do not rewrite my code; list issues in order of importance. Expected behaviour: I understand each issue and can fix it. Testing: give one test case per issue.
Context: I finished the Personal Notes Application. Task: help me plan this extension: pin notes to the top. Constraints: keep the logic file free of page code; existing tests must still pass. Expected behaviour: a short plan with the functions to add or change. Testing: describe the new tests I should write first.
Source
Repository folder: projects/project-22-personal-notes-application/ · view on GitHub