Skip to content

feat:AI HackDays- Data mapping and project details integration

Kaveri Mamidi requested to merge data-mapping into AI-HackDays

🚀 What does this MR do?

This merge request integrates the AI HackDays frontend with the Strapi backend API and replaces static/mock data with dynamic data.


📸 Screenshots

🔴 Before (Static Data)

  • Teams: 0
  • Participants: 0
  • Colleges: 0
  • No projects displayed

Screenshot_from_2026-03-23_10-31-40


🟢 After (Dynamic Data from API)

  • Teams count populated
  • Participants count updated
  • Colleges count calculated
  • Projects rendered dynamically
  • Members displayed inside project cards

image


Features Implemented

  • Fetched AI HackDays data from Strapi API

  • Mapped API response to:

    • Total Teams
    • Total Participants
    • Unique Colleges
  • Rendered project list dynamically

  • Displayed nested team members data inside project cards

  • Added loading and error handling

  • Improved TypeScript types (removed any usage)


🎯 Problem Solved

Previously, the AI HackDays page displayed static values (0 teams, 0 participants, no projects).

This MR enables:

  • Real-time data display from backend
  • Accurate project and participant tracking
  • Dynamic rendering of project details

💡 Motivation / Use Case

This feature ensures that the AI HackDays page reflects actual backend data, making the platform more useful for:

  • Tracking hackathon participation
  • Displaying real project contributions
  • Improving user experience with live data

️ Implementation Notes

  • Used useEffect for API fetching
  • Used useState for managing data
  • Applied safe optional chaining to avoid crashes
  • Used Set to calculate unique teams and colleges
  • Aggregated participants count from API data

No breaking changes introduced.


🧪 How to Test

  1. Checkout this branch:

    git checkout data-mapping
  2. Install dependencies:

    npm install --legacy-peer-deps
  3. Run the project:

    npm start
  4. Open in browser:

    http://localhost:3000/aihackdays
  5. Verify:

    • Teams count is not 0
    • Participants count is correct
    • Colleges count is correct
    • Projects are displayed
    • Members are visible in project cards

Checklist

  • Feature implemented and working
  • Code is clean and readable
  • No breaking changes
  • Tested locally

🔗 Related Issue

#34 (closed)

Merge request reports

Loading