User guide

Documents and papers

On this page: What a document is · Adding a document · Attaching · The boat's papers · A document's page · Open · Files and sync · Photos as documents · Documents in the export · Documents and assistants · Checklists

The previous owner's folder is the thing you are most grateful for and least able to use: the manual for a pump that was replaced, three insurance certificates, a survey from 2019, receipts in no order. A document in LazyJack is any of those, kept with the record it concerns instead of in a folder: the manual on the engine, the receipt on the job, the certificate on the boat. This chapter covers what a document holds, how it is attached, how the boat's papers are shown, and what happens to a file between your phone and the server. Checklists, which sit beside documents in the Boat area, close the chapter.

What a document is

A document is a record with a title and a type. It holds one of three things:

A document never holds a file and a link at once. When the add form is given both, the file is kept and the link dropped. The edit form offers Link only while the document has no file.

A document also has an optional Date (when it was captured or issued), an optional expiry (reported on Today as it approaches, see Expiry on Today), tags typed comma separated, a description, and the records it is attached to (see Attaching). The Documents search looks at the title, the type, the tags, the description and the names of what it is attached to.

The types

Photo, Manual, Receipt, Warranty, Certificate, Registration, Insurance, Ownership, Licence, Survey, Inspection, Service record, Link, Note and Other. A new document is Other until you choose. Registration, Insurance, Ownership and Licence are the boat's papers; Certificate and Survey can be (see The boat's papers). The add and edit forms' Type list spells the first one "Photograph"; every other screen says "Photo".

The Documents list has Type chips: Photos, Manuals, Receipts, Papers (Registration, Insurance, Ownership, Licence, Certificate and Survey) and Other (everything else). Papers counts a certificate or survey wherever it is attached, while the boat's Papers section on Boat details counts one only when it is attached to nothing but the boat. A chip is offered only while it would narrow the list, and the one you chose is remembered until you leave Documents. A row's small line gives the type, then what the document is attached to, then the file name; an attachment named like the document's own title is left out ("Photo · IMG_1193.jpg"). On a wide screen (1100 pixels or more) the list is a table instead, with columns Document, Type, Attached to, Date and State and the same Open button and More menu; it leaves out the file name.

Adding a document

Three ways in, one form, Add document:

The form asks Title, Type and Upload file first, because that is what a capture at the boat needs. More details holds Attach to, Date, Expires, Link, Tags and Description, and stays open for the rest of the session once opened. The button says "Save & upload" with a file and "Add document" without one. Offline, the form says the file is kept on the device until it can upload.

Size and photos

LimitValue
Largest file25 MB
A photo's longer side, after shrinking2,560 px
The boat's photo's longer side1,600 px
Records one document can be attached to50

A photo is made smaller on the device before it is saved. A phone camera's picture is often over 25 MB, so the app redraws it as a JPEG with its longer side at most 2,560 px, still readable for a receipt or a manual page. A photo already that small, or one that would not get smaller, is kept as it is.

Attaching

The folder's problem was that a receipt is about three things at once: the job, the engine and the money. In LazyJack one document attaches to many records, and a record has many documents, so the invoice for an impeller change sits on the job, the engine and the expense without being copied.

A document attaches to the boat, equipment, an item, a plan, a job, a trip, a problem, a project, an expense or a person.

A document attached to nothing is one of the boat's own documents. Its row on the Documents page names no record, and its page says "Nothing: it is one of the boat's own documents." Attaching it to the boat means the same.

A record can be attached to a document only once. A newly attached record must be active; one archived after it was attached stays attached, marked archived.

An attached document keeps its record from being deleted. Deleting equipment that a manual is attached to is refused until the manual is detached. Archiving is not affected.

The boat's papers

Some documents are about the boat herself rather than anything on her: registration, insurance, ownership, the licence, a survey. Boat details (opened from the boat's name at the top of the sidebar or the phone's header) shows those in a Papers section. It is a view of your documents: a paper is a document with one of those types.

Expiry on Today

Today reports any active document with an expiry, a paper or not.

ExpiryOn TodaySays
PassedDo first"Document has expired"
Within 30 daysDo first"Expires 3 Oct"
Within 90 daysSoon"Expires 3 Oct"

The expiry is a day. A document is still valid all through its expiry day, and counts as expired from the next day. Boat details and the document's page say "Expired" by the same rule.

A warranty is not a paper to renew. Its end is only ever in Soon, within 90 days. Once it has ended, Today no longer reports it.

The row opens the document's page.

A document's page

Every way to a document opens its page: the Documents list, a Documents section, Papers, Today, the search and the activity list.

The edit form changes the details only; the file is changed from the page. Replace file removes the current file and uploads the new one in one change. Remove file asks first, then removes the file and keeps the document, its details and its attachments; the page then says "File removed." and offers Add a file.

Open

Open fetches the file from the server and then does the sensible thing for its kind: shows it if the browser can, saves it if the browser cannot.

FileWhat Open does
PDF; PNG, JPEG, GIF or WebP image; plain textShows it in a new tab, in the browser's own viewer
Anything else (Word, a spreadsheet, a ZIP, HTML, SVG)Saves it to the device

The browser has nothing to show a Word file or a spreadsheet with, so those are saved and opened from the device's files. A web page or an SVG is saved on purpose: shown inside LazyJack it could run as part of the app. A phone behaves the same way.

