Skip to content

Comments

Fixed: #98 Activity Feed#126

Open
gaius01 wants to merge 2 commits intoInferara:mainfrom
gaius01:Create-Activity-Feed-on-Homepage
Open

Fixed: #98 Activity Feed#126
gaius01 wants to merge 2 commits intoInferara:mainfrom
gaius01:Create-Activity-Feed-on-Homepage

Conversation

@gaius01
Copy link

@gaius01 gaius01 commented Jan 24, 2026

Close #98

Recent Activity Feature - Walkthrough
I have implemented a comprehensive Recent Activity tracking and display system. This feature allows users to see what's happening on the portal (new reports, vulnerabilities, and comments) and personalize their feed by following specific protocols, auditors, or companies.

Changes
Backend Architecture

  1. Database & Models
    ActivityModel: Central table tracking all system activities (Report Creation, Vulnerability Approval, etc.).
    UserFollowModel: Tracks user subscriptions to Protocols, Auditors, and Companies.
    CommentModel: Structure for storing user comments on various entities.
    DbContext: Updated
    Db.cs
    to include new tables.
  2. Services & Processors
    ActivityProcessor: Handles retrieving and enriching activity data with entity details (joining with Report/Protocol tables).
    UserFollowService: Manages follow/unfollow actions and checks status.
    Auto-tracking:
    ReportsController
    and
    VulnerabilitiesController
    now automatically generate activity records when items are created or approved.
  3. API Endpoints
    GET /api/v1/activities: Fetch public activity feed.
    GET /api/v1/activities/personalized: Fetch feed filtered by user's follows.
    POST /api/v1/follows: Follow an entity.
    POST /api/v1/comments: Add comments (backend support).
    Frontend Implementation
  4. UI Components
    RecentActivity: A new section on the Homepage displaying the latest 6 activities.
    ActivityCard: A reusable component that renders activity details with:
    Actor avatar and name
    Action description and relative time
    Entity links and status icons
    ActivityPage: A dedicated /activity page with:
    "Personalized" vs "All" feed toggles
    Time range filtering (24h, 7d, 30d)
    FollowButton: Added to Protocol Details page to allow users to subscribe to updates.
  5. API Integration
    extended
    soroban-security-portal-api.ts
    with new methods for Activities, Follows, and Comments.
    Verification
    Automated Verification
    The backend compiles (standard .NET build).
    The frontend compiles (standard npm build).
    Manual Verification Steps
    Homepage Feed:

Open the homepage.
Observe the "Recent Activity" section.
Verify it shows recent reports/vulnerabilities.
Tracking:

Create a new Report.
Go back to Home -> The new report creation activity appears.
Approve the Report (as Admin) -> The approval activity appears.
Personalization:

Go to a Protocol page.
Click the "Follow" button.
Go to the Activity Page (/activity).
Switch to "Following" tab.
Verify activities related to that protocol appear.
Filtering:

On the Activity Page, use the time range toggle (7 days / 30 days) to see older activities.

@gaius01
Copy link
Author

gaius01 commented Jan 28, 2026

Conflict has been merge for this. Please I will be awaiting for your review.

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.

Create Activity Feed on Homepage

1 participant