import { PageHeader } from '@/components/shared/page-header'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; export default function DataImportPage() { return (
Available imports today Run from the command line until the UI catches up.

Berths from NocoDB:

                pnpm tsx scripts/import-berths-from-nocodb.ts --apply --port-slug port-nimara
              

Idempotent. Skips rows where updated_at > last_imported_at unless you pass --force. Add --update-snapshot to also rewrite{' '} src/lib/db/seed-data/berths.json.

Storage backend migration:

                pnpm tsx scripts/migrate-storage.ts
              

Run after switching system_settings.storage_backend in System Settings.

Seed (rebuild dev fixtures):

                pnpm db:seed
              
What this page will become Planned UI for self-serve imports.
  • Drag-and-drop CSV / XLSX upload with column-mapping UI.
  • Dry-run preview that shows new vs. matched-existing rows before commit.
  • Conflict-resolution choices (skip, update, dedup-by-email) per import type.
  • Per-port import history with rollback.
  • Templates for clients, yachts, companies, berths, reservations, expenses.

Imports run against the BullMQ import queue (concurrency 1) so partial failures don’t leave the database half-loaded.

); }