Open needs a connection: the file is fetched each time and not kept for offline use. A link's Open goes to the address in a new tab.

Files and sync

A photo taken at the boat with no signal has a longer journey than the record it belongs to. The document syncs like any change; the file waits on the device until it can be uploaded, and the app keeps it safe meanwhile.

What you seeWhat it meansWhat to do
"Waiting to upload"The file is on this device, not uploaded yetNothing; it uploads when it can
"Upload failed", on the row, the page and in Do firstThe server refused the fileTry again under Sync and backup if it is listed there; otherwise Add a file on the document's page
"File removed"The file was removedAdd a file to have one again
"Image not available offline."An image viewed offlineLook again online

Discarding a queued file removes it from the device. The document stays and says "File removed.", the same as after Remove file, and Today does not report it. "Upload failed" is only for a file the server refused.

Photos as documents

Photos taken elsewhere in the app are documents too:

Lists show a small copy of a photo, made by the server from a JPEG, PNG or WebP file and kept on this device, so a list it has shown before still shows its photos offline. A photo in another format shows the row's icon.

Documents in the export

Download a copy under Sync and backup puts every document in data.json, with what it is attached to, and every active file under files/ in the zip. The readable index.html links the files it can show safely (PDF, PNG, JPEG, GIF, WebP, plain text) and names the others. Without files leaves the files out; a file that could not be read is listed in MISSING_FILES.txt.

Documents and assistants

A connected assistant can add a document (document_create, a link or a file), upload a file (asset_upload, asset_import_from_url, or an upload link you open on your phone, asset_upload_link_create), attach a document to any record (document_attach) and read one with the names of what it is attached to (document_get, document_list). It can also read the text of a PDF, plain-text or Markdown file page by page (document_read_text) and search inside all your files (document_search_text); a scanned PDF has no text to read. Detaching, archiving and removing a file need the archive permission and your approval each time; attaching does not. See Assistants.

Rules for assistants

  1. Attach, do not duplicate. document_list or search finds a document that exists; document_attach links it to another record. A document_create that looks like one already there answers with warnings: read them to the owner before going on.
  2. Attach on create. document_create takes attachedTo ({ type, id } pairs); a document for the engine's manual is attached to the engine in the same call, not created loose and attached later.
  3. A document attached to nothing is the boat's own. Do not attach a paper to the boat record to "file" it; Registration, Insurance, Ownership and Licence are papers by their kind, wherever they are attached.
  4. An expiry is a plain day (2027-05-03): send it so, and Today reports it from 30 days before.
  5. A file on the owner's phone reaches the server through asset_upload_link_create: send the owner the link to open on the phone; never ask them to paste a file into the chat. A file at a web address goes through asset_import_from_url called with document (title, kind, attachedTo) and a requestKey: the document is created only once the file has arrived, so a link that fails leaves no empty document, and a retry with the same key makes no second one. document_list takes attachedTo ({ type, id }, any record kind) to read what is filed on one record.
  6. Detaching, archiving and removing a file need approval. Attaching does not. Do not ask for approval unprompted.
  7. Checklists: an outline is plain lines, a line ending in ":" or a Markdown heading opens a section, and items is the structured form. Never complete or cancel a run (checklist_run_complete, checklist_run_abandon) unless the owner asks for exactly that; ticking items the owner reports done (checklist_run_update_item) is fine.

Checklists

A checklist is the list you run through before leaving, after arriving, or starting the engine on a cold morning: the things that are easy to forget precisely because they are routine. Checklists are a view in the Boat area, and a run of one belongs to the trip or the job it was started for. The first run's step 4 adds four ready-made ones: Before departure, On arrival, Engine start and Winter lay-up.

Add checklist asks a title, When is it used? and an Outline, previewed as you type.

When is it used?Where it appears
Before departureA planned trip's Prepare section and Today's trip card
On arrivalEnd trip offers "Start arrival checklist"
EngineA button on Today
Other (the default)A button on Today

The outline is plain text, one item per line. A line ending in ":" opens a section, and the lines under it belong to it until the next section at the same or a shallower indent. A Markdown heading ("# Winter lay-up", "## Engine") opens a section too, "##" inside the "#" above it. A leading "-", "*", "1." or "[ ]" is stripped, so a pasted list works as it is. A checklist needs at least one item.

The Checklists page lists checklists by title, each row ending with when it is used (nothing for Other). The row opens the checklist's form; Start is its button.

Running one

Start begins a run, a copy of the checklist to work through.

The page shows In progress runs first and Recently done last. A run left in progress for two days is reported in Do first on Today until it is completed or cancelled. Checklists also appear on a plan (What each job needs) and its job's page, where a run is started for that job, and in a trip's Prepare section.

Not in this chapter

Records, Archive and Delete: How LazyJack thinks. What an assistant may do: Assistants. Boat details: Setting up the boat and engine. Prepare and the trip's checklists: A trip. Documents on jobs and problems: Work. Receipts on Received: Inventory and To buy. Invoices on expenses: Budget and projects. Files in a backup and restoring them: Backup, restore and moving devices. Refused changes: Troubleshooting sync.

This chapter as Markdown · llms.txt