Skip to content

Commit 3deaad7

Browse files
committed
[dark-mode] Phase 4.4: Update project documentation (README, DEVELOPMENT.md)
- README.md: Add dark mode to Features list - DEVELOPMENT.md: Add Prerequisites section with Node.js >= 18 requirement - DEVELOPMENT.md: Document nedb -> @seald-io/nedb migration (Node 24 compat) - DEVELOPMENT.md: Add Dark Mode section and Testing section - progress-report.md: Mark Phase 4.4 as done
1 parent c68cdfe commit 3deaad7

3 files changed

Lines changed: 41 additions & 2 deletions

File tree

.github/specs/dark-mode/documentation/progress-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
| **4.1** | Code review & cleanup | ✅ Done |
3636
| **4.2** | Unit tests for ThemeManager | ✅ Done |
3737
| **4.3** | Developer documentation (audit & prune outdated docs) | ✅ Done |
38-
| **4.4** | Update project documentation (README, DEVELOPMENT.md) | Not Started |
38+
| **4.4** | Update project documentation (README, DEVELOPMENT.md) | ✅ Done |
3939
| **5.1** | Prepare for merge (rebase, PR) | Not Started |
4040
| **5.2** | Deploy & monitor | Not Started |
4141

DEVELOPMENT.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ touch docs-config.local.yaml
2727
yarn dev
2828
```
2929

30+
## Prerequisites
31+
32+
- **Node.js ≥ 18** (tested up to Node 24)
33+
34+
> **Note on NeDB:** The local database driver was migrated from the original [`nedb`](https://www.npmjs.com/package/nedb) package (unmaintained since 2016) to [`@seald-io/nedb`](https://github.com/seald/nedb). The original `nedb` crashes on Node.js ≥ 24 because it relies on removed `util.isDate()` / `util.isRegExp()` functions. The `@seald-io/nedb` fork is a drop-in replacement that supports modern Node.js versions. No data migration is needed — the on-disk format is identical.
35+
3036
## Starting docs with MongoDB
3137

32-
By default, the application uses a local database powered by [nedb](https://www.npmjs.com/package/nedb).
38+
By default, the application uses a local database powered by [@seald-io/nedb](https://github.com/seald/nedb) (a maintained fork of nedb).
3339
In order to use MongoDB, follow these steps:
3440

3541

@@ -65,6 +71,38 @@ Run it with
6571
node bin/db-converter --db-path=./db --mongodb-uri=mongodb://localhost:27017/docs
6672
```
6773

74+
## Dark Mode
75+
76+
The application includes a dark mode that can be toggled via the sun/moon button in the header. Theme preference is saved to `localStorage` and persists across sessions. If no preference is saved, the system `prefers-color-scheme` setting is used.
77+
78+
The theme system uses CSS custom properties defined in `src/frontend/styles/vars.pcss` (light defaults) and `src/frontend/styles/dark-mode.pcss` (dark overrides via `[data-theme="dark"]`). The `ThemeManager` module (`src/frontend/js/modules/themeManager.js`) handles initialization, persistence, and theme switching.
79+
80+
All dark mode colors follow WCAG 2.1 AA contrast requirements.
81+
82+
## Testing
83+
84+
### Unit Tests
85+
86+
```shell
87+
yarn test
88+
```
89+
90+
### E2E Tests (Playwright)
91+
92+
Runs across Chromium, Firefox, and WebKit:
93+
94+
```shell
95+
yarn test:e2e
96+
```
97+
98+
Interactive UI mode:
99+
100+
```shell
101+
yarn test:e2e:ui
102+
```
103+
104+
The E2E suite auto-starts the dev server on port 7777. Test files are in `src/test/e2e/`.
105+
68106
## Using S3 uploads driver
69107

70108
Uploads driver is used to store files uploaded by users.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ It's super easy to install and use.
1414
- 📂 Docs nesting — create any structure you need
1515
- 💎 Static rendering
1616
- 📱 Nice look on Desktop and Mobile
17+
- 🌙 Dark mode — system preference detection, manual toggle, localStorage persistence
1718
- 🔥 Beautiful page URLs. Human-readable and SEO-friendly.
1819
- 🦅 [Hawk](https://hawk.so/?from=docs-demo) is hunting. Errors tracking integrated
1920
- 💌 [Misprints](https://github.com/codex-team/codex.misprints) reports to the Telegram / Slack

0 commit comments

Comments
 (0)