Notefix Docs See the demo site

Reference

Every setting in one place. The guides explain when you need each one.

The tag#

AttributeDefault
data-projectthe page titleThe name shown in Notefix
data-apinoneThe store's path on your site. Without it, notes stay in each browser
data-boardthe page's pathWhich board the page's notes go on
data-issuesnonequeue turns on Create an issue for a connector. Needs data-api
data-docsdocs.notefix.appWhere Settings sends people to set up a connection. off removes the links
data-themedarklight or dark
data-railtuckedpinned starts with the toolbar on screen
data-mobile-breakpoint560Below this width the toolbar and All notes move to the bottom, for a thumb
data-phoneonoff hides Notefix entirely below that width

window.NotefixConfig, set before the tag, can add functions: screen (the current screen's name), scroller (the element that scrolls) and createIssue (your own tracker).

Store#

sh
python3 server/server.py                  # run it
python3 server/server.py backup <file>    # a consistent copy, while it runs
SettingDefault
NOTES_DATA/dataFolder for the database
NOTES_DBNOTES_DATA/notefix.dbThe database file, if it should be elsewhere
NOTES_PORT8097
NOTES_BOARDSstagingBoards to make on start, separated by commas. Never removes one
NOTES_CONNECTOR_SECRETnoneRequired by connectors to change tickets, and by the notifier to read email settings. Turns on email sign-up
NOTES_ISSUE_HOSTSgithub.com,trello.com,atlassian.netSites a ticket link may point to
NOTES_CLAIM_LEASE600Seconds a connector may hold a note before another may try
NOTES_SIGNUPS_PER_HOUR30New email sign-ups a board accepts in an hour
NOTES_ALLOW_ORIGINnoneFor local development only

Connector#

sh
python3 connectors/runner.py github     # or jira, trello
SettingDefault
NOTEFIX_APIhttp://127.0.0.1:8097The store, as the connector reaches it
NOTEFIX_BOARDstagingThe board to work on
NOTEFIX_SECRETnoneThe store's NOTES_CONNECTOR_SECRET
NOTEFIX_SITEnoneThe site's address, for the link back from each ticket
NOTEFIX_LINKNOTEFIX_SITE{screen}?note={id}The link back, when your addresses are shaped differently
NOTEFIX_POLL15Seconds between looks for waiting notes
NOTEFIX_CHECK60Seconds between checks on filed tickets
NOTEFIX_GIVE_UP8Tries on one note before giving up
NOTEFIX_ONCE1 to run one pass and stop, for cron
GitHub
GITHUB_TOKENA fine-grained token with Issues: Read and write
GITHUB_REPOowner/name
GITHUB_LABELSOptional labels, separated by commas
Jira
JIRA_SITEhttps://yourteam.atlassian.net
JIRA_EMAILThe token owner's email
JIRA_TOKENAn API token
JIRA_PROJECTThe project key, like WEB
JIRA_ISSUE_TYPEOptional. Bug if the project has it, else Task
JIRA_LABELSOptional extra labels. notefix is always added
JIRA_SPRINTactive to add issues to the current sprint
Trello
TRELLO_KEYThe API key
TRELLO_TOKENThe token
TRELLO_BOARDThe board's name
TRELLO_LISTOptional. Where new cards go. The first list by default
TRELLO_DONE_LISTSOptional. Lists that mean finished. Done by default

Notifier#

sh
python3 connectors/notify.py
SettingDefault
NOTEFIX_APIhttp://127.0.0.1:8097The store
NOTEFIX_BOARDstagingThe board to watch
NOTEFIX_SITEnoneThe site's address, for links to notes
NOTEFIX_LINKNOTEFIX_SITE{screen}?note={id}The link, when addresses are shaped differently
NOTIFY_STATE./notefix-notify-<board>.jsonWhere it remembers what it announced
NOTIFY_SETTLE30Seconds a note must stay unchanged
NOTIFY_BATCH90Seconds to gather changes into one Slack message
NOTEFIX_POLL15Seconds between looks at the board
NOTEFIX_DRY_RUN1 to print messages instead of sending them
NOTEFIX_ONCE1 for one pass. For cron, also set NOTIFY_SETTLE and NOTIFY_BATCH to 0
NOTIFY_SLACK_WEBHOOKnoneA Slack incoming webhook
NOTIFY_SLACK_CHANNELnoneThe channel's name, shown in Settings. Only a label
NOTIFY_ALERTSonoff to never announce a broken connection
NOTIFY_ALERT_AFTER120Seconds a connection must stay broken before the team is told
NOTIFY_ALERT_EMAILnoneAlso email broken connections to this address. Needs the mail settings
NOTIFY_EMAIL_FROMnoneRequired for email
NOTIFY_SMTP_HOSTnoneRequired for email
NOTIFY_SMTP_PORT587, or 465 with ssl
NOTIFY_SMTP_TLSstarttlsstarttls, ssl, or none for a local test server
NOTIFY_SMTP_USER, NOTIFY_SMTP_PASSWORDnone
NOTIFY_EMAIL_PEOPLEnoneA file of people to email
NOTIFY_EMAIL_BATCH600Seconds to gather changes into one email
NOTIFY_DIGEST_HOUR9Hour of the daily summary, in the server's time zone
NOTEFIX_SECRETnoneRequired for email. The store's NOTES_CONNECTOR_SECRET
NOTEFIX_PUBLIC_APInoneRequired for email. The store's https:// address as browsers reach it

Store API#

For building your own connector. Paths are relative to the store, so through the proxy they start with your data-api path.

Request
GET /health{ok, boards}
GET /<board>The whole board: notes and deletions
GET /<board>?rev=N{changed: false} if nothing changed since rev N
POST /<board>Merges the notes and deletions sent, and returns the board
GET /<board>/issuesEvery note waiting to be filed, in full
POST /<board>/notes/<id>/claimTake a note before filing it. 409 if another connector has it, or if the note's issue.to names another tracker
POST /<board>/notes/<id>/filedThe ticket exists: {by, ref, url, ext}. The note stays open
POST /<board>/notes/<id>/doneThe ticket was closed. The note is marked done
POST /<board>/notes/<id>/reopenThe ticket was reopened. The note opens again
POST /<board>/connectorsA connector says what it is and how it is doing: {every, items: [{kind, role, target, ok, problem}]}. role is issues or messages; problem is key, missing, offline, setup or other
GET /<board>/connectionsWhat Settings shows: each connection with its state (working, problem, stopped or paused) and url
POST /<board>/connections/<kind>/pause{paused: true} or {paused: false}, for the whole board. A paused tracker's claims are refused

With NOTES_CONNECTOR_SECRET set, the four notes/<id>/… requests and POST /<board>/connectors need the header Authorization: Bearer <secret>.

Merging: for each note, the copy with the newer updated time wins. A deletion is kept as deleted[id] = time, and removes any copy of the note not updated after it.