Skip to content

Dashboard backend enhancements: feedback, issue reporting, user search, services/selectors, and test framework#1909

Open
Agrawal-Sujal wants to merge 2 commits into
FusionIIIT:dashboards-v1from
Agrawal-Sujal:dashboards-v1
Open

Dashboard backend enhancements: feedback, issue reporting, user search, services/selectors, and test framework#1909
Agrawal-Sujal wants to merge 2 commits into
FusionIIIT:dashboards-v1from
Agrawal-Sujal:dashboards-v1

Conversation

@Agrawal-Sujal
Copy link
Copy Markdown

Summary

This PR delivers the dashboard backend feature set with production-focused validation, performance improvements, and testing support.
It introduces three core APIs (Feedback, Issue Reporting, User Search), a services/selectors architecture split, model/query optimizations, serializer upgrades, image safety checks, and expanded test infrastructure.

Core Features Delivered

1. Feedback System

  • GET /api/db/feedback/ returns:
    • Current user feedback (if available)
    • Top 5 highest-rated feedback entries
    • Average rating across all feedback
  • POST /api/db/feedback/ supports create or update per user
  • Rating validation in 1-5 range
  • Feedback text and timestamps supported

2. Issue Reporting System

  • GET /api/db/issues/ lists issues with user and department context
  • POST /api/db/issues/ creates issues with image attachments
  • PUT /api/db/issues/<issue_id>/ allows owner updates for open issues only
  • POST /api/db/issues/<issue_id>/support/ toggles support/unsupport
  • Owner cannot support their own issue
  • Closed issues are immutable
  • Supports issue types and module categorization
  • Image validation:
    • Max 5MB per image
    • Allowed formats: PNG, JPEG, GIF
    • PIL-based integrity and corruption checks

3. User Search API

  • GET /api/db/search/?q=<query>
  • Minimum 3 characters required
  • Searches first name, last name, username
  • Multi-word matching with case-insensitive behavior
  • Returns up to 15 users

Architecture and Code Improvements

  • New services layer for business logic orchestration
  • New selectors layer for optimized and reusable queries
  • QuerySet-level optimization for issue/designation retrieval
  • Serializer enhancements for validation and response shaping
  • Testing infrastructure additions across APIs, utils, serializers, and services
  • Model improvements using enum-style choices and cleaner organization
  • Comprehensive image validation and error reporting

Technical Impact

  • 47 files changed
  • 9898 insertions
  • 905 deletions

Validation and Testing

  • Added and expanded tests for:
    • API behavior
    • Serializer constraints
    • Services/selectors behavior
    • Notification test coverage
  • Test framework and test settings added for repeatable execution

Reviewer Notes

  • This PR includes test-report artifacts and requirement validation assets as part of delivery evidence.
  • Behavior is designed with secure defaults, strict validation, and optimized query paths for dashboard usage.

Checklist

  • API endpoints implemented
  • Validation and security checks added
  • Query optimization included
  • Tests added or updated
  • Migration updates included where required
  • Final staging/UAT verification by reviewer

CharithKalasi and others added 2 commits May 9, 2026 16:48
Dashboard backend enhancements: feedback, issue reporting, user search, services/selectors, and test framework
@FusionIIIT-Bot
Copy link
Copy Markdown
Collaborator

Congratulations for making your first Pull Request at Fusion!! 🎉 Someone from our team will review it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants