|
| 1 | +<p align="center"> |
| 2 | + <img src="docs/images/logo.png" alt="JustWiki Logo" width="480"> |
| 3 | +</p> |
| 4 | + |
| 5 | +# JustWiki |
| 6 | + |
| 7 | +A lightweight, self-hosted wiki for small teams. Just clone, run, and write. |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +- **Markdown first** — Milkdown WYSIWYG editor with slash commands, Mermaid diagrams, KaTeX math, callout blocks |
| 12 | +- **One SQLite file** — no external database needed. Backup = copy one file |
| 13 | +- **Full-text search** — FTS5 powered, with optional AI Q&A (Gemini) |
| 14 | +- **Version history** — page revisions with diff view |
| 15 | +- **Draw.io integration** — embedded diagram editor |
| 16 | +- **Themes** — multiple built-in themes |
| 17 | +- **PWA ready** — installable on mobile and desktop |
| 18 | +- **Docker support** — `docker-compose up` and done |
| 19 | + |
| 20 | +## Tech Stack |
| 21 | + |
| 22 | +| Layer | Stack | |
| 23 | +| -------- | ---------------------------------------------- | |
| 24 | +| Backend | Python, FastAPI, aiosqlite, Pydantic | |
| 25 | +| Frontend | React 19, Vite, Tailwind CSS 4, Zustand | |
| 26 | +| Editor | Milkdown (ProseMirror) | |
| 27 | +| Database | SQLite (single file) | |
| 28 | +| Deploy | Docker Compose | |
| 29 | + |
| 30 | +## Quick Start |
| 31 | + |
| 32 | +### Docker (recommended) |
| 33 | + |
| 34 | +```bash |
| 35 | +cp .env.example .env |
| 36 | +# edit .env — at minimum change SECRET_KEY and ADMIN_PASS |
| 37 | +docker-compose up -d |
| 38 | +``` |
| 39 | + |
| 40 | +Open http://localhost:3000 |
| 41 | + |
| 42 | +### Local Development |
| 43 | + |
| 44 | +```bash |
| 45 | +make setup # install backend & frontend dependencies, create .env |
| 46 | +make dev # start backend (port 8000) + frontend (port 3000) |
| 47 | +``` |
| 48 | + |
| 49 | +Requires: Python 3.11+, Node.js 20+, [uv](https://docs.astral.sh/uv/) |
| 50 | + |
| 51 | +## Configuration |
| 52 | + |
| 53 | +All settings live in a single `.env` file. See [.env.example](.env.example) for available options. |
| 54 | + |
| 55 | +Key variables: |
| 56 | + |
| 57 | +| Variable | Description | Default | |
| 58 | +| --------------- | ---------------------------------- | -------------------- | |
| 59 | +| `SECRET_KEY` | Session signing key | `change-me-...` | |
| 60 | +| `ADMIN_USER` | Admin username | `admin` | |
| 61 | +| `ADMIN_PASS` | Admin password | `admin` | |
| 62 | +| `DB_PATH` | SQLite database path | `./data/just-wiki.db`| |
| 63 | +| `AI_ENABLED` | Enable Gemini AI Q&A | `false` | |
| 64 | +| `GEMINI_API_KEY`| Gemini API key (when AI enabled) | | |
| 65 | + |
| 66 | +## Makefile Commands |
| 67 | + |
| 68 | +```bash |
| 69 | +make dev # Start backend + frontend in dev mode |
| 70 | +make dev-backend # Start backend only |
| 71 | +make dev-frontend # Start frontend only |
| 72 | +make build # Build frontend for production |
| 73 | +make backup # Backup SQLite database with timestamp |
| 74 | +make clean # Remove database, media, and frontend dist |
| 75 | +make docker-up # docker-compose up -d |
| 76 | +make docker-down # docker-compose down |
| 77 | +make setup # First-time setup (install deps, create .env) |
| 78 | +``` |
| 79 | + |
| 80 | +## Project Structure |
| 81 | + |
| 82 | +``` |
| 83 | +just-wiki/ |
| 84 | +├── backend/ # FastAPI REST API |
| 85 | +│ └── app/ |
| 86 | +│ ├── main.py |
| 87 | +│ ├── routers/ # pages, search, media, tags, versions, ... |
| 88 | +│ └── services/ # markdown, search, AI, webhook, export |
| 89 | +├── frontend/ # React SPA (Vite) |
| 90 | +│ └── src/ |
| 91 | +│ ├── components/ |
| 92 | +│ │ ├── Editor/ # Milkdown editor |
| 93 | +│ │ ├── Viewer/ # Markdown renderer |
| 94 | +│ │ ├── Search/ # Search + AI Q&A |
| 95 | +│ │ └── Layout/ # Sidebar, Navbar |
| 96 | +│ ├── pages/ |
| 97 | +│ ├── hooks/ |
| 98 | +│ └── store/ # Zustand |
| 99 | +├── data/ # Runtime data (SQLite, media) |
| 100 | +├── docker-compose.yml |
| 101 | +├── Makefile |
| 102 | +└── .env.example |
| 103 | +``` |
| 104 | + |
| 105 | +## License |
| 106 | + |
| 107 | +This project is licensed under the [MIT License](LICENSE). |
0 commit comments