Requirement EPIC
- Epic
- MVP1 · E2 · Document upload to S3
- Goal
- files go from the browser straight to a private S3 bucket, safely.
- Stories in this module
- 5
UPLOAD-V1-E2-01 S3 bucket and IAM
Size SUpload
- AC1The bucket has Block Public Access on, encryption on (SSE-S3), versioning off and a lifecycle rule that deletes objects after 30 days.
- AC2CORS allows PUT and GET only from
https://01scale.com and localhost. - AC3The app's IAM credentials allow only
s3:PutObject, s3:GetObject, s3:DeleteObject and s3:HeadObject on this bucket, documented in docs/infra/s3.md.
UPLOAD-V1-E2-02 Presigned upload URL
Size MUpload; composed by the DocFlow app
- AC1
POST /api/upload/v1/files with {file_name, mime, size} returns a presigned PUT URL valid for 5 minutes, with key users/{userId}/{fileId}/original.{ext}. - AC2Requests for file types other than PDF/PNG/JPG, or over 10 MB, are rejected with a clear message before any URL is issued.
- AC3A file record is created with status
pending_upload.
UPLOAD-V1-E2-03 Upload confirmation and checks
Size SUpload; composed by the DocFlow app
- AC1
POST /api/upload/v1/files/{fileId}/complete confirms the object exists (HeadObject) and its size matches. - AC2The file's first bytes are checked to confirm the real type. A mismatch, or a PDF over 10 pages, marks the file
rejected and deletes the object. - AC3If it passes, the file's status becomes
ready and file.uploaded is audited. In DocFlow, the app then queues extraction (E3).
UPLOAD-V1-E2-04 Upload page UI
Size MUpload (UI component), used by the DocFlow app
As Priya, I want to drag and drop or pick a file on my phone and see progress.
- AC1Drag and drop on desktop and the file picker on mobile both work, including the camera option on phones.
- AC2A progress bar shows upload percentage. On failure I see a retry button and a plain-language error.
- AC3Once the file is uploaded and checked, the upload screen shows its preview (Upload's
FilePreview component) while extraction starts in the background; "Continue" takes me to the document's extraction page, which shows the same preview beside the fields (Nikhil's decision on PR #65).
DOCFLOW-V1-E2-05 Documents list
Size SDocFlow app, plus Upload
- AC1
/documents lists my documents with name, date, status chip (Uploaded / Extracting / Needs review / Ready to pay / Paid) and a link to the next action. - AC2Empty state: "Upload your first invoice", with a sample invoice a hiring manager can use.
All DocFlow V1 epics and stories on GitHub →
All Upload V1 epics and stories on GitHub →