Overview
The core user action is uploading a land document for analysis. The upload page must provide clear feedback on file acceptance, validation errors, and upload progress. A good upload experience is critical for user adoption.
Background
File to create: frontend/app/(protected)/documents/upload/page.tsx
Features:
- Drag-and-drop zone (or click to browse) — visual feedback on drag-over state
- Supported file types: PDF, PNG, JPG, JPEG, TIFF (display allowed types to the user)
- Maximum file size: 10MB (display limit to the user)
- File validation before upload: correct extension and size
- Title input field (optional custom name)
- Organization selector (optional — dropdown of orgs the user belongs to)
- Upload progress bar (use axios
onUploadProgress callback)
After upload:
- Success: redirect to the new document's detail page (
/documents/:id)
- Error: show error message inline without losing the selected file
Acceptance Criteria
Overview
The core user action is uploading a land document for analysis. The upload page must provide clear feedback on file acceptance, validation errors, and upload progress. A good upload experience is critical for user adoption.
Background
File to create:
frontend/app/(protected)/documents/upload/page.tsxFeatures:
onUploadProgresscallback)After upload:
/documents/:id)Acceptance Criteria