Objective
Develop a Wiki Module in the Flutter app using DDD architecture. The Wiki module will support creating folders, managing documents inside those folders, and integrating with about 10 APIs for folder/document CRUD operations, sharing, and publishing.
Scope of Work
- UI Integration
- Implement the UI screens for Folder List, Document List, Document Editor, Folder Creation, Document Creation, and Publish/Share Modals as shown in the design.
- Reuse App Bar and Bottom Navigation Bar components for consistency.
- Support features: folder creation, document creation, rename, delete, sharing, and publishing.
- API Integration (10 APIs)
- APIs for:
- Fetch folder list
- Fetch documents inside a folder
- Create folder
- Create document
- Update document
- Delete folder/document
- Rename folder/document
- Publish document
- Share document
- View document details
- Handle all API responses with proper loading and error states.
- Support pagination for folder/document lists if API supports it.
- DDD Architecture Requirements
- DTO Layer: Create DTOs for all API request/response payloads.
- Domain Layer: Define domain objects like
Folder,Document,User,Permission. - Application Layer: Use dependency injection for services, repositories, and use cases.
- Presentation Layer:
- Use Bloc + Freezed for state management.
- Separate BLoCs for Folder, Document, and Publish/Share modules.
- Document Editor
- Rich text editor support for creating/updating documents.
- Auto-save drafts periodically (if API supports it).
- Publish and Share options integrated with API.
- Validation
- Folder name and document title are required before saving.
- Prevent creating duplicate folder names under the same parent folder.
- Ensure document body is not empty before publishing.
- Error Handling
- Show retry option for API failures.
- Proper error messages for folder/document creation or publishing failures.
- Handle session timeout gracefully and redirect to login if required.
Acceptance Criteria
- Folder list loads correctly with API data.
- Documents display properly inside folders.
- Folder and document creation works with valid names and content.
- Rename/Delete folder and document actions work with confirmation dialogs.
- Publish and Share APIs trigger correctly and update the UI state.
- BLoC states cover initial, loading, success, error scenarios.
- Code follows DDD principles and passes review.
- UI matches the provided design, including empty/error states.
Validation Checklist
- ✅ Folder and document names validated for special characters and empty input.
- ✅ Document content validated before publishing.
- ✅ API response validated for null/missing fields.
- ✅ UI states validated for loading, success, and error cases.
- ✅ Share modal validates email/user selection before sending invites.
Expected Dev Testing Points
- ✅ Folder list API loads data with pagination (if applicable).
- ✅ Document list loads for selected folder correctly.
- ✅ Folder creation API triggers correctly with success/failure states.
- ✅ Document creation, update, delete, rename tested for all edge cases.
- ✅ Publish and Share APIs tested with multiple users.
- ✅ Offline mode shows cached folder/document data if API fails.
- ✅ BLoC states tested for all possible state transitions.
- ✅ UI tested on mobile and tablet devices for responsiveness.
Leave a Reply