Initial commit.

This commit is contained in:
2025-08-18 17:14:54 +02:00
commit 9d1623c739
19 changed files with 2129 additions and 0 deletions

79
README.md Normal file
View File

@@ -0,0 +1,79 @@
# PKM — Milestone 0 (Project Scaffolding)
Minimal Flask app with Tailwind + DaisyUI and a welcome page that reads the vault path from configuration.
## Prerequisites
- Python 3.9+
- Node.js 18+ (for Tailwind CLI)
- SQLite (system-provided; FTS5 required later, not needed in M0)
## Setup
### 1) Python environment
```bash
python -m venv .venv
# macOS/Linux
source .venv/bin/activate
# Windows PowerShell
# .venv\\Scripts\\Activate.ps1
pip install -r requirements.txt
```
Optionally install as a package:
```bash
pip install -e .
```
### 2) Node dependencies and CSS build
```bash
npm install
# One-time build
npm run build:css
# Or during development (in a separate terminal), watch for changes:
npm run watch:css
```
### 3) Configure vault path
Create a `.env` from the example and set your vault directory:
```bash
cp .env.example .env
# edit .env and set KB_VAULT_PATH
```
Alternatively, pass the vault path via the CLI when starting the server.
## Run the app
Option A — via Flask CLI (loads `create_app` automatically):
```bash
# Ensure .env is present or set KB_VAULT_PATH in env
flask --app app run --debug
```
Option B — via provided CLI:
```bash
# Using .env
python cli.py run
# Or pass vault explicitly
python cli.py run --vault /path/to/vault
```
Then open:
```
http://127.0.0.1:5000/
```
You should see:
- A welcome card with your configured vault path (or a warning if not set).
- Tailwind + DaisyUI styles active.
- A theme selector (light/dark/cupcake) in the navbar.
## Development tips
- Run `npm run watch:css` while you work on templates for live CSS rebuilds.
- If you rename template paths, update `tailwind.config.cjs` content globs.
- Keep `app/static/css/app.css` out of git (its built output).
## Next steps (Milestone 1+)
- Implement note model, vault FS access, and basic CRUD.
- Add markdown rendering, sanitization, and set up the SQLite schema for indexing.