Personal session log. One page: write a line, see recent entries.
git clone https://github.com/KoalaLoveTree/session-log.git
cd session-logLive (your log):
cp .env.example .env
docker compose up --buildOpen http://localhost:3000. On a phone on the same Wi‑Fi: http://<lan-ip>:3000 (on the PC, hostname -I).
Test (other data, same code):
cp .env.test.example .env.test
docker compose --env-file .env.test up --buildOpen http://localhost:3001. Both can run at once.
Optional. After live compose works, a user systemd unit can start it at boot.
Write ~/.config/systemd/user/session-log.service. Set WorkingDirectory to this clone:
[Unit]
Description=session-log live compose stack
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/path/to/session-log
ExecStart=/usr/bin/docker compose up -d
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable --now session-log.service
loginctl enable-lingerYour user needs to be able to run docker (often the docker group). Docker itself should start at boot (systemctl enable docker).
Linger starts your user services at boot, even at the login screen, before anyone unlocks the session.
cd api
cargo fmt
cargo clippy -- -D warningsmake build-live
make build-test
make test
make covmake build-live builds and starts the live site on port 3000. make build-test does the same for the test site on port 3001. Both stay running in the background.
make test starts the test database when it is down, then runs cargo test in api/. Postgres listens on 127.0.0.1:5433. Tests create their own databases; they do not write your log.
make cov runs those same tests under cargo llvm-cov and writes api/target/llvm-cov/html/index.html. It then prints a file:// link; click that to open the report. The site on port 3000 does not serve it. Coverage needs the llvm-tools-preview rustup component and cargo-llvm-cov (cargo install cargo-llvm-cov --locked).
SPEC.md— how the modules meet (api/SPEC.mdroutes,web/SPEC.mdscreen)TICKETS.md— work queue- http://localhost:3000/api/docs — API (Swagger)
GitHub Actions (ci) runs fmt, clippy, the tests under cargo llvm-cov, and cargo build on push. The job log prints the coverage summary. A failing test fails the job.
