The Upload page is how data gets into the system. Drag an Excel file in; the platform parses it, shows you a preview, flags duplicates, and inserts only what’s new.Documentation Index
Fetch the complete documentation index at: https://docs.appliedaifoundation.org/llms.txt
Use this file to discover all available pages before exploring further.

How it works
Pick a vessel

- Existing vessel — pick from the fleet dropdown. The dropdown shows vessel type and DWT for confirmation.
- New vessel — enter IMO (7 digits), name, DWT. The vessel is registered before the upload runs.
Drop the file

.xlsx or .xls file onto the dashed zone or click to open a file picker. The platform reads the filename and size; nothing is uploaded yet.Parse & preview

/api/upload/consumption?action=preview and shows you:- Column count and total rows
- Date range covered (start → end)
- Valid rows ready to insert
- Duplicate detection — rows that already exist (by IMO + timestamp) and will be skipped
- The first 10 rows of data, so you can sanity-check column mapping
Confirm
Once the preview looks right, click Upload N Rows. The platform inserts the new rows into Postgres, leaving duplicates alone.
Validation rules
The parser enforces:- File must be
.xlsxor.xlsand under 50 MB - A
timestampUtccolumn is required (no row without a valid timestamp is inserted) - Timestamps are parsed as UTC — Excel local-time serials are converted
- Duplicate detection key:
imo+timestampUtc
Source
UI insrc/app/upload/. Server-side parsing in src/lib/utils/excelParser.ts. API route at src/app/api/upload/consumption/route.ts.