Notes are saved as markdown pages in a Nextcloud collective via the Collectives OCS API (page metadata/creation) and WebDAV (content read/append), following the same npm-workspaces + session-auth architecture as CityTracker. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NvmYFQSMqs2N3q2zUDNTVn
35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
# Notes
|
|
|
|
A small PWA for jotting down short notes while reading — e.g. an interesting sentence from a book. Each note can optionally be tagged with a book/topic (existing or new) and a page number. Notes are saved as markdown directly into pages of a Nextcloud **Collective**, one page per book/topic, nested under a parent page (default: "Reading Notes"). Untagged notes are appended to that parent page itself.
|
|
|
|
## Stack
|
|
|
|
npm workspaces monorepo:
|
|
|
|
- `shared/` — TypeScript types & Zod schemas shared by client and server
|
|
- `server/` — Express API: session auth, and a Nextcloud integration that talks to both the Collectives OCS API (page metadata/creation) and WebDAV (page content read/append)
|
|
- `client/` — React + Vite PWA
|
|
|
|
## Setup
|
|
|
|
1. Copy `.env.example` to `.env` and fill in:
|
|
- `SESSION_SECRET`, `ADMIN_USERNAME`, `ADMIN_PASSWORD` — the app's own login
|
|
- `NEXTCLOUD_URL`, `NEXTCLOUD_USERNAME`, `NEXTCLOUD_APP_PASSWORD` — generate an app password under Nextcloud Settings → Security → App passwords
|
|
- `COLLECTIVE_NAME` — the exact name of an existing collective the user has access to
|
|
2. Install dependencies: `npm install`
|
|
3. Run in dev mode: `npm run dev` (client on `http://localhost:5173`, proxies `/api` to the server on port 3000)
|
|
|
|
## Build & run
|
|
|
|
```
|
|
npm run build
|
|
npm run start
|
|
```
|
|
|
|
## Docker
|
|
|
|
```
|
|
docker compose up --build
|
|
```
|
|
|
|
Reads secrets from `.env` in the project root (same variables as above).
|