Add Validation Tab with File Upload
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- csharp, typescript
- Domain
- api, full-stack, security, testing
Research direction
Start by reviewing Issue #8 and the existing IOneRosterValidator, then inspect FilesController.cs, App.tsx, and the planned TabNavigation.tsx, FileUpload.tsx, and ValidationResults.tsx components. Work through the backend and frontend phases, using the listed upload, validation, cleanup, and responsive-design tests as checkpoints. Done means users can upload valid ZIP files, see validation results, and receive secure handling for invalid or oversized files.
Written by the indexing model from the issue text.
Description
Overview
Add a new "Validation" tab to the frontend that allows users to upload OneRoster.zip files and receive validation results from the OneRoster validator.
Background
The current frontend is a single-page download landing page with no navigation or upload capabilities. This feature adds a tabbed interface with a file upload/validation view, enabling users to validate their own OneRoster files against the OneRoster 1.1 specification.
Requirements
Frontend
-
Tab Navigation:
- Add tab navigation with "Download" and "Validation" tabs
- Default to "Download" tab (existing functionality)
- Visual tab indicators matching existing design language
-
Validation Tab UI:
- File upload area (drag-and-drop + click to browse)
- Accept only
.zipfiles - File size limit indicator (e.g., max 15MB)
- Upload progress indicator
- Validation results display area
-
Validation Results Display:
- Show validation status (Valid/Invalid)
- List errors with clear formatting
- List warnings with clear formatting
- Timestamp of validation
- Option to validate another file
-
Responsive Design:
- Works on mobile and desktop
- Matches existing glassmorphism design system
Backend
-
New API Endpoint:
POST /api/files/validate- Accepts file upload, returns validation results- Accepts
multipart/form-datawith.zipfiles only - Returns JSON with
isValid,errors,warnings,validatedAt
-
File Handling:
- Temporary storage for uploaded files (cleanup after validation)
- File size validation (max 15MB)
- ZIP file validation before processing
-
Security:
- File type validation (only .zip)
- File size limits
- No persistent storage of uploaded files
- Cleanup of temporary files after validation
Technical Design
Frontend Components
1. Tab Navigation
// New component: src/components/TabNavigation.tsx
interface Tab {
id: string;
label: string;
}
const tabs: Tab[] = [
{ id: 'download', label: 'Download' },
{ id: 'validation', label: 'Validation' }
];
2. File Upload Component
// New component: src/components/FileUpload.tsx
interface FileUploadProps {
onFileSelect: (file: File) => void;
isUploading: boolean;
accept?: string;
}
3. Validation Results Component
// New component: src/components/ValidationResults.tsx
interface ValidationResult {
isValid: boolean;
errors: string[];
warnings: string[];
validatedAt: string;
}
Backend Changes
1. New Controller Endpoint
// FilesController.cs
[HttpPost("validate")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> ValidateOneRosterFile(IFormFile file)
{
// Validate file type and size
// Save to temporary location
// Run validation
// Return results
// Cleanup temporary file
}
2. Validation Service Integration
- Use existing
IOneRosterValidatorfrom Issue #8 - Add file upload handling logic
- Add temporary file management
Data Flow
User selects file → Frontend validates type/size →
POST /api/files/validate → Backend saves temp file →
Run validation checks → Return JSON results →
Cleanup temp file → Display results to user
Implementation Steps
Phase 1: Backend (Issue #8 dependency)
- Ensure
IOneRosterValidatoris implemented (from Issue #8) - Add file upload endpoint to
FilesController - Add temporary file management service
- Add file type/size validation
- Write unit tests for upload endpoint
Phase 2: Frontend - Tab Navigation
- Add tab navigation component
- Refactor
App.tsxto use tabbed layout - Move existing download content to "Download" tab
- Add tab state management
Phase 3: Frontend - Validation Tab
- Create file upload component with drag-and-drop
- Create validation results display component
- Add API integration for file upload
- Add loading states and error handling
- Add responsive styling
Phase 4: Integration & Testing
- Test file upload flow end-to-end
- Test validation results display
- Test responsive design
- Test error scenarios (invalid files, large files, etc.)
Testing Strategy
Frontend Tests
- Component rendering tests
- File upload interaction tests
- API integration tests
- Responsive design tests
Backend Tests
- File upload endpoint tests
- File type validation tests
- File size validation tests
- Temporary file cleanup tests
Success Criteria
- Users can switch between Download and Validation tabs
- Users can upload .zip files via drag-and-drop or file picker
- Validation results display correctly with errors and warnings
- File upload is secure (type checking, size limits)
- Temporary files are cleaned up after validation
- UI matches existing design language
- Responsive on mobile and desktop
Dependencies
- Issue #8: OneRoster Validator API endpoint
- Existing
IOneRosterValidatorservice
Related Issues
- Issue #8: Add OneRoster Validator Feature (API endpoint)
- Dominant language
- C#
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bergerb/DailyOneRosterFile
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Next Run Time BugOpen
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in bergerb/DailyOneRosterFile
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
MicrosoftLearning/PL-400_Microsoft-Power-Platform-Developer#231 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
joinrpg/joinrpg-net#5313 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day