Skip to content

Refactor: Remove Dummy Data and Use Actual Backend Data#5

Open
zaibamachhaliya wants to merge 1 commit into
imanchalsingh:mainfrom
zaibamachhaliya:main
Open

Refactor: Remove Dummy Data and Use Actual Backend Data#5
zaibamachhaliya wants to merge 1 commit into
imanchalsingh:mainfrom
zaibamachhaliya:main

Conversation

@zaibamachhaliya
Copy link
Copy Markdown

@zaibamachhaliya zaibamachhaliya commented May 27, 2026

Description

This PR fixes Issue #1 - Removes all dummy data and connects the UI with real backend APIs.

What Changed?

Frontend:

  • Created api.ts - Central file for all backend API calls
  • Updated Analytics.tsx - Now shows real data from database
  • Updated MyFiles.tsx - File upload, share, delete now work with backend
  • Removed all localStorage dummy data
  • Added loading spinners and error messages

Backend:

  • Added File.js model - Stores file info in MongoDB
  • Added fileController.js - Handles file operations
  • Added files.js routes - New API endpoints for files

New APIs Added:

  • GET /api/files/my-files - Get user files
  • DELETE /api/files/:id - Delete one file
  • DELETE /api/files/bulk-delete - Delete multiple files

Result:

  • Files now save permanently in database
  • Analytics shows real statistics
  • Data persists after page refresh

Closes #1

- Added api.ts service for backend API calls
- Updated Analytics.tsx to fetch real data from backend
- Updated MyFiles.tsx with backend integration
- Removed all localStorage dummy data
- Added file management routes (GET, DELETE, bulk-delete)
- Added File model and controller
- Added .env.example for environment setup
- Fixed Cloudinary upload integration

Closes imanchalsingh#1
@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

👷 Deploy request for file-sharingsystem pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4876cda

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@zaibamachhaliya is attempting to deploy a commit to the imanchalsingh Team on Vercel.

A member of the Team first needs to authorize it.

@zaibamachhaliya zaibamachhaliya changed the title Refactor: Remove Dummy Data and Use Actual Backend Data fix: Remove Dummy Data and Use Actual Backend Data May 27, 2026
@zaibamachhaliya zaibamachhaliya changed the title fix: Remove Dummy Data and Use Actual Backend Data Refactor: Remove Dummy Data and Use Actual Backend Data May 27, 2026
@imanchalsingh
Copy link
Copy Markdown
Owner

Thank you for contribution ✨

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

Labels

Medium Point - 30 SSoC26 Official label of org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Remove Dummy Data and Use Actual Backend Data

2 participants