From 24c0b5fa5237793b5f3240166f8f7cb57f1cf5cf Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Fri, 17 Oct 2025 21:56:54 +0200 Subject: [PATCH] add tmux workflow for local dev --- README.md | 10 ++++++++++ papercrate.tmux | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 papercrate.tmux diff --git a/README.md b/README.md index 0440512..cd62ecc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,15 @@ # Papercrate +## Local Development + +Use the provided `papercrate.tmux` to spin up the full stack in one tmux session: + +```bash +tmux -f papercrate.tmux attach +``` + +This creates windows for the compose stack, frontend dev server, backend API, and background worker using the repository-relative paths defined in the tmux file. Detach with `Ctrl+b d` and reattach later with the same command. + ## Backend Integration Tests Integration tests require a running Postgres instance (and, optionally, Quickwit for OCR indexing). The repository includes a lightweight compose file for local runs: diff --git a/papercrate.tmux b/papercrate.tmux new file mode 100644 index 0000000..c3289c2 --- /dev/null +++ b/papercrate.tmux @@ -0,0 +1,11 @@ +# tmux session for Papercrate dev stack +new-session -d -s papercrate -n docker -c . 'docker compose up' + +new-window -t papercrate:1 -n frontend -c ./frontend 'npm run dev' + +new-window -t papercrate:2 -n backend -c ./backend 'cargo run --bin backend' + +new-window -t papercrate:3 -n worker -c ./backend 'cargo run --bin worker' + +select-window -t papercrate:0 +attach-session -t papercrate