Finca Audio Phase 2 - Technical Task Breakdown
Executive Summary
Project: Extend Finca Audio with report editing, sharing, attachments, PDF export, projects, and file organization.
Team: 2 senior developers
Stage Dependencies & Parallelization
┌─────────────────────────────────────────────────────────────┐
│ PARALLEL TRACK A PARALLEL TRACK B │
│ ───────────────── ───────────────── │
│ Stage 0 (Report Fixes) Stage 1 (Attachments) │
│ │ Stage 2 (Report Sharing) │
│ ▼ │ │
│ Stage 3 (PDF Export) │ │
│ │ │ │
│ └─────────┬───────────────┘ │
│ ▼ │
│ Stage 4 (Projects) │
│ │ │
│ ▼ │
│ Stage 5 (Project RBAC) │
│ │ │
│ ▼ │
│ Stage 6 (File Organization) │
└─────────────────────────────────────────────────────────────┘
User Stories
| ID | Story | Stage |
|---|---|---|
| US-0.1 | As a user, I can see all tabs including Metadata for reports with custom fields | 0 |
| US-0.2 | As a user, I see custom fields rendered as readable text, not raw JSON | 0 |
| US-0.3 | As a user, I can edit custom fields in reports just like standard fields | 0 |
| US-1.1 | As an admin, I can attach reference documents to prompt templates | 1 |
| US-1.2 | As a user, analyses using templates with attachments include that context | 1 |
| US-2.1 | As an admin, I can grant specific users read-only access to specific reports | 2 |
| US-2.2 | As a report viewer, I can only see reports I’ve been granted access to | 2 |
| US-2.3 | As a report viewer, I can view source files for reports I have access to | 2 |
| US-3.1 | As a user, I can export any report as a professional PDF | 3 |
| US-4.1 | As a user, I can organize my work into projects | 4 |
| US-4.2 | As a user, I can switch between projects and see only that project’s content | 4 |
| US-5.1 | As an admin, I can control who has access to which projects | 5 |
| US-5.2 | As a project viewer, I can see but not edit project content | 5 |
| US-6.1 | As a user, I can organize files into folders within a project | 6 |
| US-6.2 | As a user, I can control file visibility (private/project/org) | 6 |
Stage 0: Report Fixes
Goal: Fix three bugs blocking end users from fully using reports with custom fields.
Total Hours: 22-26h (including QA)
Epic 0.1: Metadata Tab Fix
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 0.1.1 | Diagnose tab visibility | Trace useTabAvailability.js logic, confirm root cause is missing custom field check | 1h | - | High |
| 0.1.2 | Fix tab availability logic | Update hasMetadata check to include custom_fields presence | 2h | 0.1.1 | High |
Files: client/src/features/multi-analysis/hooks/useTabAvailability.js
Epic 0.2: JSON Display Fix
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 0.2.1 | Audit JsonBlock rendering | Document which field types fall through to JSON.stringify | 1h | - | High |
| 0.2.2 | Improve generic field rendering | Render string fields as prose, objects as labeled sections | 3h | 0.2.1 | High |
| 0.2.3 | Add persona card component | Create PersonaCard.jsx for synthesized_personas display | 3h | 0.2.2 | Medium |
Files: client/src/features/multi-analysis/components/JsonBlock.jsx, client/src/features/multi-analysis/components/PersonaCard.jsx (new)
Epic 0.3: Custom Fields Editing
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 0.3.1 | Add custom field edit state | Extend useMultiAnalysisState with editCustomFields state | 2h | - | High |
| 0.3.2 | Create editable field component | Build EditableCustomField.jsx with textarea for JSON/text | 3h | 0.3.1 | High |
| 0.3.3 | Wire editing to OverviewTab | Add edit buttons and save handlers for custom fields | 2h | 0.3.2 | High |
| 0.3.4 | Handle nested object editing | Support editing individual fields within persona objects | 3h | 0.3.3 | Medium |
Files: client/src/features/multi-analysis/hooks/useMultiAnalysisState.js, client/src/features/multi-analysis/components/EditableCustomField.jsx (new), client/src/features/multi-analysis/components/tabs/OverviewTab.jsx
Epic 0.4: Testing & QA
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 0.4.1 | Stage 0 functional testing | Test with existing reports (Women/Men Persona Analysis), verify all fixes | 3h | 0.1.2, 0.2.3, 0.3.4 | High |
| 0.4.2 | Cross-browser QA | Test in Chrome, Firefox, Safari | 2h | 0.4.1 | Medium |
Demo Criteria: Open Women Persona Analysis report → all tabs visible → personas render as cards → can edit persona description → save persists.
Stage 1: Reference Attachments
Goal: Attach PDF/text files to prompt templates as LLM context.
Total Hours: 34-40h (including QA)
Epic 1.1: Data Model
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 1.1.1 | Design template_attachments schema | Table with template_id, file metadata, S3 key | 2h | - | High |
| 1.1.2 | Create TemplateAttachment model | SQLAlchemy model with relationship to PromptTemplate | 2h | 1.1.1 | High |
| 1.1.3 | Write Alembic migration | Create table with constraints (max 5 attachments, valid content types) | 2h | 1.1.2 | High |
Files: api/src/shared/db_models.py, api/migrations/versions/xxx_add_template_attachments.py
Epic 1.2: Backend API
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 1.2.1 | Add S3 attachment helpers | Upload/download functions in storage.py for attachments prefix | 2h | - | High |
| 1.2.2 | Upload attachment endpoint | POST /prompts/{id}/attachments - multipart upload | 4h | 1.1.3, 1.2.1 | High |
| 1.2.3 | List attachments endpoint | GET /prompts/{id}/attachments - with presigned URLs | 2h | 1.2.1 | High |
| 1.2.4 | Delete attachment endpoint | DELETE /prompts/{id}/attachments/{att_id} - remove from S3 + DB | 2h | 1.2.1 | High |
| 1.2.5 | Download attachment endpoint | GET /prompts/{id}/attachments/{att_id}/download - presigned URL | 1h | 1.2.1 | Medium |
Files: api/src/shared/storage.py, api/src/routers/prompts.py
Epic 1.3: Analysis Integration
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 1.3.1 | Fetch attachments in analysis | Load template attachments when running analysis | 2h | 1.1.3 | High |
| 1.3.2 | Include attachments in LLM call | Add PDF/text as user messages before transcript | 4h | 1.3.1 | High |
| 1.3.3 | Handle PDF base64 encoding | Convert PDF to base64 for OpenAI vision | 2h | 1.3.2 | High |
Files: api/src/handlers/analysis.py, api/src/handlers/multi_analysis.py
Epic 1.4: Frontend
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 1.4.1 | Add attachments section to editor | New card in PromptTemplateEditor for attachments | 3h | 1.2.3 | High |
| 1.4.2 | Implement file upload UI | Drag-drop or click-to-upload with validation | 3h | 1.2.2 | High |
| 1.4.3 | Attachment list with actions | Display attachments with download/delete buttons | 2h | 1.2.4 | High |
Files: client/src/pages/PromptTemplateEditor.jsx
Epic 1.5: Testing & QA
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 1.5.1 | Upload/download testing | Test file upload, S3 storage, download URLs | 2h | 1.4.3 | High |
| 1.5.2 | Analysis with attachments | Run analysis with PDF attachment, verify LLM receives context | 3h | 1.3.3 | High |
| 1.5.3 | File size/type validation | Test rejection of invalid files, size limits | 2h | 1.5.1 | Medium |
Demo Criteria: Upload PDF to template → run analysis → results reference PDF content → can download/delete attachment.
Stage 2: Report Sharing
Goal: Allow inviting users who can view specific reports but not edit.
Total Hours: 42-50h (including QA)
Epic 2.1: Data Model
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 2.1.1 | Design report_access schema | Define table with polymorphic report reference (analysis_run_id OR multi_analysis_id) | 2h | - | High |
| 2.1.2 | Create ReportAccess model | Add SQLAlchemy model in db_models.py | 2h | 2.1.1 | High |
| 2.1.3 | Write Alembic migration | Create table with indexes, constraints | 2h | 2.1.2 | High |
| 2.1.4 | Add report_viewer role | Add to UserRole enum or handle as special case | 1h | 2.1.2 | High |
Files: api/src/shared/db_models.py, api/migrations/versions/xxx_add_report_access.py
Epic 2.2: Backend API
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 2.2.1 | Create reports router | New routers/reports.py for access management endpoints | 2h | 2.1.3 | High |
| 2.2.2 | Grant access endpoint | POST /reports/{type}/{id}/access - add users to report | 3h | 2.2.1 | High |
| 2.2.3 | Revoke access endpoint | DELETE /reports/{type}/{id}/access/{user_id} | 2h | 2.2.1 | High |
| 2.2.4 | List access endpoint | GET /reports/{type}/{id}/access - list users with access | 2h | 2.2.1 | High |
| 2.2.5 | Update analysis access checks | Modify can_view_report() in analyses router for report_viewer | 3h | 2.1.4 | High |
| 2.2.6 | Update file access checks | Allow report_viewers to view files for their granted reports | 3h | 2.2.5 | High |
Files: api/src/routers/reports.py (new), api/src/routers/analyses.py, api/src/routers/files.py, api/src/deps.py
Epic 2.3: Frontend - Share Dialog
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 2.3.1 | Create ShareReportDialog | Dialog to grant/revoke access from report detail page | 4h | 2.2.4 | High |
| 2.3.2 | Add share button to AnalysisDetails | Integrate ShareReportDialog with single-file analysis | 2h | 2.3.1 | High |
| 2.3.3 | Add share button to MultiAnalysisDetails | Integrate ShareReportDialog with multi-analysis | 2h | 2.3.1 | High |
| 2.3.4 | Create UserReportsDialog | For admin panel - manage reports per user | 3h | 2.2.4 | Medium |
Files: client/src/components/ShareReportDialog.jsx (new), client/src/pages/AnalysisDetails.jsx, client/src/pages/MultiAnalysisDetails.jsx, client/src/components/UserReportsDialog.jsx (new)
Epic 2.4: Frontend - Report Viewer Experience
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 2.4.1 | Create MyReports page | List only reports user has access to | 4h | 2.2.4 | High |
| 2.4.2 | Update AppLayout for report_viewer | Conditional nav - minimal sidebar for report viewers | 3h | 2.4.1 | High |
| 2.4.3 | Hide edit actions for viewers | Remove edit/delete buttons when user is report_viewer | 2h | 2.4.2 | High |
| 2.4.4 | Update AuthContext | Handle report_viewer role, expose in context | 2h | 2.1.4 | High |
Files: client/src/pages/MyReports.jsx (new), client/src/components/layout/AppLayout.jsx, client/src/contexts/AuthContext.jsx
Epic 2.5: Testing & QA
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 2.5.1 | Backend API testing | Test grant/revoke/list endpoints, access checks | 3h | 2.2.6 | High |
| 2.5.2 | Frontend E2E testing | Test share flow, report viewer login, access restrictions | 4h | 2.4.4 | High |
| 2.5.3 | Security review | Verify report_viewer can’t access unauthorized content | 2h | 2.5.2 | High |
Demo Criteria: Admin creates report_viewer → shares MultiAnalysis → viewer logs in → sees only that report → can view source files → no edit buttons visible.
Stage 3: PDF Export
Goal: Generate professional PDF exports of reports.
Total Hours: 38-46h (including QA)
Epic 3.1: Infrastructure
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 3.1.1 | Evaluate PDF generation options | Test WeasyPrint in Lambda, document decision | 2h | - | High |
| 3.1.2 | Set up WeasyPrint | Add to requirements, configure Lambda layer or container | 3h | 3.1.1 | High |
| 3.1.3 | Create templates directory | Set up api/src/templates/pdf/ for Jinja2 templates | 1h | 3.1.2 | High |
Files: api/requirements.txt, api/src/templates/pdf/ (new directory)
Epic 3.2: PDF Service
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 3.2.1 | Create base HTML template | Jinja2 template with header, TOC, section structure | 4h | 3.1.3 | High |
| 3.2.2 | Create PDF styles | CSS for professional formatting, page breaks, branding | 3h | 3.2.1 | High |
| 3.2.3 | Build section renderers | Functions to convert themes, custom fields, etc. to HTML | 4h | 3.2.1 | High |
| 3.2.4 | Create PDFExportService | Main service class with export_analysis() and export_multi_analysis() | 4h | 3.2.3 | High |
| 3.2.5 | Handle custom fields in PDF | Render personas, custom sections appropriately | 3h | 3.2.4 | Medium |
Files: api/src/services/pdf_export.py (new), api/src/templates/pdf/report.html (new), api/src/templates/pdf/styles.css (new)
Epic 3.3: Backend API
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 3.3.1 | Analysis export endpoint | GET /analyses/{id}/export?format=pdf | 3h | 3.2.4 | High |
| 3.3.2 | Multi-analysis export endpoint | GET /analyze/multi/{id}/export?format=pdf | 3h | 3.2.4 | High |
Files: api/src/routers/analyses.py
Epic 3.4: Frontend
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 3.4.1 | Add export button to AnalysisDetails | Download button with loading state | 2h | 3.3.1 | High |
| 3.4.2 | Add export button to MultiAnalysisDetails | Download button with loading state | 2h | 3.3.2 | High |
| 3.4.3 | Handle download response | Blob download, filename from header | 2h | 3.4.1 | High |
Files: client/src/pages/AnalysisDetails.jsx, client/src/pages/MultiAnalysisDetails.jsx
Epic 3.5: Testing & QA
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 3.5.1 | PDF generation testing | Test with various report types, verify formatting | 3h | 3.4.3 | High |
| 3.5.2 | Custom fields in PDF | Verify personas, custom sections render correctly | 2h | 3.5.1 | High |
| 3.5.3 | Large report testing | Test with reports containing many themes/findings | 2h | 3.5.1 | Medium |
Demo Criteria: Open MultiAnalysis → click Export PDF → PDF downloads with header, TOC, all sections formatted professionally.
Stage 4: Projects Foundation
Goal: Introduce Projects as organizational layer.
Total Hours: 46-54h (including QA)
Epic 4.1: Data Model
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 4.1.1 | Design projects schema | Table with org_id, name, description, color, icon, is_default | 2h | - | High |
| 4.1.2 | Create Project model | SQLAlchemy model with relationships | 2h | 4.1.1 | High |
| 4.1.3 | Add project_id to files | Alter files table, add foreign key | 2h | 4.1.2 | High |
| 4.1.4 | Add project_id to analysis_runs | Alter analysis_runs table | 1h | 4.1.2 | High |
| 4.1.5 | Add project_id to multi_analyses | Alter multi_analyses table | 1h | 4.1.2 | High |
| 4.1.6 | Add project_id to prompt_templates | Optional FK (NULL = org-wide) | 1h | 4.1.2 | High |
Files: api/src/shared/db_models.py
Epic 4.2: Migration Strategy
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 4.2.1 | Write schema migration | Add projects table and project_id columns (nullable first) | 3h | 4.1.6 | High |
| 4.2.2 | Create default projects | Data migration: create default project per org | 2h | 4.2.1 | High |
| 4.2.3 | Migrate existing data | Move files/analyses to default project | 2h | 4.2.2 | High |
| 4.2.4 | Make project_id required | Second migration to add NOT NULL constraint | 1h | 4.2.3 | High |
Files: api/migrations/versions/xxx_add_projects.py, api/migrations/versions/xxx_migrate_to_projects.py
Epic 4.3: Backend API
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 4.3.1 | Create projects router | New routers/projects.py with CRUD | 3h | 4.2.4 | High |
| 4.3.2 | Projects list endpoint | GET /projects with file counts, last activity | 2h | 4.3.1 | High |
| 4.3.3 | Project CRUD endpoints | Create, read, update, delete (protect default) | 3h | 4.3.1 | High |
| 4.3.4 | Update files endpoints | Add project_id filter to list, require on create | 2h | 4.2.4 | High |
| 4.3.5 | Update analyses endpoints | Add project_id filter and parameter | 2h | 4.2.4 | High |
| 4.3.6 | Update prompts endpoints | Add project_id filter, include_org_wide param | 2h | 4.2.4 | High |
Files: api/src/routers/projects.py (new), api/src/routers/files.py, api/src/routers/analyses.py, api/src/routers/prompts.py
Epic 4.4: Frontend
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 4.4.1 | Create ProjectContext | Context provider with projects list, current project, persistence | 4h | 4.3.2 | High |
| 4.4.2 | Update Sidebar with projects | Project list section with switcher, color indicators | 4h | 4.4.1 | High |
| 4.4.3 | Create new project dialog | Form for name, description, color, icon | 2h | 4.3.3 | High |
| 4.4.4 | Update Files page | Filter by current project | 2h | 4.4.1 | High |
| 4.4.5 | Update Upload page | Include project_id in file creation | 1h | 4.4.1 | High |
| 4.4.6 | Update MultiAnalysis page | Include project_id | 1h | 4.4.1 | High |
| 4.4.7 | Update PromptTemplates page | Filter by project, show org-wide toggle | 2h | 4.4.1 | Medium |
Files: client/src/contexts/ProjectContext.jsx (new), client/src/components/layout/Sidebar.jsx, client/src/components/NewProjectDialog.jsx (new), client/src/pages/Files.jsx, client/src/pages/Upload.jsx, client/src/pages/MultiAnalysis.jsx, client/src/pages/PromptTemplates.jsx
Epic 4.5: Testing & QA
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 4.5.1 | Migration testing | Test migration on copy of prod data, verify no data loss | 3h | 4.2.4 | High |
| 4.5.2 | Project switching E2E | Test create project, switch, verify isolation | 3h | 4.4.7 | High |
| 4.5.3 | Backward compatibility | Verify existing workflows still work with default project | 2h | 4.5.2 | High |
Demo Criteria: Login → see projects in sidebar → create “Q1 Interviews” → switch to it → upload file → switch back → file not visible → original files in Default Project.
Stage 5: Project RBAC
Goal: Control who can access which projects.
Total Hours: 40-48h (including QA)
Epic 5.1: Data Model
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 5.1.1 | Design project_memberships schema | Table with project_id, user_id, role (viewer/editor) | 2h | Stage 4 | High |
| 5.1.2 | Create ProjectMembership model | SQLAlchemy model with relationships | 2h | 5.1.1 | High |
| 5.1.3 | Write Alembic migration | Create table, add existing users to default project | 2h | 5.1.2 | High |
Files: api/src/shared/db_models.py, api/migrations/versions/xxx_add_project_memberships.py
Epic 5.2: Access Control Logic
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 5.2.1 | Create access control functions | get_project_access(), get_accessible_projects() | 3h | 5.1.3 | High |
| 5.2.2 | Create access decorator | require_project_access(min_access) dependency | 3h | 5.2.1 | High |
| 5.2.3 | Update projects list | Filter to only accessible projects | 2h | 5.2.1 | High |
| 5.2.4 | Update file/analysis queries | Add project access checks | 3h | 5.2.2 | High |
Files: api/src/deps.py, api/src/routers/projects.py, api/src/routers/files.py, api/src/routers/analyses.py
Epic 5.3: Backend API
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 5.3.1 | List members endpoint | GET /projects/{id}/members | 2h | 5.1.3 | High |
| 5.3.2 | Add member endpoint | POST /projects/{id}/members | 3h | 5.1.3 | High |
| 5.3.3 | Update member role endpoint | PUT /projects/{id}/members/{user_id} | 2h | 5.1.3 | High |
| 5.3.4 | Remove member endpoint | DELETE /projects/{id}/members/{user_id} | 2h | 5.1.3 | High |
Files: api/src/routers/projects.py
Epic 5.4: Frontend
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 5.4.1 | Create ProjectMembersDialog | Dialog to view/manage project members | 4h | 5.3.1 | High |
| 5.4.2 | Create AddMemberForm | User selector with role dropdown | 2h | 5.4.1 | High |
| 5.4.3 | Add access indicator to sidebar | Eye icon for view-only projects | 2h | 5.2.3 | Medium |
| 5.4.4 | Conditional edit actions | Hide upload/edit/delete for viewers | 3h | 5.2.3 | High |
| 5.4.5 | Update ProjectContext | Include user_role in project data | 2h | 5.2.3 | High |
Files: client/src/components/ProjectMembersDialog.jsx (new), client/src/components/AddMemberForm.jsx (new), client/src/components/layout/Sidebar.jsx, client/src/pages/Files.jsx, client/src/contexts/ProjectContext.jsx
Epic 5.5: Testing & QA
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 5.5.1 | Access control testing | Test viewer vs editor permissions | 3h | 5.4.5 | High |
| 5.5.2 | Admin override testing | Verify org admins have full access | 2h | 5.5.1 | High |
| 5.5.3 | Security review | Test unauthorized access attempts | 3h | 5.5.2 | High |
Demo Criteria: Admin creates project → adds User A as Editor, User B as Viewer → User A can upload → User B sees eye icon, can’t upload → User C doesn’t see project at all.
Stage 6: File Organization
Goal: Folders and visibility controls for files.
Total Hours: 48-56h (including QA)
Epic 6.1: Data Model
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 6.1.1 | Design folders schema | Table with project_id, parent_folder_id, name, path_names | 2h | Stage 5 | High |
| 6.1.2 | Create Folder model | SQLAlchemy model with self-referential relationship | 3h | 6.1.1 | High |
| 6.1.3 | Add folder_id to files | FK to folders table | 1h | 6.1.2 | High |
| 6.1.4 | Add visibility to files | Enum column: private/project/organization | 2h | 6.1.2 | High |
| 6.1.5 | Write Alembic migration | Create folders table, alter files | 2h | 6.1.4 | High |
Files: api/src/shared/db_models.py, api/migrations/versions/xxx_add_folders_visibility.py
Epic 6.2: Visibility Logic
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 6.2.1 | Create visibility access function | can_view_file() with visibility rules | 3h | 6.1.5 | High |
| 6.2.2 | Create visibility query filter | filter_files_by_visibility() for list queries | 3h | 6.2.1 | High |
| 6.2.3 | Update file access checks | Integrate visibility into existing access logic | 2h | 6.2.2 | High |
Files: api/src/deps.py, api/src/routers/files.py
Epic 6.3: Backend API
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 6.3.1 | Create folders router | New routers/folders.py | 2h | 6.1.5 | High |
| 6.3.2 | Folders CRUD endpoints | Create, list (tree), update, delete | 4h | 6.3.1 | High |
| 6.3.3 | Folder tree query | Recursive CTE for nested structure | 3h | 6.3.2 | High |
| 6.3.4 | Update files endpoints | Add folder_id, visibility params | 2h | 6.1.5 | High |
| 6.3.5 | Move file endpoint | Update file’s folder_id | 1h | 6.3.4 | Medium |
Files: api/src/routers/folders.py (new), api/src/routers/files.py
Epic 6.4: Frontend
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 6.4.1 | Create FolderTree component | Collapsible tree view with selection | 5h | 6.3.3 | High |
| 6.4.2 | Create FolderSelector dropdown | For upload page folder selection | 2h | 6.4.1 | High |
| 6.4.3 | Create VisibilitySelector | Dropdown with private/project/org options | 2h | - | High |
| 6.4.4 | Create Breadcrumbs component | Show current folder path | 2h | 6.4.1 | Medium |
| 6.4.5 | Update Files page layout | Add folder sidebar, breadcrumbs | 4h | 6.4.1, 6.4.4 | High |
| 6.4.6 | Update Upload page | Add folder and visibility selectors | 2h | 6.4.2, 6.4.3 | High |
| 6.4.7 | Add visibility indicator to FileRow | Icons for private/project/org | 1h | 6.4.3 | Medium |
| 6.4.8 | Create new folder dialog | Form for folder name, color | 2h | 6.3.2 | High |
Files: client/src/components/FolderTree.jsx (new), client/src/components/FolderSelector.jsx (new), client/src/components/VisibilitySelector.jsx (new), client/src/components/Breadcrumbs.jsx (new), client/src/pages/Files.jsx, client/src/pages/Upload.jsx, client/src/components/files/FileRow.jsx
Epic 6.5: Testing & QA
| Task ID | Task | Description | Hours | Deps | Priority |
|---|---|---|---|---|---|
| 6.5.1 | Folder operations testing | Create, nest, move, delete folders | 3h | 6.4.8 | High |
| 6.5.2 | Visibility testing | Test private/project/org access rules | 3h | 6.4.7 | High |
| 6.5.3 | Cross-user visibility | Verify correct files visible per user/project | 3h | 6.5.2 | High |
| 6.5.4 | Edge cases | Empty folders, deep nesting, orphaned files | 2h | 6.5.3 | Medium |
Demo Criteria: Create folder “Week 1” → create subfolder “Day 1” → upload file to Day 1 as “Project” visibility → change to “Private” → other user can’t see it → change to “Organization” → users outside project can see it.
Summary
| Stage | Tasks | Hours | Priority |
|---|---|---|---|
| Stage 0: Report Fixes | 11 | 22-26h | P0 |
| Stage 1: Attachments | 14 | 34-40h | P1 |
| Stage 2: Report Sharing | 18 | 42-50h | P1 |
| Stage 3: PDF Export | 14 | 38-46h | P1 |
| Stage 4: Projects | 20 | 46-54h | P1 |
| Stage 5: Project RBAC | 16 | 40-48h | P2 |
| Stage 6: File Organization | 21 | 48-56h | P2 |
| Total | 114 | 270-320h |
Milestones
| Milestone | After Stage | Demonstrates |
|---|---|---|
| DEMO 1 | 0, 1, 2 | Report fixes working, attachments in LLM, sharing functional |
| DEMO 2 | 3, 4 | PDF export, projects foundation |
| DEMO 3 | 5, 6 | Full RBAC, file organization complete |