Worklog is a lightweight hourly logging tool.
- Frontend: static app (
index.html,css/,js/) - Backend: single Node.js service (
backend/)- REST API for logs
- batched outbound sync to
StudioVibi/worklogs - inbound GitHub poller (
head > last_seen) to import external changes - GitHub OAuth authentication restricted to StudioVibi org members
- Database: PostgreSQL (source of truth)
GitHub is an asynchronous mirror; writes go to DB first.
The frontend is static and can be served from any static host.
Optional API base override in browser:
localStorage.setItem('worklog_api_base', 'https://your-backend-url')If unset, the app uses same-origin API paths.
From /Users/lorenzobattistela/work/worklog/backend:
- Copy
.env.exampleto.envand fill values (DATABASE_URL,GITHUB_PAT, etc).
- Also set
GITHUB_OAUTH_CLIENT_ID,GITHUB_OAUTH_CLIENT_SECRET,GITHUB_ALLOWED_ORG,SESSION_SECRET.
- Install dependencies:
npm install- Run DB migrations:
npm run migrate- Start server:
npm run devDefault backend address is http://localhost:8787.
- Outbound batch sync: every 15 minutes (
SYNC_OUTBOUND_CRON) - Inbound poller: every 10 minutes (
SYNC_INBOUND_CRON)
Both jobs run in the same backend process with Postgres advisory locks.