Skip to content

Implement Flow Insights — Project Analytics & Collaboration Intelligence#79

Merged
Shriii19 merged 4 commits into
Shriii19:masterfrom
arin-gupta06:Flow-Insights
May 19, 2026
Merged

Implement Flow Insights — Project Analytics & Collaboration Intelligence#79
Shriii19 merged 4 commits into
Shriii19:masterfrom
arin-gupta06:Flow-Insights

Conversation

@arin-gupta06
Copy link
Copy Markdown
Contributor

@arin-gupta06 arin-gupta06 commented May 19, 2026

NSoC'26

🚀 Implement Flow Insights — Project Analytics & Collaboration Intelligence

📌 Overview

This PR introduces Flow Insights, a dedicated analytics and intelligence layer for FlowForge focused on:

  • project evolution tracking

  • contribution analytics

  • realtime collaboration visibility

  • sprint/productivity insights

  • workflow history visualization

Unlike the existing Dashboard, Flow Insights focuses on deep project-level intelligence instead of workspace summaries.


✨ Features Implemented

📊 Project Evolution Timeline

  • milestone tracking

  • sprint progression visualization

  • project activity history

  • workflow evolution monitoring

👥 Member Contribution Analytics

  • completed task tracking

  • workload distribution

  • activity participation insights

  • contribution visualizations

🔄 Task Journey Visualization

Tracks task lifecycle movement:

Todo → In Progress → Review → Done

Includes:

  • transition history

  • timestamps

  • workflow tracking

  • completion insights

⚡ Realtime Collaboration Events

Implemented realtime activity updates using Socket.io.

Examples:

Rahul completed API integration
Aman moved task to Review
Shrinivas updated dashboard components

🔥 Team Activity Heatmap

Added GitHub-style activity heatmap for:

  • contribution consistency

  • collaboration frequency

  • sprint intensity tracking

📈 Sprint & Productivity Analytics

Implemented analytics for:

  • sprint velocity

  • task completion trends

  • workload insights

  • productivity tracking


🏗️ Technical Improvements

Frontend

  • Added dedicated Flow Insights page

  • Implemented responsive analytics components

  • Added realtime visualizations using Recharts

  • Improved analytics-focused UI architecture

Backend

  • Added activity tracking systems

  • Implemented contribution aggregation logic

  • Added task history tracking

  • Integrated realtime Socket.io synchronization

  • Added analytics-ready PostgreSQL queries


🛠️ Tech Stack

Frontend

  • React

  • Tailwind CSS

  • Recharts

  • Framer Motion

  • Socket.io Client

Backend

  • Node.js

  • Express

  • Socket.io

  • PostgreSQL


📄 Responsibility Separation

Page | Responsibility -- | -- Dashboard | Workspace overview Workspace | Operational collaboration Flow Insights | Project intelligence & analytics

📈 Impact

Flow Insights upgrades FlowForge from a basic collaboration workspace into a more intelligent and analytics-driven engineering platform by improving:

  • project transparency

  • collaboration visibility

  • productivity insights

  • workflow tracking

  • realtime project intelligence


🌟 Future Scope

  • GitHub integration

  • AI-generated insights

  • sprint forecasting

  • contributor profiling

  • project health scoring

Introduce a new Insights area and navigation support: add a client-side NavBar component (uses next/navigation usePathname) and a navItems lib exporting nav item types and entries. Create an insights page with sidebar, main content and right-hand feed, and add an (empty) insights/layout.tsx placeholder. Note: the Insights page contains several minor typos and class-name issues (e.g. "gird-cols", "mtt-16", "Overiew") that should be cleaned up in a follow-up commit.
Introduce analytics, insights and feed features: add backend controllers and routes (analytics, feed, insights) and register them in server.js (/api/analytics, /api/feed, /api/insights). Implement feed endpoints including manual item creation and socket emission, and synthetic analytics/insights builders that read from Supabase. Add many frontend components and pages for Insights and Feed (Overview, Analytics, Tasks, Feed pages; heatmap, sidebars, mobile nav, feed list/item/filters/header, overview main and stats card) plus related UI/UX adjustments. Also include small frontend improvements: type refinements in chat and API project/signup handlers, NavBar relocation, and AppShell layout changes to hide the main sidebar on insights routes. These changes wire the new insights/feed UI to the backend and provide fallback/synthetic data when backend data is limited.
Copilot AI review requested due to automatic review settings May 19, 2026 10:51
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@arin-gupta06 is attempting to deploy a commit to the shreemp194-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

