|
8 | 8 |
|
9 | 9 | [](https://www.typescriptlang.org/) |
10 | 10 | [](https://reactjs.org/) |
11 | | -[](https://expressjs.com/) |
| 11 | +[](https://expressjs.com/) |
12 | 12 |
|
13 | 13 | ## ✨ Features |
14 | 14 |
|
15 | 15 | - 📁 **Folder Management**: Create, delete, and rename folders in a collapsible tree view with right-click context menus |
16 | 16 | - 📝 **Markdown Pages**: Create and edit markdown documents with GitHub Flavored Markdown support |
| 17 | +- 🧩 **Smart Templates**: Create new pages from reusable templates (stored under `data/templates/`) |
| 18 | +- 📊 **Mermaid Diagrams**: Render Mermaid code fences in preview/reading mode, with export/download support |
17 | 19 | - 🎨 **Three-Pane Layout**: Folder tree (left), markdown editor (center), live preview (right) |
18 | 20 | - 📐 **Fully Resizable**: Drag to resize both horizontal panes (left/right) and vertical sections (folder tree/page list) |
19 | 21 | - 🌓 **Theme Options**: Auto-detects system theme preference with manual override - cycles through auto/light/dark/high-contrast modes |
|
38 | 40 | - 🔐 **Password Protection**: Simple password-based authentication to secure your data |
39 | 41 | - 🛡️ **Security Features**: Rate limiting, request logging, and security headers |
40 | 42 |
|
41 | | -## 🔐 Security & Logging. |
| 43 | +## 🧩 Smart Templates |
| 44 | + |
| 45 | +When creating a new page, Codex can start from a template instead of a blank page. |
| 46 | + |
| 47 | +- Templates live in `data/templates/*.md` |
| 48 | +- Optional frontmatter at the top of the template file: |
| 49 | + - `template: Your Template Name` (display name) |
| 50 | + - `autoname: true|false` (auto-generate a filename when creating) |
| 51 | +- The frontmatter is stripped from the created page content automatically |
| 52 | + |
| 53 | +## 📊 Mermaid Diagrams |
| 54 | + |
| 55 | +Codex supports Mermaid diagrams in markdown via fenced code blocks: |
| 56 | + |
| 57 | +````md |
| 58 | +```mermaid |
| 59 | +graph TD |
| 60 | + A --> B |
| 61 | +``` |
| 62 | +```` |
| 63 | + |
| 64 | +- Diagrams render in the live preview and in reading mode (open in new window) |
| 65 | +- You can download rendered diagrams as SVG |
| 66 | +- Export flows (e.g. Word/PDF) include diagrams as images rather than raw Mermaid text |
| 67 | + |
| 68 | +## 🔐 Security & Logging |
42 | 69 |
|
43 | 70 | Codex includes several security features to protect your data: |
44 | 71 |
|
@@ -351,7 +378,7 @@ Then open [http://localhost:3000](http://localhost:3000) in your browser! |
351 | 378 |
|
352 | 379 | ### Prerequisites |
353 | 380 |
|
354 | | -- Node.js 18+ and npm |
| 381 | +- Node.js 25+ and npm |
355 | 382 | - macOS, Linux, or Windows with WSL |
356 | 383 |
|
357 | 384 | ### Option 1: Using Make (Recommended) |
@@ -455,8 +482,8 @@ docker pull bocan/codex:latest |
455 | 482 |
|
456 | 483 | **Available tags**: |
457 | 484 | - `latest` - Latest stable release |
458 | | -- `2.7.0` - Specific version (example) |
459 | | -- `2.7` - Minor version (example) |
| 485 | +- `2.16.0` - Specific version (example) |
| 486 | +- `2.16` - Minor version (example) |
460 | 487 | - `2` - Major version (example) |
461 | 488 |
|
462 | 489 | **Image verification** (signed with Cosign): |
@@ -523,6 +550,9 @@ docker stop codex && docker rm codex |
523 | 550 | **Volume Mounting**: |
524 | 551 | - `./data:/app/data` - Persists your wiki data outside the container |
525 | 552 |
|
| 553 | +**Templates on first run**: |
| 554 | +- The Docker image includes built-in starter templates; on first startup, if `data/templates/` is missing or empty, Codex will copy the defaults into it. |
| 555 | + |
526 | 556 | ### Authentication in Docker |
527 | 557 |
|
528 | 558 | **Important**: Due to secure cookie requirements, there are two ways to run Codex with authentication: |
@@ -1007,31 +1037,31 @@ The TOC appears as a floating widget on the right side of the preview pane when |
1007 | 1037 | ## 💻 Tech Stack |
1008 | 1038 |
|
1009 | 1039 | ### Backend |
1010 | | -- **[Express](https://expressjs.com/)** `^4.18.2` - Fast, unopinionated web framework |
| 1040 | +- **[Express](https://expressjs.com/)** `^5.2.1` - Fast, unopinionated web framework |
1011 | 1041 | - **[TypeScript](https://www.typescriptlang.org/)** `^5.3.3` - Type-safe JavaScript |
1012 | | -- **[CORS](https://www.npmjs.com/package/cors)** `^2.8.5` - Cross-origin resource sharing |
| 1042 | +- **[CORS](https://www.npmjs.com/package/cors)** `^2.8.6` - Cross-origin resource sharing |
1013 | 1043 | - **[ts-node-dev](https://www.npmjs.com/package/ts-node-dev)** `^2.0.0` - Development server with auto-reload |
1014 | 1044 |
|
1015 | 1045 | **Testing:** |
1016 | | -- **[Jest](https://jestjs.io/)** `^29.7.0` - Testing framework |
1017 | | -- **[Supertest](https://www.npmjs.com/package/supertest)** `^6.3.3` - HTTP assertion library |
| 1046 | +- **[Jest](https://jestjs.io/)** `^30.2.0` - Testing framework |
| 1047 | +- **[Supertest](https://www.npmjs.com/package/supertest)** `^7.2.2` - HTTP assertion library |
1018 | 1048 | - **[ts-jest](https://www.npmjs.com/package/ts-jest)** `^29.1.1` - TypeScript preprocessor for Jest |
1019 | 1049 |
|
1020 | 1050 | ### Frontend |
1021 | | -- **[React](https://reactjs.org/)** `^18.2.0` - UI library |
| 1051 | +- **[React](https://reactjs.org/)** `^19.2.4` - UI library |
1022 | 1052 | - **[TypeScript](https://www.typescriptlang.org/)** `^5.3.3` - Type-safe JavaScript |
1023 | | -- **[Vite](https://vitejs.dev/)** `^5.0.11` - Next-generation frontend tooling |
1024 | | -- **[React Markdown](https://www.npmjs.com/package/react-markdown)** `^9.0.1` - Markdown renderer |
| 1053 | +- **[Vite](https://vitejs.dev/)** `^7.3.1` - Next-generation frontend tooling |
| 1054 | +- **[React Markdown](https://www.npmjs.com/package/react-markdown)** `^10.1.0` - Markdown renderer |
1025 | 1055 | - **[remark-gfm](https://www.npmjs.com/package/remark-gfm)** `^4.0.0` - GitHub Flavored Markdown |
1026 | | -- **[Axios](https://axios-http.com/)** `^1.6.5` - HTTP client |
| 1056 | +- **[Axios](https://axios-http.com/)** `^1.13.4` - HTTP client |
1027 | 1057 |
|
1028 | 1058 | **Testing:** |
1029 | | -- **[Vitest](https://vitest.dev/)** `^1.1.3` - Unit test framework |
| 1059 | +- **[Vitest](https://vitest.dev/)** `^4.0.18` - Unit test framework |
1030 | 1060 | - **[Testing Library](https://testing-library.com/)** - React testing utilities |
1031 | | -- **[jsdom](https://www.npmjs.com/package/jsdom)** `^23.2.0` - DOM implementation |
| 1061 | +- **[jsdom](https://www.npmjs.com/package/jsdom)** `^28.0.0` - DOM implementation |
1032 | 1062 |
|
1033 | 1063 | ### Development Tools |
1034 | | -- **[Concurrently](https://www.npmjs.com/package/concurrently)** `^8.2.2` - Run multiple commands |
| 1064 | +- **[Concurrently](https://www.npmjs.com/package/concurrently)** `^9.2.1` - Run multiple commands |
1035 | 1065 | - **ESLint** - Code linting |
1036 | 1066 | - **Prettier** - Code formatting (optional) |
1037 | 1067 |
|
|
0 commit comments