👋 Thank you for opening this pull request! I will review your changes and assist you soon.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new “Insights” area (Overview / Analytics / Tasks / Feed) to the Next.js frontend and wires it up to new backend API endpoints to provide backend-backed (with fallbacks) insights data.

Changes:

  • Introduces /insights/* pages, shared layout/sidebar navigation, and supporting UI components for overview, analytics, feed, and task journey views.
  • Adds backend Express routes/controllers for analytics, feed, and insights endpoints consumed by the new frontend pages.
  • Improves type-safety across several pages/components (e.g., projects, auth user, kanban drag events, chat events) and updates app shell/sidebar routing for Insights.

Reviewed changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
frontend/app/signup/page.tsx Adjusts query param state update timing and tightens response typing.
frontend/app/projects/page.tsx Adds a typed Project model for safer state/handlers.
frontend/app/login/page.tsx Adjusts query param state update timing.
frontend/app/lib/navItems.ts Adds shared nav item definitions for insights UI.
frontend/app/insights/tasks/page.tsx Adds Tasks insights page fetching backend insights with fallback UI.
frontend/app/insights/overview/page.tsx Adds Overview insights page wrapper.
frontend/app/insights/layout.tsx Adds Insights layout with dedicated sidebar shell.
frontend/app/insights/feed/page.tsx Adds Feed page consuming backend feed with local fallback + create flow.
frontend/app/insights/analytics/page.tsx Adds Analytics page consuming backend analytics with local fallback.
frontend/app/insights pages/page.tsx Adds an additional insights-like page under an odd route path.
frontend/app/hooks/useAuth.ts Types user using Supabase User.
frontend/app/globals.css Adds theme tokens for consistent insights styling.
frontend/app/dashboard/page.tsx Adds links into Insights and tightens some UI/types.
frontend/app/components/kanban/KanbanBoard.tsx Types DnD events, refactors socket handling, and adds status guard.
frontend/app/components/analytics-comp/SprintLeaderboard.tsx Adds leaderboard component for analytics page.
frontend/app/components/analytics-comp/PerformanceSummary.tsx Adds summary/visualization for sprint analytics.
frontend/app/components/analytics-comp/MemberAnalytics.tsx Adds per-member analytics component.
frontend/app/components/analytics-comp/AnalyticsSideBar.tsx Adds analytics sidebar navigation.
frontend/app/components/analytics-comp/AnalyticsMobileNav.tsx Adds analytics mobile bottom nav.
frontend/app/components/analytics-comp/AnalyticsHeader.tsx Adds analytics header with sprint/query controls.
frontend/app/components/Tasks-comp/TopHeader.tsx Adds top header component used by insights overview.
frontend/app/components/Tasks-comp/TasksSideBar.tsx Adds tasks sidebar navigation.
frontend/app/components/Tasks-comp/TasksPulsebar.tsx Adds task pulse bar visualization component.
frontend/app/components/Tasks-comp/TasksHeader.tsx Adds tasks header component.
frontend/app/components/Tasks-comp/TasksFlow.tsx Adds task flow visualization component.
frontend/app/components/Tasks-comp/TaskHistoryTable.tsx Adds task journey history table with filtering.
frontend/app/components/Tasks-comp/MobileNav.tsx Adds tasks mobile navigation.
frontend/app/components/Sidebar.tsx Adds Insights entry to the main app sidebar.
frontend/app/components/Overview-comp/StatsCard.tsx Adds stats card used by overview insights.
frontend/app/components/Overview-comp/SideNav.tsx Adds overview side navigation component.
frontend/app/components/Overview-comp/OverviewMain.tsx Adds overview main content with backend fetch + fallbacks.
frontend/app/components/Overview-comp/NavBar.tsx Adds overview navbar using shared nav items.
frontend/app/components/Overview-comp/Heatmap.tsx Adds contribution heatmap component.
frontend/app/components/InsightsSidebar.tsx Adds Insights sidebar used by Insights layout.
frontend/app/components/Feed-comp/FeedSidebar.tsx Adds feed sidebar navigation and create button.
frontend/app/components/Feed-comp/FeedMobileNav.tsx Adds feed mobile bottom nav.
frontend/app/components/Feed-comp/FeedList.tsx Adds grouped feed list rendering.
frontend/app/components/Feed-comp/FeedItem.tsx Adds individual feed item rendering.
frontend/app/components/Feed-comp/FeedHeader.tsx Adds feed header with status/search/filter/create controls.
frontend/app/components/Feed-comp/FeedFilters.tsx Adds feed filter pills component.
frontend/app/components/AppShell.tsx Hides global sidebar/padding for Insights routes (Insights own layout).
frontend/app/chat/page.tsx Tightens typing for events and message mapping.
frontend/app/api/projects/route.ts Adds ProjectRow typing and typed row mapping.
frontend/app/api/auth/signup/route.ts Adds typed project row mapping in GET handler.
backend/server.js Mounts new analytics/feed/insights routes.
backend/routes/insights.routes.js Adds insights routes for overview/tasks.
backend/routes/feed.routes.js Adds feed routes for list/create.
backend/routes/analytics.routes.js Adds analytics route.
backend/controllers/insights.controller.js Implements insights aggregation for overview/tasks.
backend/controllers/feed.controller.js Implements activity feed aggregation + manual item creation.
backend/controllers/analytics.controller.js Implements analytics aggregation for sprint/member performance.
Comments suppressed due to low confidence (9)

frontend/app/components/kanban/KanbanBoard.tsx:1

  • activeTask is nullable state, but handleDragEnd dereferences it (activeTask.status) without a guard. This can throw at runtime if activeTask is null (e.g., drag end fires without a matching start, or state was cleared). Guard early (e.g., if (!activeTask) return;) or derive the active task from active.id within handleDragEnd instead of relying on state.
    frontend/app/components/analytics-comp/PerformanceSummary.tsx:1
  • When members is empty (or if assignedTotal is 0), completedTotal / assignedTotal becomes Infinity/NaN, which will render as an invalid percentage. Compute completionRate with a safe guard (e.g., assignedTotal > 0 ? ... : 0).
    frontend/app/components/analytics-comp/MemberAnalytics.tsx:1
  • selectedMember.assigned can be 0 depending on backend data, which makes completionRate Infinity/NaN. Also, otherPercent can go negative if completionRate exceeds 100. Clamp and guard these values (e.g., treat 0 assigned as 0% completion, and clamp completionRate into [0, 100] before computing otherPercent).
    frontend/app/insights/tasks/page.tsx:1
  • TasksSidebar is imported but never used in this file (the component is not rendered). This can cause lint/build failures when noUnusedLocals/eslint unused-import rules are enabled; remove the import or render the sidebar as intended.
    frontend/app/insights/tasks/page.tsx:1
  • This class list includes conflicting duplicate padding utilities (pb-12 and pb-20); only the later one will apply. Remove the redundant class to reduce confusion and make layout intent clearer.
    frontend/app/insights/overview/page.tsx:1
  • React is imported as a value but not referenced in this module. In setups with noUnusedLocals enabled, this will fail builds. Remove the unused import (or import only needed types if necessary).
    frontend/app/insights pages/page.tsx:1
  • The file path includes a space (frontend/app/insights pages/page.tsx), which will create an unexpected route segment (e.g., /insights%20pages) and is likely unintentional given the new /insights/* structure. Consider renaming/moving this page under the canonical frontend/app/insights/... route tree (or removing it if it’s leftover scaffolding).
    frontend/app/insights pages/page.tsx:1
  • Correct spelling of 'Overiew' to 'Overview'.
    frontend/app/lib/navItems.ts:1
  • The type name NavItems represents a single item shape (label/href), but the plural name implies a collection. Rename it to NavItem (and keep navItems: NavItem[]) to make usage clearer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/server.js
Comment thread backend/controllers/feed.controller.js
Comment thread backend/controllers/feed.controller.js
Comment thread backend/controllers/insights.controller.js
Comment thread frontend/app/components/Feed-comp/FeedList.tsx Outdated
Comment thread frontend/app/components/InsightsSidebar.tsx
@arin-gupta06
Copy link
Copy Markdown
Contributor Author

Hey, @Shriii19 In the current implementation of this feature, it is functional but still has some UI fixes, which I am going to refactor in a new issue, because if I go along in this same issue, it will stretch out the time and also the intent of the issue. So, in the upcoming days, I will fix those bugs in the UI.
Till then review the changes, and if you find any discrepancies, let me know. I'll fix those.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flow-forge Error Error May 19, 2026 3:25pm

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Shriii19 Shriii19 merged commit 1de4bd0 into Shriii19:master May 19, 2026
5 of 6 checks passed
@arin-gupta06
Copy link
Copy Markdown
Contributor Author

@Shriii19 please add some tags to this issue and pr as well.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants